Commit Graph

210 Commits

Author SHA1 Message Date
CosmicClash Training Bot 8e5eea4f46 chore(training): Add 20260812-0424-gen5-s4-handling-retry2 checkpoints, logs, and exported policy 2026-08-12 10:30:03 +01:00
CosmicClash Training Bot 052b47c04f chore(training): generation 5 progress after 20260811-2216-gen5-s4-handling-retry1 2026-08-12 04:24:21 +01:00
CosmicClash Training Bot 739c4b09d5 chore(training): Add 20260811-2216-gen5-s4-handling-retry1 checkpoints, logs, and exported policy 2026-08-12 04:22:59 +01:00
CosmicClash Training Bot 6a34eefceb chore(training): generation 5 progress after 20260811-1606-gen5-s4-handling 2026-08-11 22:16:10 +01:00
CosmicClash Training Bot 722ad7cc85 chore(training): Add 20260811-1606-gen5-s4-handling checkpoints, logs, and exported policy 2026-08-11 22:14:46 +01:00
Josh Creek b8e2a7b57a fix(training): cut grounded_upright_reward, restart stage-4 from Stage-3 foundation
grounded_upright_reward at 0.015 overshot: four force-retries pushed
upright_fraction from 0.265 to a plateauing 0.331, then the fifth jumped it
to 0.696 (55% over the 0.45 floor) while goal_rate collapsed 0.542->0.366
and forward_motion_fraction fell 0.244->0.184 (vertical_thrust_mean went
negative) - the policy learned to sit pinned upright and farm the bonus
instead of chasing the ball. It was sized "comparable to
time_penalty/ball_distance_penalty" but at 0.015/tick it was actually above
ball_distance_penalty's 0.01/tick worst case, so idling near the ball beat
playing. Cut to 0.004/tick (episode ceiling ~7.2, below
ball_distance_penalty's ~18 worst case). Delete the five blocked attempts
and reset generation5_state.json so the next run starts fresh from the
Stage-3 foundation rather than continuing from the farming checkpoint.
2026-08-11 15:57:27 +01:00
CosmicClash Training Bot f5b0a79cea chore(training): generation 5 progress after 20260811-0858-gen5-s4-handling-retry4 2026-08-11 15:12:24 +01:00
CosmicClash Training Bot 25560a65b5 chore(training): Add 20260811-0858-gen5-s4-handling-retry4 checkpoints, logs, and exported policy 2026-08-11 15:10:43 +01:00
CosmicClash Training Bot be1429e99e chore(training): generation 5 progress after 20260810-1338-gen5-s4-handling-retry3 2026-08-10 19:52:02 +01:00
CosmicClash Training Bot 651c048115 chore(training): Add 20260810-1338-gen5-s4-handling-retry3 checkpoints, logs, and exported policy 2026-08-10 19:50:40 +01:00
CosmicClash Training Bot d1ccf4dbc7 chore(training): generation 5 progress after 20260810-0211-gen5-s4-handling-retry2 2026-08-10 08:22:52 +01:00
CosmicClash Training Bot 677fff2c82 chore(training): Add 20260810-0211-gen5-s4-handling-retry2 checkpoints, logs, and exported policy 2026-08-10 08:21:17 +01:00
CosmicClash Training Bot dd1165c805 chore(training): generation 5 progress after 20260809-1955-gen5-s4-handling-retry1 2026-08-10 02:11:41 +01:00
CosmicClash Training Bot aa8d895b14 chore(training): Add 20260809-1955-gen5-s4-handling-retry1 checkpoints, logs, and exported policy 2026-08-10 02:10:10 +01:00
CosmicClash Training Bot 7174ff7cf9 chore(training): generation 5 progress after 20260809-1340-gen5-s4-handling 2026-08-09 19:55:13 +01:00
CosmicClash Training Bot dcf618dda1 chore(training): Add 20260809-1340-gen5-s4-handling checkpoints, logs, and exported policy 2026-08-09 19:53:46 +01:00
Josh Creek 6f7536f03c fix(training): correct non-forward penalty math and add a grounding incentive
Adversarial review of the previous stage-4 retune found two problems:
non_forward_speed used planar_speed - forward_component, which under-charges
diagonal motion relative to true lateral speed (e.g. ~29% penalty at 45
degrees off the nose instead of the correct ~71%); fixed to the Pythagorean
magnitude for forward-facing angles, full speed for backward-facing ones.

Also, ground_tilt_penalty and non_forward_penalty only ever cost reward near
the floor with nothing offsetting them above it, which could teach a policy
that's still bad at ground handling to just avoid the floor rather than get
better at it. Added grounded_upright_reward (ship_ai_controller.gd) plus a
new ShipObservations.is_floor_contact helper for genuine belly-on-floor
contact detection, so grounding well while upright is the locally profitable
choice, not just the least-punished one.
2026-08-09 13:23:00 +01:00
Josh Creek c56f5ed1a3 chore(training): retune stage-4 handling penalties and restart from Stage-3 foundation
Stage 4's upright/forward-motion telemetry plateaued flat across all three
blocked attempts because ground_tilt_penalty (0.003) was too weak to matter
and nothing penalized sideways/reverse motion at all. Raise
ground_tilt_penalty to 0.05 and add a new non_forward_penalty term
(ship_ai_controller.gd) that directly costs non-forward planar velocity near
the floor, independent of the ball. Delete the three blocked attempts'
checkpoints/logs/exports and reset generation5_state.json so the next run
starts fresh from the Stage-3 foundation checkpoint instead of continuing
from the drifted retry2 weights.
2026-08-09 13:09:12 +01:00
CosmicClash Training Bot 005cd0c66e chore(training): generation 5 progress after 20260809-0328-gen5-s4-handling-retry2 2026-08-09 09:36:44 +01:00
CosmicClash Training Bot c6f0f2084f chore(training): Add 20260809-0328-gen5-s4-handling-retry2 checkpoints, logs, and exported policy 2026-08-09 09:35:20 +01:00
CosmicClash Training Bot 837deedc08 chore(training): generation 5 progress after 20260808-2120-gen5-s4-handling-retry1 2026-08-09 03:28:48 +01:00
CosmicClash Training Bot 686b115b88 chore(training): Add 20260808-2120-gen5-s4-handling-retry1 checkpoints, logs, and exported policy 2026-08-09 03:27:31 +01:00
CosmicClash Training Bot d617c8032c chore(training): generation 5 progress after 20260808-1508-gen5-s4-handling 2026-08-08 21:20:09 +01:00
CosmicClash Training Bot 11b41ab562 chore(training): Add 20260808-1508-gen5-s4-handling checkpoints, logs, and exported policy 2026-08-08 21:18:39 +01:00
Josh Creek d229bccd19 fix(arena): contain goal pockets 2026-08-08 15:03:46 +01:00
Josh Creek 341a67f6da feat(training): add generation 5 curriculum 2026-08-08 14:56:17 +01:00
Josh Creek 33952b3cd0 feat(training): pair evaluations across physical sides 2026-08-08 14:55:12 +01:00
Josh Creek 57a298dc06 fix(ai): map team-relative rotation actions 2026-08-08 14:54:27 +01:00
Josh Creek 7e217df898 feat(ai): promote stage 3 policy as easy bot 2026-08-08 14:52:36 +01:00
Josh Creek 0285116ddc fix(feedback): remove ball contact screen flash 2026-08-08 08:52:39 +01:00
Josh Creek 0223b55de8 fix(vfx): remove ball contact sparks 2026-08-08 08:47:48 +01:00
Josh Creek e0a1cbaf6d fix(presentation): simplify camera and engine effects 2026-08-08 08:44:26 +01:00
CosmicClash Training Bot b7f646ba48 chore(training): Add 20260806-1939-curric-s3-gauntlet checkpoints, logs, and exported policy 2026-08-08 08:24:30 +01:00
Josh Creek 8fa40769a8 feat(rendering): add cinematic post processing 2026-08-07 22:54:01 +01:00
Josh Creek 0a7eb0b742 feat(ui): theme HUD with Orbitron typography 2026-08-07 22:48:56 +01:00
Josh Creek 8bd65290fc feat(goals): add cinematic celebration sequence 2026-08-07 22:45:33 +01:00
Josh Creek 28eb45338a feat(feedback): add responsive camera and impacts 2026-08-07 22:37:49 +01:00
Josh Creek 78ef0cb1f8 feat(vfx): animate movement and scoring effects 2026-08-07 22:31:17 +01:00
Josh Creek 8d4078989c feat(arena): add grounded lighting and asteroid dressing 2026-08-07 22:26:02 +01:00
CosmicClash Training Bot 9fd1764522 chore(training): curriculum progress after 20260805-1926-curric-s2-selfplay 2026-08-06 19:39:02 +01:00
CosmicClash Training Bot a370b15020 chore(training): Add 20260805-1926-curric-s2-selfplay checkpoints, logs, and exported policy 2026-08-06 19:37:58 +01:00
CosmicClash Training Bot f8641836df chore(training): curriculum progress after 20260805-0953-curric-s1-bootstrap 2026-08-05 19:26:22 +01:00
CosmicClash Training Bot 9f78d37c79 chore(training): Add 20260805-0953-curric-s1-bootstrap checkpoints, logs, and exported policy 2026-08-05 19:26:20 +01:00
Josh Creek 401d882ff0 fix(assets): remove unreferenced duplicate planet_surface texture
assets/textures/planet_surface.png was byte-identical to and unused
in favor of assets/models/nebula_planet_planet_surface.png, the
sidecar Godot's glTF importer actually extracted from nebula_planet.glb
and uses at runtime. Deleted the orphan (+ its .import) and stopped
gen_planet_surface.py from writing it.

Also measured nebula_dust.gdshader's per-fragment depth-texture sample
cost (~0.07ms/frame at 500 particles, within noise) -- negligible, so
no budgeting concern for further particle work.
2026-08-05 09:51:33 +01:00
Josh Creek 9bdeb73fa7 docs: mark trained-bot compatibility items resolved in TODO.md
Records the drag/aperture/collider-bake/beyond-1v1 items as done, with a
short note on what actually shipped (scoped up to 5v5 mid-implementation)
and the explicit non-goals (no 2v2+ curriculum, no team-size UI) so it's
clear what's still open.
2026-08-05 09:18:08 +01:00
Josh Creek 3049c42867 feat(training): support N-vs-M matches with persistent per-ship spawn IDs
Extends ShipObservations beyond the old self+1-opponent layout to padded
teammate/opponent arrays (MAX_TEAMMATES=4, MAX_OPPONENTS=5, SIZE=83),
zero-filling slots past the real roster size the same way the old single-
opponent slot was zero-filled when absent.

Slot stability across ticks requires a persistent identity: Ship gains
spawn_index (set once by GameMode.spawn_ship, never reassigned — there's no
despawn path anywhere in this codebase, so a roster is fixed for the whole
episode/match). ai_ship_controller.gd's opponent discovery is rewritten from
"first non-self ship" to classify every other ship by team and sort by
spawn_index; training_mode.gd/ship_ai_controller.gd carry the equivalent
sorted lists through the training path so both agree on slot assignment for
the same roster.

training_mode.gd and match_mode.gd both gain a team_size export (default 1,
so every existing curriculum script and match keeps today's 1v1 behaviour
unchanged). This is plumbing only: no 2v2+ curriculum or reward design, and
no match-mode UI to pick team size, has been done yet. The two checkpoints
in Game/bots/promoted/ are fitted to the old 35-float layout and are not
migrated — expected to go stale until the next training run.
2026-08-05 09:17:56 +01:00
Josh Creek 18fdb0f232 feat(arena): resize for 5v5, cut a real goal-wall hole, and bake collision geometry
Retraining from scratch removes the constraint that blocked these: the
existing checkpoints in Game/bots/promoted/ no longer need byte-identical
geometry.

- Fix the goal aperture constants (were 1.85/1.65, now match
  objects/goal.tscn's actual sensor exactly at 1.75/1.5) so a ball crossing
  the visible edge can't fail to score.
- Cut a real navigable hole in each end wall's collision
  (_build_end_wall_colliders), replacing the previous solid box — the ball
  now genuinely enters the net instead of triggering the sensor a hair
  before hitting a solid wall. Correct for both FLOOR and ELEVATED goal
  modes via _goal_surround_bounds. A separate, slightly wider
  GOAL_VISUAL_APERTURE_* pair keeps the collision hole exact while still
  giving goal.gd's bezel/rim frame clearance to be seen against the hull cut.
- Resize the play volume 1.5x (INNER_HALF_X/Z/HEIGHT 12/18/12 -> 18/27/18) to
  comfortably fit a 5v5 roster: updates every hand-authored literal in
  arena_boundary.tscn/arena_base.tscn/the elevated arena variants that
  doesn't derive from those constants, adds 5 spawn markers per team, and
  rescales ship_observations.gd's normalization scales and arena_02's
  cosmetic decoration/nebula-dust shader uniforms to match.
- Bake the ~170 runtime-generated CollisionShape3D nodes into the scene via
  a new bake_colliders()/tools/bake_arena_boundary.gd instead of rebuilding
  them on every load — a real load-time cost repeated in every parallel
  headless training env. Colliders must be direct children of the
  StaticBody3D to register at all, so bake_colliders() parents them onto
  self and tags them with a group for idempotent re-baking, rather than
  grouping them under an intermediate container node. _ready() self-heals:
  it skips regenerating only when an existing bake's goal_mode metadata
  matches the current one, so the FLOOR-mode bake in the shared scene is
  never silently reused by an ELEVATED arena variant.
2026-08-05 09:17:13 +01:00
Josh Creek a02e0770af fix(training): avoid ship-ship overlap when placing a multi-ship roster
_place_ships_random/_place_air_drill sampled each ship's randomized episode-
start position independently, so a team_size > 1 roster could spawn
interpenetrating (ships are ~1x1x4). Both now resample (up to 20 attempts,
matching the existing corner/fillet rejection-sampling pattern) against
every ship already placed that reset, rejecting anything within
MIN_SHIP_SEPARATION (4.5m, matching the arena spawn-marker spacing) of one.
2026-08-05 09:16:35 +01:00
Josh Creek 661c588fef fix(game-mode): recover ships/ball that escape through an open goal in every mode
The goal mouths are now a real navigable hole in the end walls, sized to the
ball rather than the ship — a ship's 1x1 cross-section fits through it, and
there's nothing behind the net to stop it. The escape failsafe previously
only existed in TrainingMode (where a physics regression just wastes
training time); now that any ship can genuinely fly out through an open
goal, every mode needs it or a stray ship/ball falls into the void with no
way back short of quitting. Moved up to GameMode as the shared default
_physics_process, removing TrainingMode's now-duplicate copy.
2026-08-05 09:16:00 +01:00
Josh Creek 0f7603d3cb fix(ship): delta-scale drag so it stays correct at any physics tick rate
drag_coefficient/angular_drag/the idle angular-drag multiplier were applied
once per physics tick with no delta scaling, correct only because
project.godot never pins physics/common/physics_ticks_per_second and
Godot's default happens to be 60. _tick_scaled(k, state.step) makes the
decay rate invariant to tick rate instead. Also promotes the previously
hardcoded 0.9 idle angular-drag literal to an export, matching its sibling.
2026-08-05 09:13:52 +01:00