1 rollouts.replay.policy

rollouts.replay.policy

Finite-candidate rollout policy specification.

This module owns action-selection names and the complete immutable policy configuration. Candidate generation remains in aria_nbv.pose_generation; the replay engine consumes one policy spec without duplicating its fields in pipeline recipes.

1.1 Classes

Name Description
CounterfactualSelectionPolicy Built-in policies used to rank valid candidates during rollout expansion.
OrbitDirection Persistent world-Z direction for committed orbit traversal.
RolloutPolicySpec Immutable branching and action-selection policy for one rollout recipe.

1.1.1 CounterfactualSelectionPolicy

rollouts.replay.policy.CounterfactualSelectionPolicy()

Built-in policies used to rank valid candidates during rollout expansion.

1.1.2 OrbitDirection

rollouts.replay.policy.OrbitDirection()

Persistent world-Z direction for committed orbit traversal.

1.1.3 RolloutPolicySpec

rollouts.replay.policy.RolloutPolicySpec()

Immutable branching and action-selection policy for one rollout recipe.

1.1.3.1 Attributes

Name Description
horizon Maximum number of selected transitions.
branch_factor Default number of child actions expanded per non-terminal state.
beam_width Maximum retained partial trajectories; None keeps every branch.
branch_factor_schedule Optional deterministic per-step branch counts; the final value repeats.
stochastic_branch_factors Optional seeded branch-count choices sampled per expanded state.
stochastic_branch_probabilities Optional probabilities aligned with stochastic_branch_factors.
selection_policy Policy used to rank or sample admitted candidate actions.
selection_temperature Temperature used by stochastic score-based selection.
robust_temperature_logits Normalize finite scores by median and IQR before temperature scaling.
robust_logit_iqr_floor Minimum robust scale in target-root-gain units; zero preserves historical selection and lineage.
min_history_distance_m Minimum distance from poses already selected in the current trajectory.
min_sibling_distance_m Minimum translation separation between sibling branches, in metres.
min_sibling_yaw_deg Minimum sibling heading separation in world-XY degrees.
min_sibling_target_bearing_deg Minimum target-bearing separation between sibling branches, in degrees.
require_sibling_strategy_diversity Prefer distinct candidate strategy families among sibling branches.
seed Root seed for action selection; None uses zero for deterministic replay.
proposal_seed Independent proposal-stream root; None falls back to seed for compatibility.
proposal_replica Independent candidate-shell replica for the same physical rollout state.
orbit_direction Required persistent direction for either directed-orbit selection mode.

1.2 Functions

Name Description
derive_candidate_seed Derive a proposal seed from physical selected-shell history.
derive_component_seed Derive a component-local seed without coupling sibling components.
derive_recipe_seed Derive the root seed for one campaign recipe instance.
derive_rollout_seed Derive one reproducible unsigned 32-bit seed from a lineage path.
derive_selection_seed Derive action-selection randomness independently of proposal draws.

1.2.1 derive_candidate_seed

rollouts.replay.policy.derive_candidate_seed(
    proposal_seed,
    state_path=(),
    *,
    proposal_replica=0,
)

Derive a proposal seed from physical selected-shell history.

state_path contains selected full-shell indices from the root to the node. It intentionally excludes frontier or beam indices, so reordering retained trajectories cannot change the candidate table for a state. proposal_replica requests an independent, reproducible shell for the same state without changing action-selection randomness.

1.2.2 derive_component_seed

rollouts.replay.policy.derive_component_seed(node_seed, component_identity)

Derive a component-local seed without coupling sibling components.

1.2.3 derive_recipe_seed

rollouts.replay.policy.derive_recipe_seed(
    campaign_id,
    work_unit_hash,
    recipe_name,
    temperature,
)

Derive the root seed for one campaign recipe instance.

1.2.4 derive_rollout_seed

rollouts.replay.policy.derive_rollout_seed(*parts)

Derive one reproducible unsigned 32-bit seed from a lineage path.

All stochastic rollout consumers use this pure helper instead of sharing mutable RNG state. Callers include their semantic path (recipe, step, branch, or component) in parts.

1.2.5 derive_selection_seed

rollouts.replay.policy.derive_selection_seed(selection_seed, state_path=())

Derive action-selection randomness independently of proposal draws.

Back to top