Home » Teaching An AI To Play A Racing Game Via Screen Input

Hobbyist AI Learns a Racing Game by Watching the Screen and Keys

By

–

Video Game Controller

The human way to learn a video game is to watch the screen, press the buttons, and copy whoever played it before you. In late June 2026, a hobbyist project appeared on Hackaday that taught a machine to learn exactly the same way, and the story behind it is a small parable about how intelligence, artificial or otherwise, starts with imitation.

The Agent and Its Name

The builder, known online as tryfonaskam, calls the creation PILA, short for Polytrack Imitation Learning Agent. Its playground is PolyTrack, a simple racing game of the kind humans pick up in an afternoon. What makes PILA interesting is not the game but the teaching method. Nothing about its driving was programmed by hand. Instead the agent was trained through supervised learning: it watched the game state flow past as screen captures, while also tracking which keys a human player pressed on each stretch of track.

Pairing those two streams, what the screen showed and what the hands did, gave the model a complete demonstration of skilled play, frame by frame and keystroke by keystroke. From that evidence it built its own sense of how speed, corners and inputs connect.

Playing Solo

Once trained, the agent takes the wheel alone. Live frames come straight from the graphics engine as it plays, and from each frame the model predicts the right move, then sends the matching keyboard inputs to steer the car down the track. Nobody tells it where the apex is. It drives the way a student drives after a hundred laps of watching: by feel, learned from example.

Hackaday placed the project in a small lineage of machines taught to race. Similar efforts have coaxed a raw AI through Trackmania, another minimalist racing game beloved for its precision, and the idea echoes the Drivatar technology in the Forza series, where the game studies human driving styles and rebuilds them as opponents. PILA is a humbler, single-purpose cousin of both, and that is the point: one game, one screen, one set of keys, one lesson.

The Human Behind It

For the creator, the attention was its own finish line. “Thanks so much for sharing my project here! I was really excited and happy to see it featured, and I’d love to hear any feedback or thoughts you all have.” the project’s author wrote in the Hackaday comments after the feature ran.

Behind the breakthrough language that usually wraps AI stories, this one stays modest and human: a person drove, a program watched, and the program learned to drive. For families wondering what machine learning actually is, few demos explain it more plainly than a car that learned a track the way a teenager does.

Sources

Sources

Related stories

Get breaking stories first on our Telegram channel.

More stories by

Most read

AI Tools

Artificial Intelligence

Business

World News