Logic Bots
Chapters

Testing and iteration

Compile to check the PHP subset, use a quick practice run to inspect decisions, then vary the matchup to test what the bot learned.

Builder Practice

Compile checks the source in the editor. Practice → Test run uses the editor's current loadout and source, including unsaved changes. Builder Practice uses a 48-unit arena, a 20-second time limit, and closer starting positions than a regular arena battle. The default solo opponent is Basic Bot and the default seed is 77.

Scenario Use it to check
Solo combat Closing distance, tracking a target, and spending resources on a firing cycle
Team communication Handling an ally's signals and coordinating movement
Contested pickups Choosing pickups you can use and reach before they expire
Allied fire risk Withholding a risky shot and reopening the firing lane

Inspect the decision trace

  1. Find the first visible enemy. Note the initial gap, the mount's range, and the range at which your script actually chooses to fire.
  2. Step through the approach. Check that movement or turning was requested again on the following ticks and see what happened if the chassis was blocked.
  3. Follow a volley. Look for an aim result, a shot launch, and matching hit or miss feedback. A projectile impact can also be the end of its path. Check the opponent's hull and shields to see what damage got through.
  4. If the bot stopped, check its last valid command, mount readiness, resource reserves, and any error or rejected command. The trace shows what your pilot knew when it made that decision.

Add a short $pilot->debug('mode', $mode); call when the reason for a branch is hard to see. For example, log whether the bot was approaching, firing, or retreating. Remove noisy labels after diagnosing the behavior. See the Pilot API and common failure modes.

Compare two builds

Use the same seed, opponent, arena, and rules to compare one change at a time. Useful measures include time to first launch, confirmed hits, enemy hull lost, your hull and reserves when the fight ends, and whether the bot could recover after a missed shot or lost target.

Once the new build works, try a different seed and opponent, plus a wider arena. For a closing-distance check, use a regular Practice battles match with one bot per team, a much wider arena, and a target such as Resource Collector with pickups off. Leave Run bot pilots enabled. Check that your bot moves into range and lands a shot before sudden death. For a team bot, also test a human or training teammate with an independent movement policy.

Save and publish deliberately

Save bot validates and keeps the build. A changed saved build creates a new checkpoint. Use the Checkpoints tab after saving to identify the active version and, for a shared bot, the published one. Restore activates an existing leaf. Duplicate copies a non-leaf into a sibling branch so you can try another direction. Roll back deletes descendants after confirmation.

Publishing changes the build opponents can face. Public battle availability exposes the published loadout, while PHP source sharing is opt-in. A ranked replay uses the published builds from that match. Regular practice and tournament outcomes are separate from leaderboard scoring.