Skip to main content
OF Intel

MECHANICS · NATIONS

Nation AI behavior and counterplay

Read Nations as conditional decision systems, not fixed scripts. Their difficulty, reserves, relationships, routes, resources, and seeded random stream all change the next action.

Direct answer: what does a Nation actually do?

A Nation is not a fixed build order. After spawning, it combines attack, alliance, construction, Warship, ordinary nuke, and MIRV behaviors.

Difficulty changes action timing, target order, troop reserves, alliance rules, building scores, and special counters. Each Nation also receives a seeded deterministic pseudorandom stream.

You can influence its candidates through troops, relations, borders, structures, fleets, and incoming attacks. You cannot make it permanently friendly or predict one guaranteed next action.

Code thresholds are not match win rates

The v0.33.7 source and tagged tests define candidate rules. They do not provide public match telemetry, player-skill controls, or a best-strategy tier list.

Nation, Bot, and Tribe are not the same

ActorWhat overlapsWhat matters to the player
NationUses shared AI attack utilitiesAdds relationships, alliances, structures, fleets, nukes, MIRV, embargo, betrayal, and Nation-specific signals.
Ordinary BotCan share target and attack codeDoes not run the full Nation diplomacy, construction, and nuclear behavior suite described here.
TribeIs another non-human map actorDo not infer Nation alliances, build ratios, or nuclear choices from Tribe behavior.

This distinction also changes exceptions. Some FFA reserve rules exclude ordinary Bots, and Team or Humans vs Nations can take separate branches.

The Nation decision loop

  1. Spawn: initialize a deterministic random stream from game ID and Nation ID, then draw individual thresholds.
  2. First expansion: immediately attack Terra Nullius once, then prefer adjacent non-fallout neutral land in later attack checks.
  3. Reserve check: normally stop regular attacks below the individual 30–39% reserve.
  4. Trigger check: normally choose active targets at 50–59% of maximum troops, with a 1/10 chance to continue below it.
  5. Priority queue: run the first target strategy that finds a valid candidate and completes an action.
  6. Parallel systems: diplomacy, structures, Warships, embargo, nuclear weapons, and signals run at their own points in the cycle.

Neutral expansion and reclaiming Bot land with structures use the lower 10–19% individual expansion reserve. This does not remove route, ownership, or target checks.

The random stream is deterministic for a game and Nation, but later draws depend on earlier calls. Similar visible positions do not guarantee identical actions.

Four difficulty levels

DifficultyMain action intervalGeneral human attack gateDefense and infrastructure
Easy65–99 ticks25% passes each general checkNo responsive Defense Post, 0% rail scoring, no ship-event counter.
Medium55–69 ticks75% passes50% Defense Post gate, at most one per front; 60% rail scoring; 15% ship-counter build gate.
Hard45–59 ticksNo extra mercy gate75% FFA neighbor floor; 75% rail scoring; 50% ship-counter build gate.
Impossible30–49 ticksNo extra mercy gate90% FFA neighbor floor; 100% rail scoring; 80% ship-counter build gate.

The Hard and Impossible troop floor protects against the strongest non-friendly, non-Bot neighbor in ordinary FFA. Team, Bots, and a Nation under attack use exceptions.

Easy can still attack humans. The 25% pass is one gate, not a per-turn attack probability, and retaliation, traitor, non-human, or Humans vs Nations paths differ.

How Nations choose attacks

The attack behavior scans actual land neighbors and nearby players. If valid neutral land exists, it tries expansion before normal enemy strategies.

With no adjacent enemy, there is a 1/5 chance to sample an island attack. With an adjacent enemy, there is a 1/10 chance to try an island route first.

A failed category does not force an attack. The queue continues until one strategy succeeds or no candidate remains.

Target labelCode meaningPlayer reading
RetaliationPrioritize the largest incoming attackerA superior army is not immunity if you are already sending troops.
Very weakTarget below 15% of its own maximum troops, with an FFA strength boundA depleted bar can create a candidate before territory size changes.
VictimIncoming troops exceed 50% of the target's current troopsA player already under heavy attack may attract another Nation.
WeakestLowest current troops among adjacent enemiesThis is a local border comparison, not the weakest player worldwide.
IslandChoose among two nearest reachable candidates; 1/3 may pick the secondA continuous route matters, but the nearest coast is not guaranteed.

Target order changes by difficulty. Impossible starts with retaliation, Bots, and very weak targets; Easy gives nuked land and Bots earlier priority.

Bot attack concurrency is Easy 1, Medium randomly 1 or 2, Hard 3, and Impossible 100. This limit is not a promise that enough valid targets exist.

Defense Posts, structures, and placement

Responsive Defense Posts

A responsive Defense Post is never the first Nation structure. Easy does not build this response.

Medium uses a 50% gate and limits the front to one. Hard and Impossible require total incoming land troops of at least 35% of the Nation's current troops.

At that threshold, the requested count is ceil(incoming / current / 0.4). Gold, valid positions, and other checks can still prevent construction.

Sea attacks do not count toward this 35% structure branch. Smaller land probes still affect relation, retaliation, and other behavior.

Regular structure targets

StructureTarget ratioImportant boundary
Port0.75 per CityNeeds a valid shared water body and buildable shoreline.
Factory0.75 per CityOn a coast with Ports enabled, the ratio is multiplied by 0.33.
SAM0.15 / 0.20 / 0.25 / 0.30 per CityEasy through Impossible; placement scores protected structures.
Missile SiloNormally 0.20 per City; first uses 0.40Hard cap of three, plus enablement, Gold, space, and saving rules.

