Feature/visualization#5
Merged
Merged
Conversation
- Add browser-based Three.js visualization (visualize.py + template) that loads trained models and renders animated ball trajectories - Fix path generator falling back to stationary at high speeds by scaling min_duration based on zone geometry and sampled speed - Remove all curriculum learning code (caused catastrophic forgetting and paths were too short for meaningful high-speed training) - Clean up train.py: remove --no-curriculum flag, unused SAC import Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Physics: replace height-window hit detection with plane-crossing approach that checks where the ball descends through z=HUB_OPENING_HEIGHT and whether the (x,y) landing is within the hub circle. Reward: add velocity penalty (-0.3 at max velocity) to discourage mortar-style high-arc shots. Also includes path generator refactor, config cleanup, and expanded tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Penalize peak trajectory height above 4m (-0.2 per excess meter) instead of velocity. This discourages mortar-style high-arc shots at long range while still allowing close-range lobs where the peak stays under 4m. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace hard 4m threshold with smooth gradient from hub_height + 2 ball diameters (2.13m). Penalty is -0.1 per meter of excess, so flatter shots are always preferred but close-range lobs incur minimal cost. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Physics: detect when ball passes through hub cylinder on the way UP (ascending collision) and mark as a miss. Previously only checked descending crossings, allowing shots that went up through the hub. Visualization: fix play/pause button width, default to --no-browser. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Detect when ball passes through the hub cylinder while ascending (going up through where the hub structure would be). Only ascending trajectories trigger collision; descending balls entering through the top opening are valid hits. Updated test to use trajectory that misses laterally without hub collision. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace heuristic-based ascending crossing checks with a cleaner physical model: the hub is a cylinder with a top scoring surface and solid walls. - Ball entering cylinder radius at z < HUB_OPENING_HEIGHT = wall collision (miss) - Ball entering from above (z >= hub height) and descending through = valid hit - Track first entry into cylinder radius to determine entry point Add wall collision tests for close-range shots that would "cheat" by going up through the hub opening. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Increase hub opacity from 0.3 to 0.5 for better visibility - Add visualization section to README with usage examples - Update CLAUDE.md physics description for wall collision model - Add visualize.py and template to project structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add a simple web visualization feature. Fix some physics bugs. Get rid of curriculum learning as it is hurting performance.