AWS Builder Center
Meet Grid Dodger: An Arcade Game Built With Strands Decider 2B

Meet Grid Dodger: An Arcade Game Built With Strands Decider 2B

What happens when you give a small decision model the controls to an arcade game? I built Grid Dodger to find out. A ship moves across five lanes while asteroids and enemy fighters fall toward it. The model gets three choices: left, stay, or right. The goal is to reach 500 points, with difficulty rising from 100.

What is Strands Decider 2B?

Strands Decider 2B is a small, open-source model for making decisions inside an application. You give it a situation and a typed question. Instead of writing a paragraph, it selects an option, answers yes or no, or assigns a score. For Grid Dodger, the question is simply which movement option to choose.  Official introduction 
Think of an agent that has several tools available. A generative model might write the eventual answer, but first the application needs to choose a tool. That smaller choice is the kind of job Decider is intended to handle.
Our deployment uses  StrandsAgents/strands-decider-2B-hobson-v19 . Its model card describes a Qwen3.5-2B base with an adapter and a decision head. It also warns that confidence calibration needs testing on your own workload. The project now has newer checkpoints; the results in this article belong to the v19 setup we actually ran.  Checkpoint model card 
I paired it with Amazon Bedrock, using Amazon Nova Lite for the post-game recap. The two models have separate jobs: Decider chooses a movement option; Bedrock writes a short summary after the run ends.

Meet Grid Dodger:


The board has five columns and ten rows. Your ship sits at the bottom. You can move one column left, stay where you are, or move one column right. Hazards advance one row at a time. Reach 500 points to win.
Mode
How it plays
Human
You steer with the keyboard or movement buttons.
Decider
The model chooses, the configured policy checks the response, and the game executes the selected movement tool.
Shadow
The model suggests a move and shows a yellow target. You make the final choice.
Difficulty starts increasing at 100 points, reaches Hard at 300 and Extreme at 400. The hazards become denser; they do not suddenly start falling several rows at once.
Pause lets you continue the same run. Stop ends it deliberately and requests a recap. Collisions and wins also trigger recaps. Recent Human and Decider scores are saved in the browser, so you can compare your own runs without setting up an account.

Why build a game around it?

I wanted to see the decision happen, then immediately see what it did.
A game gives that experiment a clear boundary. There are only three legal moves. The rules live in code. A poor choice has an obvious consequence, and I can replay the same board with a different prompt or controller.
It also makes the experiment approachable. You do not have to read a trace or understand the request schema to notice that staying put was a bad idea. You can take the controls yourself, watch the AI fly, or ask it for suggestions while you keep playing.
That last option became Shadow mode, and it turned out to be one of the most useful parts of the project. It lets you disagree with the model before its choice becomes your action.


Architecture Overview:

