May 5, 2026 · 3 minutes · 492 Words
Rotations, an AI puzzle game
I used AI to create a puzzle game inspired by my favorite sport

In football (soccer), Rotations are synchronized movements between 2 or more players on a team in possession. They are intended to create passing options so the team has a clear pathway to a shot on goal.
playrotations.com asks you to solve different puzzles by setting up a passing sequence through which the blue team can score a goal. The game gets progressively harder. Each level is generated by Nvidia’s nemotron-3-nano-30b-a3b model.
My goal with this project was to build a game using only free technologies. Much of the early internet was built by people creating fun free projects and I wanted to recreate that with AI as the core technology. This proved to be a bigger challenge than expected.
Initially I tried using Gemma 4 for level creation and the defense CPU. Since its a small local model, I’d hoped it would provide quick free inference. However, level creation with Gemma 4 E4B (IT):
- Took over a minute
- Created levels with the wrong number of players
- Put players in nonsensical positions, such as the goalkeeper being next to the striker.
Local models are unfortunately not very capable at the moment. So, I switched to a hosted LLM.
Nvidia’s Nemotron is served for free by Nvidia over OpenRouter. This proved to be an effective model after some changes to the app design. These changes were needed to handle rate-limiting and slow inference speeds and are described below.
| Initial Design | Changed design to work with Nemotron | Result |
|---|---|---|
| To create a level, LLM generates 22 (x, y) coordinates describing the position of each player. | LLM generates a valid formation and tactical spec. Server uses this spec a random seed to convert that spec into (x,y) coordinates corresponding to 22 players. | Level creation runs in <10 seconds. |
| LLM decides how to adjust defensive players based on user’s defined passes | Defense responds to movements/passes that occur within some radius of the players. | LLM inference no longer used in defensive calculations. Reduces likelihood of getting rate limited |
// Example model output for level creation
{
"title": "Half-Space Lock",
"homeFormation": "3-2-5",
"awayFormation": "5-4-1",
"ballCarrierRole": "RCM",
"attackingFocus": "right_half_space",
"defensiveBlock": "compact_mid_block",
"compactness": 0.45,
"lineHeight": "mid",
"pressureSide": "right",
"homeTweaks": { "RW": "wide_high" },
"awayTweaks": { "LB": "narrow" }
}
Next
A couple things I am hoping to add soon:
- Defensive AI: Instead of relying on movement inside a radius, I would like the defense to adjust shape based on the user defined passing sequence. This is far more representative of real life.
- A useful goalkeeper: Goalkeepers in Rotations cannot save or block a shot. This is intentional. When I had goalkeepers set to non-zero defensive ability, the game became too annoying to play as they would save every single shot. I’m hoping to find the right balance here soon.
Code
You can find/contribute to the Rotations’ code here: https://github.com/shreyash-chonkie/rotations.
Play Rotations at playrotations.com. Let me know what you think.