Targets use floor(cityCount × ratio). They are not a fixed build order or clock.

Above one structure per 1,500 tiles, the AI tends to upgrade instead of adding density. Candidate sites are sampled, then scored by terrain, inland depth, spacing, and coverage.

With at least 3,000,000 starting Gold, Hard or Impossible can try SAM first when Atom, Silo, and SAM are enabled.

At more than one Nation per 7,500 land tiles and no City, the first choice favors Port, or Factory when no shared water qualifies.

Ports, Warships, and naval counterplay

A Nation Port needs shoreline on water shared with another player. The ocean always qualifies; inland water needs another player touching the same component.

Except on Easy, an inland component below 3,000 water tiles is skipped. A visible coast therefore does not guarantee a Port.

The first regular Warship attempt also needs a 1/50 gate, a Port, no current Warship, Gold strictly above cost, and a valid water tile within 250 tiles.

Non-Easy Nations with a Port can react to a destroyed transport, captured Trade Ship, or incoming transport. The build gates are 15%, 50%, and 80% from Medium to Impossible.

A transport under 20 tiles from landing is considered too close for a new-build response. A friendly Warship or patrol within 90 tiles also suppresses another build.

Keep routes short, escort valuable transports, and watch Warship movement. None of those actions guarantees that the random build gate fails.

Alliances, embargo, and betrayal

When processing a bordering candidate, an active Nation alliance request first passes a 1/30 gate. A request created during spawn and handled on the first post-spawn tick is rejected.

Acceptance considers confusion, traitor status, threat, Team mode, relation, alliance counts, game time, and relative strength. Friendly relation alone is not a contract.

DifficultyEarly acceptance branchTeam extra refusal
Easy90% in first 5 minutes25%
Medium70% in first 3 minutes50%
Hard50% in first 3 minutes75%
Impossible30% in first minute100%

These values apply only if earlier checks have not returned. A traitor normally fails early, but 10% pass that rejection branch and can still fail later.

Hard and Impossible may betray an ally below 20% of its maximum troops when the ally's current troops are lower than the Nation's.

Medium may betray at 10× the ally's troops. Non-Easy may also betray a weaker traitor or its only bordering ally when the Nation has over three times the troops.

These are candidate rules inside the attack queue. Crossing one threshold does not trigger immediate betrayal.

Your embargo gives the Nation's relation toward you a one-time -20. Easy and Medium may auto-remove their embargo at Neutral, Hard at Friendly, while Impossible has no auto-remove branch.

Ordinary nukes and MIRV

Ordinary nuclear targeting can prioritize the largest incoming attacker, a crown holder, an ally-marked target, a hostile player, an FFA leader, or a strong Team.

Hard and Impossible skip candidate trajectories an enemy SAM can intercept. Impossible may instead try an Atom salvo or upgrade a useful Silo to at most level 5.

SAM coverage raises cost and changes candidate paths. SAM is not nuclear immunity.

MIRV requires an enabled weapon, a Silo, enough Gold, a target branch, and passing hesitation. Hesitation is 1/2, 1/4, 1/8, and 1/16 from Easy to Impossible.

MIRV branchEasyMediumHardImpossible
Individual land threshold75%65%55%40%
Team land threshold90%80%70%60%
City lead: minimum / ratio20 / 2.0×10 / 1.5×10 / 1.25×8 / 1.15×

Other MIRV branches include retaliation against a MIRV sender. Staying below the land threshold does not make a player safe from every nuclear branch.

After any Nation targets the same player with MIRV, Nations share a 300-tick cooldown for that target.

Three numeric scenarios

Hard Nation beside a 400,000-troop rival

In ordinary FFA, the Hard floor keeps 75% of that rival's troops. The Nation normally preserves at least 300,000 after an attack.

If the Nation is already under attack, the response branch can raise usable troops to at least total incoming troops. The 300,000 floor is not universal.

Defense Post pressure at 1,000,000 troops

Combined land attacks of 340,000 are below the 35% Hard/Impossible threshold. At 360,000, the desired count is ceil(0.36 / 0.4) = 1.

At 850,000 incoming, the formula asks for three. The Nation can still lack Gold or a valid tile, and the branch can block another regular building for that cycle.

Hard MIRV pressure

A player at 55% of individual land qualifies for Hard's victory-prevention branch. A city leader can qualify with at least 10 more Cities and a 1.25× lead over second place.

The Hard hesitation is still 1/8, and Silo, Gold, target cooldown, and other checks remain. Qualifying is not the same as being hit immediately.

Common failures and counterplay

Nation AI FAQ

Does a Nation always attack the weakest player?

No. Weakest is one local strategy among retaliation, Bots, ally assistance, traitors, victims, hostile players, islands, and other categories.

Can Easy attack a human?

Yes. Its general human check passes 25% of the time, and retaliation, traitor, HvN, and non-human paths have different rules.

Can I guarantee an alliance by improving relation?

No. Relation changes eligibility, while traitor status, threat, mode, alliance count, time, strength, and random gates still matter.

Will a Nation with a Port build a Warship?

Not necessarily. The regular first ship has a 1/50 gate plus Gold, Port, current-fleet, enablement, and placement requirements.

Does Impossible stop being random?

No. Its interval is shorter and its rules are stronger, but thresholds, sampling, hesitation, and build gates remain pseudo-random.

Are Nation coordinates fixed human spawns?

No. Manifest coordinates are nearby sampling anchors for Nations. Human spawning follows separate rules.

Sources and next reading