Midnight Machine
I took Adam's Paul Revere arcade game and gave the British a brain. Now the redcoats learn how you ride.
Third and final submission for Built on Yesterday — the last week of Summer into AI. The first two times, "yesterday" was my own work. This time I wanted to build on someone else's, the way the whole theme is really asking us to.
So I built on Adam's.
A few weeks back Adam shipped Ride, Revere, Ride! — a tiny, tight little Paul Revere arcade game. You gallop down a four-lane colonial road, throw broadsides at houses to warn them, and dodge redcoats until dawn. It's the kind of thing you understand in three seconds and lose to in thirty. I genuinely liked it. He deliberately kept it pure arcade — no accounts, no backend, no adaptive anything. The redcoats spawn at random.
That last part is the thread I couldn't stop pulling on. What if they didn
The one thing arcade games never have
Every obstacle you've ever dodged in a game was placed by a random number or a level designer months ago. It doesn't know you. It can't. So I gave the British the thing they've never had: a brain that watches you play.
Behind Midnight Machine sits a little learning model I wrote from scratch — no libraries, no AI API, just math in one file. Four times a second it notes which lane you're in and how you tend to move between them. It builds up a picture of your habits. Then, every time a redcoat spawns, it doesn't roll dice — it predicts where you're about to be and puts the redcoat there. The longer you ride, the better it reads you — and late in the run, once it's confident, it stops playing fair and starts double-blocking your two most-likely lanes at once. (Your side of the bargain: warn enough towns and the countryside musters a shield for you.)
You can watch it think
The part I'm happiest with isn't the model — it's that you can see it. Bottom-right there's a little panel called the Crown's Mind. Those four bars are its live guess of your next lane, updating as you ride, and it keeps a running tally of how often it's caught you. When you find yourself getting boxed in over and over, that panel is why. It's not cheating. It's reading you.
And because a claim like "it's really learning" is worth exactly nothing unless you can check it, there's a button: Freeze the Crown. Hit it and the whole model switches off — the redcoats go back to spawning blind, random, Adam's original way. The bars go dark, the read-rate reads BLIND. Play thirty seconds frozen and thirty seconds thawed and you feel the difference in your
The part I had to prove to myself
I ran it headless a few thousand times against a "habitual" rider — someone with lane preferences, like a real person. Blind, the Crown catches that rider about 25% of the time, which is exactly what random guessing over four lanes should get you. With its brain on, it climbs to about 41% — and it did that on every random seed I tried, so it's not luck.
But here's the thing I didn't plan, and like the most: it only works on patterns. When I threw a perfectly twitchy, never-repeat rider at it, the Crown's read-rate collapsed to almost nothing. It can't learn what has no pattern. Which means the game is quietly teaching you something true — the way to beat a machine that's studying you is to stop being predictable. I didn't design that lesson in. It fell out of the math, and it's the most honest thing in the build.
It tells you what it learned
When you die, the model doesn't just vanish. The end screen reads back what the Crown learned about you — the lane you lived in, which way you tend to bolt, how often you froze — pulled straight from its transition counts. "You lived in lane 3. You bolted left 50% of the time. That's the habit it read." Getting told your own tell by the thing that just used it against you is the whole build in one sentence.
On the theme, and on Adam
Built on yesterday, literally: this is Adam's game with one idea bolted on that he'd deliberately left off. I kept his whole feel — the four lanes, the broadsides, the dash for dawn — because it was already good, and rebuilt it as my own single file so I could open up the guts and put a mind inside the enemy. The best kind of "build on yesterday" isn't fixing someone's work. It's finding the one door they left closed and seeing what's behind it. Thanks for the ride, Adam.
And thank you Eric — for a last week that sent all of us back through each other's work instead of just racing forward. That turned out to be the best prompt of the
Take the ride
Live (WASD to move, space to throw, watch the Crown's Mind): https://myles-mf.github.io/summer-into-ai-2026/week-4/midnight-machine/
Source (one file, no libraries): https://github.com/myles-mf/summer-into-ai-2026/blob/main/week-4/midnight-machine/index.html
Adam's original, which you should play first: https://bluntforceriot.github.io/ride-revere-ride/
Everything I built this summer: https://myles-mf.github.io/summer-into-ai-2026/
Also written up on my site: https://merlinforge.com/blog/midnight-machine-week-4/
Warn every town, dodge the redcoats, beat the dawn. And if you keep getting caught in the same lane twice — that's not bad luck. That's the Crown, learning you. summer.spine.'t?


https://myles-mf.github.io/summer-into-ai-2026/week-4/midnight-machine/#road=903581288
Reminded me of spyhunter but with a horse 😂