Spaces:
Sleeping
Sleeping
| """Bridge policy-inversion results into analysis aggregation types.""" | |
| from __future__ import annotations | |
| from chess_tutor.analysis.types import MoveHeuristicVectors | |
| def vectors_from_chained(chained: object) -> MoveHeuristicVectors: | |
| """Build ``MoveHeuristicVectors`` from ``ChainedMoveConceptResult``.""" | |
| h = chained.heuristics # type: ignore[attr-defined] | |
| return MoveHeuristicVectors( | |
| heuristic_names=tuple(str(n) for n in h.heuristic_names), | |
| reference_0_100=h.heuristics_reference_0_100, | |
| inverted_0_100=h.heuristics_inverted_0_100, | |
| ) | |