1 rollouts.inspection.selector_math
rollouts.inspection.selector_math
Retained selector shadow normalization and acquisition-displacement heading cost.
1.1 Functions
| Name | Description |
|---|---|
| horizontal_heading_cost | Return horizontal cost (1 - cos(theta))/2 and availability per action. |
| robust_temperature_logits | Return retained-state logits for an inspection-only temperature shadow. |
1.1.1 horizontal_heading_cost
rollouts.inspection.selector_math.horizontal_heading_cost(
candidate_centers_world,
current_camera_center_world,
previous_camera_center_world=None,
displacement_tolerance_m=0.0001,
)Return horizontal cost (1 - cos(theta))/2 and availability per action.
1.1.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| candidate_centers_world | torch.Tensor | Tensor["N 3", floating] camera centers in world metres. |
required |
| current_camera_center_world | torch.Tensor | Tensor["3", floating] last camera center. |
required |
| previous_camera_center_world | torch.Tensor | None | Tensor["3", floating] preceding camera center, absent for first acquisition. Supply the calibrated root camera center, rather than the corrected reference rig center. |
None |
| displacement_tolerance_m | float | Horizontal lengths at or below this metre threshold have unavailable heading, including zero/vertical moves. | 0.0001 |
1.1.1.2 Returns
| Name | Type | Description |
|---|---|---|
| torch.Tensor | Tensor["N", floating] costs in [0, 1] and Tensor["N", bool] |
|
| torch.Tensor | availability on the candidate device. Straight, perpendicular and | |
| tuple[torch.Tensor, torch.Tensor] | reversed displacements cost 0, 0.5 and 1. Missing history or nonfinite | |
| tuple[torch.Tensor, torch.Tensor] | centers yield neutral zero cost with false availability. World Z is up; | |
| tuple[torch.Tensor, torch.Tensor] | joint XY rotations/reflections preserve cost, independently of gaze. |
1.1.2 robust_temperature_logits
rollouts.inspection.selector_math.robust_temperature_logits(
scores,
temperature,
iqr_floor=0.0,
heading_cost=None,
heading_weight=0.0,
)Return retained-state logits for an inspection-only temperature shadow.
The nonnegative iqr_floor bounds score amplification when an admitted candidate set has a nearly collapsed score distribution. A zero floor retains the historical dtype-epsilon stabilization exactly. Enabled heading shaping uses logits = (z - weight * cost) / temperature without rescaling combined utility. Scores and aligned costs are Tensor["N", floating] on the same device. Nonfinite rewards retain unavailable NaN logits. Positive weight requires supplied, finite costs in [0, 1] with the exact score shape/device. Temperature is finite and positive; weight and scale floor are finite and nonnegative. Controls must be representable in the score dtype; nonfinite results for finite scores raise ValueError. Normalization delegates to the canonical replay calculation through producer_robust_temperature_logits.