ES

The AI sends the order. The referee runs the fight.

The model gets a briefing and returns an order on a structured form. The referee checks whether that order is legal. Follow an exchange from the first question to the final hit.

Follow an exchange

The AI answers two questions

  1. Before each roundWhich 5 skills will you take and what’s your plan?elegir_repertorio
  2. During each exchange · Up to 15 times per roundHow will you move and what will you do in these 3 s?decidir
Round 2 · Exchange 6 of 151/7 The referee stops the clock
Sample values · actual decision flow

The referee stops the clock

Each round lasts 45 s, split into 15 exchanges of 3 s. Before each exchange, the referee takes a snapshot of the official state using the deterministic game engine.

The snapshot includes each robot’s position, health, energy, balance, and cooldowns. The model receives those numbers and works without access to the screen or 3D scene.

It builds a briefing for each robot

The referee prepares a briefing from each robot’s point of view. It includes distance in meters, arena geometry, legal moves and their costs, the robot’s private plan, and a summary of previous exchanges.

Your robot also receives your instructions. Each pilot decides independently without access to the opponent’s plan, current loadout, or pending order.

Actual briefing fields
{
  "fase": "intercambio",
  "ronda": 2, "intercambio": 6, "de": 15,
  "reloj_s": 15, "tiempo_restante_s": 30,
  "distancia_m": 2.9,
  "marco_movimiento": { "avance": [1, 0], "izquierda": [0, -1] },
  "tu": {
    "vida": 61, "equilibrio": 82, "energia": 34,
    "recargas": { "esquiva_lateral": 1 },
    "acciones_legales": ["golpe", "guardia", "patada", "combo", "guardia_reforzada"],
    "energia_por_accion": { "patada": { "coste": 13, "alcanza": true } }
  },
  "rival": { "vida": 48, "energia": 52, "habilidades_vistas_esta_ronda": ["empuje"] },
  "tu_plan_privado": "Close in when they’re away from the wall…",
  "intercambios_previos": [ … ],
  "instrucciones_estratega_humano": "If they’re far away, move in with a kick."
}

The server asks the model

BotDuels sends an HTTP request to the model provider. The API key stays on the server throughout the exchange.

The request includes the fight rules, the JSON briefing, and one tool required by tool_choice. Real Time adds a reminder that the clock keeps running. Reasoning effort is low, with limits of 4,096 output tokens and 60 seconds.

Responses API request (abridged)
POST https://api.openai.com/v1/responses
{
  "model": "gpt-6.2-sol",
  "instructions": "You are a robot’s strategist… (rules)
                   Always reply with exactly one call to the specified tool.",
  "input": [{ "role": "user", "content": "{ …JSON briefing… }" }],
  "tools": [{ "type": "function", "name": "decidir", "strict": true, … }],
  "tool_choice": { "type": "function", "name": "decidir" },
  "reasoning": { "effort": "low" },
  "max_output_tokens": 4096,
  "store": false
}

The model submits an order

The model calls a tool by filling out a form with predefined fields. Strict mode requires the reply to match the schema.

intencion picks one of 10 movement options. habilidad picks a skill. condicion can replace that skill if a condition is met. nota explains the choice in fewer than 200 characters. The server reads the arguments as an order.

What the model returns
"output": [{
  "type": "function_call",
  "name": "decidir",
  "arguments": "{
    \"intencion\": \"cerrar\",
    \"habilidad\": \"patada\",
    \"condicion\": { \"tipo\": \"distancia_menor\", \"valor\": 2, \"alternativa\": \"combo\" },
    \"nota\": \"Strategy: move in with a kick from range · distance 2.9 m\"
  }"
}]

The referee checks the order

The referee validates the movement, loadout, cooldown, energy, and guard status. If a condition cannot be applied, the referee drops it and keeps the main skill.

An invalid order comes back with the exact reason so the model can retry. After 3 unsuccessful attempts, or if the provider rejects the key, the series stops with a technical incident.

Both pilots decide in parallel

Both pilots get their question in parallel from the same snapshot. The mode determines how the referee handles the deadline.

Fight mode

Tactical: the clock waits for two legal orders, so model latency has no effect on the result.

The referee resolves the exchange and 3D plays it back

Both robots move for up to 0.75 s according to their orders. The referee evaluates any condition at that point, starts each skill, and resolves hit timing, damage, balance, and energy.

The same orders and seed produce the same fight. The server streams the event log to the browser for animation, physics, and commentary. Then the next exchange starts from the updated state.

The two tools

Each tool is a form that accepts a fixed set of values. Both are confined to the fight.

elegir_repertorioBefore each round
habilidades
Exactly 5 distinct skill IDs, including up to 2 passives. From round two onward, at most 2 changes.
plan
Private round plan, up to 600 characters. The plan is shared only with the pilot controlling your robot.

If you locked in your loadout during setup, the tool asks only for a plan.

decidirDuring each exchange
intencion
How to move.cerrarmediaalejarseflanquear_izquierdaflanquear_derechaavanzar_izquierdaavanzar_derecharetroceder_izquierdaretroceder_derechamantener
habilidad
Which legal skill to use.
condicion
Optional: distancia_menor, distancia_mayor, or vida_rival_menor, with a threshold and an alternative skill.ningunadistancia_menordistancia_mayorvida_rival_menor
nota
A brief explanation. If a human wrote the strategy, start by quoting the relevant instruction.

One contract, different pilots

Each pilot talks to its provider differently. They all submit a loadout and plan or an order, and the referee validates each reply the same way.

Responses API with a strict tool schema

The server looks for exactly one function_call with the expected name and reads the arguments. An incomplete reply or a missing tool call counts as a failed attempt.

What gets logged

The browser receives an event for each request so you can see when an order arrived or why it was rejected.

Status
OK, illegal, late, timeout, provider error, or network error.
Latency
Request duration in milliseconds. In Real Time it determines whether the order beats the cutoff.
Tokens and cost
Input, cached input, and output with an estimated cost in USD.
Served model
The exact model that answered, when the provider reports it.

Your strategy is included only in your robot’s briefing. Any note that quotes it stays private.

Commentary follows events the referee has already resolved.