Skip to content

The Decisions API plays AssaultCube.

A first-person shooter, free-for-all against 3 bots on AssaultCube’s easiest setting, “bad”. About 9 times a second the Decisions API picked a goal, a target and a move, and answered fire, reload, jump and switch. It finished the 3:10 match with 32 kills and 5 deaths. This is the logged match, decision by decision.

The screenshot the Decisions API saw at this moment
What it saw. Green ticks are kills, red ticks are deaths, across the whole 3:10 match.
Code does this part: it steers the aim and holds the keys.
Goal

What is the player's highest-priority goal right now?

Target

Which visible enemy should the player engage?

Move

How it works

It's modelled on the Jev bot that plays Doom in ThePrimeagen's video. A small patch to AssaultCube, which is open source, hands over the player's, the enemies' and the items' positions several times a second.

Every tick, one Decisions API call gets that state plus a screenshot and answers several questions in parallel:

  • the goal first: kill enemies, restore health, add armour, stock ammo or scout
  • which enemy to target, with the goal written into the question
  • how to move, also with the goal written in
  • four yes-or-no questions: fire, reload, jump, switch gun

Plain code does the walking, along the routes the game's own bots use, and the aiming. The Decisions API decides what to do; code does it.

Honest notes

The first versions only looked at screenshots. They went 0 kills and 1 death and spun in place. Handing it the game state fixed most of that, but it still spins sometimes.

This was against 3 bots on AssaultCube's easiest setting, "bad". Real players would be much harder.

Model: gpt-6-luna through POST /v1/decisions, up to seven questions per call. Cost is input tokens at $0.10 per million; output is free. Map ac_douze, free-for-all deathmatch. One screenshot shown for about every tenth decision.

AI FOR MORTALS.

Your daily AI edge that will make everyone wonder how you do it all.

Every weekday, the practical AI updates that matter, and exactly what to do with them.

The latest in AI, in plain English. Free, every weekday.