The browser runs the game. The GPU service returns a decision; the recap service returns text.
The frontend is JavaScript and canvas, served from S3 through CloudFront. The same CloudFront address also exposes the two backend routes:
  •  /decider/*  goes through an Application Load Balancer to an ECS task on an EC2  g4dn.xlarge  GPU instance.
  •  /api/recap  goes through API Gateway to a Python Lambda function that calls Bedrock.
The distinction I want to make clear is where execution happens. Decider does not directly change the ship’s position on the GPU server. It returns an answer. The browser validates that answer, applies the threshold policy, and calls a registered movement tool. The game engine owns movement, scoring and collision detection.
Bedrock sits outside that movement loop. When a run ends, it receives the outcome, score, pilot mode, recent moves and any validated collision evidence. Its response appears in the recap panel.


From a board to a move

The same selection path supports automatic play and human-controlled Shadow suggestions.
Suppose the ship is in column 2 and a hazard is about to fall into that column. The game can calculate the immediate result of each legal move. In this example, left and right are safe for the next step; stay causes a collision.
We send those facts with a typed question named  safest_move . A shortened example looks like this:
{
"state": "Player in column 2; approaching hazard in column 2...",
"questions": {
"safest_move": {
"type": "choice",
"instructions": "Choose a SAFE move from the explicit move outcomes...",
"criteria": {
"left": "SAFE this tick; destination column 1",
"stay": "COLLISION: game ends; destination column 2",
"right": "SAFE this tick; destination column 3"
}
}
}
}
The engine generates the criteria for each board. The example is abbreviated, rather than a complete request copied from a running session.
The option keys map to three tools:  move_left ,  hold_position , and  move_right . Each executes one engine step. Unknown option names cannot call arbitrary functions.
Before dispatch, the policy checks the returned option and its probability. The current threshold is 0.40. Below it, the game applies  stay . That fallback can still collide, so the interface shows when the applied action differs from the model’s original choice. It is a policy we can evaluate and change, not a safety guarantee.
In Shadow mode, we stop short of executing the AI’s choice. We display the suggestion and let the human decide.



Building the first working version

I started with a small browser game and kept the engine separate from the interface. That made it possible to test movement, collisions and scoring without clicking through the page every time something changed.
Next came the HTTP decision path: format the board, send the typed question, parse the response, and bind the result to one of the movement tools. A mock controller kept local development useful when the real model was unavailable. The interface labels that mode so it cannot be mistaken for live inference.
For AWS, I built the CUDA container in CodeBuild and stored it in private ECR. ECS pulls that image onto the GPU instance, and Terraform pins the task to an immutable image digest. The recorded clean build took about 5 minutes 28 seconds and produced a 3.43 GB compressed image. Future builds can take a different amount of time.
Separate release paths mean that changing a button or a recap prompt does not require rebuilding the GPU image.
The Make commands reflect those boundaries:
Change
Command or workflow
Run local checks
 make test 
Rebuild the Decider container
 make build-image 
Update Lambda or infrastructure
Review a Terraform plan, then  make infra-apply PLAN=reviewed.tfplan 
Publish browser assets
 make sync-ui 
I also exercised a full teardown and rebuild. That helped catch assumptions that a working deployment can hide. Fresh hosts still need to pull the image and load the model, and replacing a task on one GPU can interrupt the service.
The demo has origin restrictions, a verification header, WAF limits and recap throttling. Those reduce direct access and abuse; they do not make a public game authenticated or give it a spending cap.

What the measurements actually say


We recorded 40 fixed board snapshots and five seeded episodes per controller, capped at 60 engine steps. The compared controllers were the reconstructed original prompt, the grounded prompt, and a local deterministic heuristic. Snapshot cases are shared. Spawn randomness is seeded for episodes, but model inference is not, and episode states diverge when controllers choose different moves.
Measured figure. Generated from the stored benchmark report, not from the screenshots in this article. The episode cap censors long runs.
Controller
Avoidable collisions / 31 snapshots
Mean episode length in engine steps
Runs reaching cap / 5
Median request ms
p95 request ms
Local heuristic
0
44.8
2
0.02
0.10
Original prompt
17
24.2
0
354.66
384.74
Grounded prompt
0
51.0
4
422.06
519.09
The clear snapshot finding is that grounding eliminated the 17 avoidable collisions observed with the original prompt in this sample. It did not beat the heuristic’s zero.
The grounded model’s five episodes averaged 51.0 engine steps, compared with 24.2 for the original prompt and 44.8 for the heuristic. That is encouraging for these seeds, but five capped episodes cannot establish general superiority.
Grounding also increased median snapshot request latency, from approximately 355 to 422 ms; p95 rose from 385 to 519 ms. These are client request timings, including network overhead. The heuristic timings measure local computation and are not an equivalent network request. The official project’s reported hardware-specific latency is not our application latency.  Official performance context. 
The  recorded report ,  raw decisions , and  benchmark instructions  preserve the evidence and its limits.

Where could Decider fit in production?

The game gave us a visible way to try a pattern that could also fit inside a larger agent: let a small model handle a bounded choice, then let application code control what happens next.
Possible uses include selecting a tool, routing a request to a category or model, checking whether tool arguments match supplied information, and ranking context before passing it to a generative model. These are examples of intended decision-model uses, rather than production results demonstrated by Grid Dodger.  Official project 
The potential benefit is avoiding a generative-model call for every small choice. A fixed answer format can simplify parsing, and a self-hosted service gives the builder control over deployment. Whether it is faster or cheaper depends on the request size, hardware, traffic and alternative being replaced. An idle GPU can easily outweigh per-call savings.
I would treat a production trial as a separate evaluation. Start in shadow mode, compare choices with known outcomes, measure end-to-end latency and cost, and test confidence thresholds on representative traffic. Define what happens when the model is wrong or unavailable. Keep permission checks and hard safety rules in deterministic code, and use human review or a stronger fallback where the consequences justify it.
Decider is presented as experimental software. The model card also limits where its calibration claims apply. Grid Dodger does not establish production readiness; it gives us a working place to examine the pattern before making that decision.  Model limitations 

What it costs to run

The complete, always-on AWS reference setup costs approximately $14 per day, or $425–430 per 730-hour month, before credits and tax. The GPU hosting Decider is the main expense; builds and usage-based charges are additional.
We removed the AWS recording environment after capturing the demo. The project website now serves recorded gameplay without running an inference backend.
You can also run the game and Decider on your own computer, with no AWS hosting charges. Performance depends on your hardware. Amazon Bedrock recaps are optional and incur AWS usage charges; without them, the game provides a labeled offline recap.

Try it yourself

You can play Human mode, let Decider take the controls, or use Shadow mode to compare its suggestions with your own instincts.
To run the game locally:
git clone https://github.com/elyas-syed/grid-dodger.git
cd grid-dodger
npm ci
make serve
Open  http://127.0.0.1:8080/game/ . Human mode and the mock backend work without a model server. For real Strands Decider 2B inference, follow the local setup guide to start the model on your computer and connect the game to it.
Hope you enjoyed reading the article! Happy Building!
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article