> SIGNAL LOCKED // DEVLOG #06

Teaching Machines to Fight

The AI plays by the same rules you do

Development Log//The Outer Line

The AI doesn't cheat. It scouts, it plans, it panics when you destroy its supply line.

That sentence is the design goal. Whether I've fully achieved it is a longer conversation.

Same rules

The AI in The Outer Line plays by your rules. It issues the same commands for movement and combat, builds ships and structures from the same Supply pool, and sees the map through the same Fog of War you do. No bonus resources. No hidden vision. When an AI scout enters your Gravity Well, it discovers what's there the same way you would: by looking.

This matters because if the AI cheats, you can feel it. You know something is wrong when the enemy attacks the exact Gravity Well you left exposed, even though it shouldn't have had sensor coverage. I wanted the AI's behavior to be readable. When it does something smart, you should be able to trace back why. When it does something confusing, that's a bug I need to fix, not a mystery by design.

Three loops

The AI runs three decision processes in parallel. One handles strategy, deciding which Gravity Wells to attack, which to defend, and where to expand next. Tactics run separately: how to fight once ships are engaged, which enemies to prioritize, when to pull damaged ships behind the formation. Then there's production, working out what to build, when to upgrade the Mobile Shipyard, and where to place structures.

These processes don't coordinate directly. The strategic brain decides to raid a Gravity Well, and the production system independently notices it needs faster ships to fill that raiding force. When everything clicks, the result is an opponent that seems to think on multiple levels at once. When it doesn't click, the AI does something baffling. Both happen more often than I'd like to admit.

The scouting game

The first thing the AI does in any match is send scouts. Fast Frigates, jumping from Gravity Well to Gravity Well, mapping the unknown. Each scout chains targets: visit one, scan it, move to the next unexplored neighbor. If a scout runs into something it can't handle, it runs. If it finds your fleet, the strategic brain now knows where you are and starts planning around it.

From the player's side, this is the moment I find most interesting. An enemy Frigate appears at the edge of your Gravity Well. It lingers for a few seconds, scanning. Then it jumps away. You know the AI knows where you are now. You know a response is coming. What kind, and how soon, depends on what you do next.

Raiding and retreating

Once the AI builds a picture of the map, it starts making plays. The first thing players usually notice is the raid. A small, fast group of ships jumps into a Gravity Well you didn't garrison well enough, destroys your Supply Nodes, and jumps out before your main fleet can respond. The target is your economy, not your military.

When the AI is strong enough, it escalates to full assaults. Bigger forces committing to clear a Gravity Well entirely: defenders first, then structures, then pushing toward the Mobile Shipyard. It won't go after your Shipyard while you still have warships or defensive structures active. It clears the field first, step by step.

And when things go badly, the AI retreats. This was one of the harder behaviors to build. It evaluates pressure across all the Gravity Wells it controls, and when a region is overwhelmed, it pulls forces back to a defensible chokepoint, usually near its own Mobile Shipyard. It gives up territory to save ships. Rebuilds. Regroups. The first time I saw the AI voluntarily abandon two Gravity Wells, consolidate at a chokepoint, and then push back into territory it had given up, I sat there staring at the screen for a while. That's the moment the system felt alive. It doesn't happen every game. But when it does, it feels like playing against a person.

Three difficulties

The difficulty settings don't make the AI smarter. They make it faster. Standard gives the AI a relaxed pace, with noticeable gaps between decisions. Hard tightens those gaps significantly, and Brutal reacts to changes on the map almost instantly.

The logic is identical across all three levels. A Standard AI that spots your scout will eventually respond with a raiding force. A Brutal AI will have that force jumping toward your supply lines before you've finished repositioning your fleet. I chose this approach because difficulty levels that break the AI's behavior, bonus resources, hidden vision, extra production, mean the player can't learn from what the AI does. The opponent stops playing the same game. With reaction speed as the variable, the AI's decisions always follow a logic the player can anticipate.

The hardest thing

The AI is the single hardest part of this game. I'm a solo developer. There's no AI programmer on the team because there's no team. Every behavior, every decision tree is something I wrote, tested, broke, rewrote, and tested again.

It's not done. There are games where the AI does something brilliant and games where it walks its entire fleet into a fortified chokepoint I've been building up for ten minutes. The scouting feels solid. The raiding works well. The assault timing is still off sometimes, committing too early or waiting too long. I keep working on it.

What I can say is that when the AI retreats from a fight it's losing, regroups at a defensible position, and comes back with a plan, that's the game I set out to build. I hope it'll be enough.

>>
Related in Command Briefing

Learn more about this mechanic →