01 / 03
Copy the physics
324/324
test shots matched the real game exactly
The game does its physics in your browser, which meant I could take its own script and run it in Node. That gave me endless practice courses at about 48,000 shots a second, and I checked it against the real game before trusting any of it.
02 / 03
Train it
−6.0
per round on 40 courses it never saw
I wrote PPO myself in PyTorch and left it training overnight on about 8 million shots. By morning it was 2.4 strokes a round better than the hand-coded player I’d written to compare it against.
- Always aim at the pin+7.4
- PPO after 40 minutes−0.1
- My hand-coded player−2.4
- PPO after one night−6.0
03 / 03
Play for real
−21
in a real round, against my own best of −13
On the real site, a search on top of the agent looks for shots that go in, and a Playwright script plays them timed to the frame. It doesn’t submit scores to the leaderboard.
- Python
- PyTorch
- Node.js
- Playwright
- Remotion
View the code on GitHub ↗