from __future__ import annotations from dataclasses import dataclass @dataclass(slots=True) class V2Config: seed: int = 7 device: str = "cuda" envs: int = 2048 eval_envs: int = 1024 route_jumps: int = 20 distractors: int = 10 max_steps_factor: float = 3.0 phase_probability: float = 0.0 fire_probability: float = 0.0 fragile_platforms: bool = False fragile_delay_steps: int = 14 launch_pads: bool = False launch_pad_fraction: float = 0.24 launch_pad_velocity: float = 10.4 launch_pad_gap_extra: float = 0.0 moving_platforms: bool = False moving_platform_fraction: float = 0.18 moving_platform_amplitude: float = 0.72 moving_platform_period_steps: int = 70 moving_platform_transport: bool = False moving_platform_force_every: int = 0 moving_platform_force_offset: int = 3 moving_platform_transport_span: float = 5.35 moving_platform_endpoint_gap: float = 1.05 unlock_platforms: bool = False unlock_gate_count: int = 1 unlock_lock_span: int = 2 unlock_hold_steps: int = 1 unlock_reward: float = 1.5 event_period: int = 8 event_active: int = 4 lr: float = 3e-4 bc_updates: int = 600 bc_rollout_steps: int = 48 ppo_updates: int = 300 ppo_steps: int = 96 ppo_epochs: int = 3 minibatches: int = 8 gamma: float = 0.985 gae_lambda: float = 0.92 clip: float = 0.2 entropy_coef: float = 0.01 value_coef: float = 0.5 aux_edge_coef: float = 0.10 aux_distance_coef: float = 0.08 ppo_teacher_coef: float = 0.25 dagger_rollin_final: float = 0.0 dagger_warmup_fraction: float = 0.18 hidden: int = 192 transformer_layers: int = 3 transformer_heads: int = 4 run_dir: str = "data/runs" route_mode: str = "graph" pillar_platforms: bool = True sensor_mode: str = "ray" sensor_topk: int = 16 sensor_token_range: float = 9.5 sensor_fov_degrees: float = 120.0 sensor_token_sort: str = "index" observe_progress: bool = True arena_x: float = 32.0 arena_y: float = 18.0 lava_z: float = -0.9 agent_radius: float = 0.18 start_forward_fraction: float = 0.0 dt: float = 0.05 gravity: float = 30.0 accel: float = 65.0 ground_damping: float = 0.55 air_damping: float = 0.91 air_control: float = 0.10 max_speed: float = 4.3 jump_velocity: float = 7.2 sprint_speed_mult: float = 1.35 sprint_accel_mult: float = 1.25 turn_speed: float = 3.2 landing_pad_scale: float = 0.25 landing_top_tolerance: float = 0.03 landing_prev_slack: float = 0.12 # Legacy checkpoint metadata only. The v37 stack always uses env.py. physics_backend: str = "torch_fast_kinematic" mujoco_substeps: int = 0 platform_thickness: float = 0.24 map_min_edge_gap: float = 0.66 map_reach_scale: float = 0.82 map_hard_fraction: float = 0.35 map_route_gap_scale: float = 1.0 map_route_jitter: float = 1.0 map_route_lateral_fraction: float = 0.0 map_route_lateral_scale: float = 0.45 map_route_detour_fraction: float = 0.0 map_route_detour_min: int = 3 map_route_detour_max: int = 5 map_route_detour_scale: float = 1.0 map_braid_fraction: float = 0.0 map_braid_lanes: int = 2 map_braid_lane_width: float = 1.55 map_braid_direct_height_bias: float = 0.38 map_braid_alt_height_bias: float = 0.08 map_braid_center_scale: float = 0.20 map_braid_curve_scale: float = 1.00 map_braid_progress_stagger: float = 0.18 map_braid_height_band: float = 1.15 map_braid_height_arch: float = 1.15 map_braid_height_noise: float = 0.03 map_braid_swap_period: int = 1 map_braid_mesh_clearance: float = 0.16 map_braid_style_jitter: float = 0.0 map_braid_loopback_fraction: float = 0.0 map_braid_loopback_period: int = 5 map_braid_loopback_depth: float = 0.0 map_braid_loopback_lateral: float = 0.0 map_braid_loopback_height: float = 0.0 map_side_gap_scale: float = 1.0 map_branch_fraction: float = 0.0 map_height_offset: float = 0.0 map_vertical_scale: float = 1.0 map_illegal_decoy_fraction: float = 0.0 map_illegal_decoy_min_up: float = 0.90 map_illegal_decoy_max_up: float = 1.45 map_max_height: float = 2.65 map_zigzag_fraction: float = 0.0 map_zigzag_angle: float = 1.05 map_zigzag_period: int = 1 map_switchback_fraction: float = 0.0 map_switchback_period: int = 4 map_switchback_lane_extra_gap: float = 0.70 map_overlap_cleanup_iters: int = 24 map_route_tiny_fraction: float = 0.0 map_route_tiny_min_scale: float = 0.44 map_route_tiny_max_scale: float = 0.68 map_momentum_jump_fraction: float = 0.0 map_momentum_gap_bias: float = 0.82 map_redirect_period: int = 0 map_redirect_angle: float = 1.05 map_direct_decoy_fraction: float = 0.0 map_goal_xy_min: float = 0.0 map_goal_xy_per_jump_min: float = 0.0 map_extra_span_min_frac: float = 0.05 map_extra_span_max_frac: float = 0.90 map_extra_span_end_margin: float = 1.10 map_route_edge_gap_floor: float = 0.0 map_goal_vertical_bias: float = 0.0 map_goal_vertical_bias_min: float = 0.0 map_hairpin_period: int = 0 map_hairpin_angle: float = 0.0 map_hairpin_depth: float = 0.0 map_cluster_extra_fraction: float = 0.0 map_decoy_corridor_fraction: float = 0.0 map_unintuitive_depth: float = 0.0 map_valley_period: int = 0 map_valley_depth: float = 0.0 map_false_summit_fraction: float = 0.0 map_false_branch_fraction: float = 0.0 map_false_finish_fraction: float = 0.0 map_greedy_trap_fraction: float = 0.0 map_braid_bridge_fraction: float = 0.0 map_braid_bridge_span: int = 3 map_trap_jump_fraction: float = 0.0 map_trap_jump_drop: float = 2.2 map_trap_jump_min_drop: float = 0.42 map_trap_jump_edge_margin: float = 0.10 map_trap_jump_high_fraction: float = 0.0 map_trap_jump_high_min_up: float = 0.34 map_trap_jump_high_max_up: float = 1.35 map_trap_jump_disguise: float = 0.0 map_route_detour_period: int = 0 map_route_detour_depth: float = 0.0 map_backtrack_period: int = 0 map_backtrack_depth: float = 0.0 goal_progress_reward_scale: float = 2.0 first_visit_reward: float = 0.0 step_cost: float = 0.002 fall_penalty: float = 8.0 success_time_bonus: float = 0.0 stagnation_patience_steps: int = 0 stagnation_warmup_steps: int = 32 stagnation_progress_epsilon: float = 0.002 stagnation_penalty: float = 0.0 force_choke_events: bool = True clinic_success_bonus: float = 30.0 clinic_centered_bonus: float = 0.6 clinic_takeoff_cost: float = 0.10 clinic_jump_command_cost: float = 0.0 clinic_wrong_landing_cost: float = 0.90 clinic_timeout_cost: float = 3.0 clinic_step_cost: float = 0.006 clinic_tail_fraction: float = 0.0 clinic_tail_level: int = 5 clinic_boundary_fraction: float = 0.0 clinic_focus_fraction: float = 0.0 clinic_focus_tiny_prob: float = 0.90 clinic_focus_high_yaw_prob: float = 0.85 clinic_focus_close_gap_prob: float = 0.50 def __setstate__(self, state: object) -> None: if isinstance(state, tuple) and len(state) == 2 and isinstance(state[1], dict): values = state[1] elif isinstance(state, dict): values = state else: values = {} fields = self.__dataclass_fields__ defaults = type(self)() for name in fields: object.__setattr__(self, name, values.get(name, getattr(defaults, name)))