Zero Hour Reforged Download
Wiki

How the bots play

A skirmish bot plays by the fog of war and picks its counters from the same kill times as the unit matrix at the end of this page. Here is what each of its calls looks at, and where the three difficulties part ways.

The bot's clock

A bot does not think on every tick. The match runs 30 ticks a second, and each of the bot's jobs (placing buildings, training teams, scouting, spending, answering fire, getting out from under a superweapon) comes round on a count of ticks of its own. Each seat is set a few ticks apart from the next, so the bots in a match spread their thinking instead of all doing it at once.

How fast it reacts depends on what happened and on the difficulty. A unit taking fire is looked at within 2 seconds on Easy, two thirds of a second on Medium and under a quarter of a second on Hard. An enemy that has walked into its base and not fired yet is noticed within 10.7, 4 or 1.3 seconds. Whether a fight is lost gets asked every 2 seconds on Medium and every second on Hard; Easy never asks.

Every time on this page is as the in-game clock reads it. The game counts the bot's own times in game seconds, and every online match plays at one and a half times retail speed, so a bot that waits 6 game minutes moves at 4:00 on your clock. This page has done that sum for you. A skirmish played at retail speed stretches them back: there a game second and a clock second are the same.

What it sees

The bot knows about a unit while one of its own can see it, and about a building once it has seen it, because buildings do not walk away. A stealthed unit nobody has detected does not exist for it, wherever it stands. A bomb truck disguised as one of its enemies is seen; one dressed as its friend is not. Ranks and the map's start positions are on show to every player, and the bot reads those.

Getting hit is the one way it learns about something it cannot see. When artillery shells a bot's tanks from past their sight, the gun that fired goes on the bot's map with its reach and its strength, and stays there after the bot has lost track of it: 6.7 seconds on Easy, 13.3 on Medium, 26.7 on Hard. Everything else the bot decides reads that map, so a gun it has never laid eyes on can still turn a wave aside.

What it has not scouted, it does not know. Every bot scouts: one scout goes out every 50 seconds on Easy and every 30 on Medium, and Hard sends two every 17.

The influence map

Every bot keeps a grid over the map, one cell for every 60 units of ground, about a fifth of a tank's range. A cell holds one number: how much firepower the bot knows can hit that patch. To fill it, the bot takes each enemy gun it knows of and adds the gun's combat power to every cell the gun reaches. For nearly every unit, combat power is its price. Each veterancy rank adds a quarter, so a heroic tank, three ranks up, counts 1.75 times its price.

The reach is a flat disc with no fall-off. A cell at the very edge of a tower's range counts that tower as fully as the cell under its barrel. High ground stretches it: every unit of height a gun stands above a cell adds three units of range against that cell, up to double the gun's range. The game's weapons fire by the same rule, so the map is right about the tank on the ridge.

Nothing spreads and nothing fades. The map is thrown away and drawn again from what the bot knows, all match long, in rounds of 1.3 seconds on Easy and two thirds of a second on Medium and Hard. Hard keeps a second grid the same way for its own guns and its allies', so it can ask whether a patch of ground is theirs or ours.

Try it

A sketch, not the game

The idea on a 20 by 12 grid, drawn by this page with the game's rules. Your base is the square on the left, theirs the one on the right, and the lighter cells are a ridge. Pick what a tap does, then tap the grid. Tap a gun again to take it away, or drag it somewhere else.

A tower reaches 4 cells and stamps 2 on each; a tank reaches 2.5 cells and stamps 1. Each level of ridge a gun stands above a cell adds a cell of reach toward it, never more than double.

Under each road

What reads the map

The attack road, on Hard. A skirmish map marks up to three roads to each base: the centre, the flank and the back door. The bot adds up the cells under each road's waypoints and keeps the road its script asked for unless another is quieter. An earlier version aimed the attack at the richest cell on the map, the enemy's money. It walked past his army, finished 7 to 9 and lost twice as many units, so the roads replaced it.

The hurt unit, on Hard. A unit under 35% health, standing where the enemy's number beats its own side's, walks toward home to the first cell nothing covers and one cell past it, then goes back to its team. It stops short of home on purpose: on a big map the walk home crossed the very ground it had been pulled out of.

Kiting and climbing, on Hard. A unit that outranges what is closing on it, by half again when that thing can move, steps back to the edge of its own reach and fires from there. A rise ten units higher than where it stands, within 110 units of it, is worth thirty units of range, and it climbs.

Being shelled, on every difficulty. Each unit hit lately answers the gun that hit it. It shoots back if it can reach. It charges the gun when what stands near it is worth enough against what covers the gun's spot. Otherwise it leaves for ground the map has quiet and holds there.

The calls it makes

Each call reads a short list of things and nothing else. The numbers for each difficulty are in the table further down.

Which enemy to go after

The nearest enemy base, measured to the middle of its buildings, counted nearer if he holds a big share of what the bot can see, or if he is another computer that has picked this bot as its own target. It counts farther if another computer is already on him; a bot with the Supportive role reads that one the other way and piles in. A player who has lost every unit or every factory counts nearer still. EA's code pushed him half the map away, which meant ignoring the one you were about to finish.

What to train

The skirmish script's team list comes first. Each candidate team is scored against the enemy army in sight, unit against unit, from kill times like the ones in the matrix below; Easy ignores the score, Medium gives it half its weight and Hard all of it. Every 6.7 seconds Hard sets the enemy army it remembers against its own, finds the kind of enemy unit with the most of its worth unanswered, and has every idle factory that can train the best answer to it. A unit counts as an answer when it trades about 1.7 times better, money for money.

When to attack

No attack before 4:00 on Easy, 3:20 on Medium and 2:40 on Hard, nor before the side's drop zone or black market stands where it has one. Easy sends each team the moment it is ready. Medium does the same unless the enemy outmatches it, and then parks its teams at a staging point; Hard parks them there until it is ahead. Parked teams leave together once they are worth enough or have waited long enough. Artillery that goes with a wave keeps 80, 120 or 160 units behind its front unit, so it is never the first thing your defence meets.

When to pull back

It times the fight both ways: how long its force lasts against what is shooting it, over how long it needs to kill that. Above 1 it is winning. Medium pulls single units out once the figure drops under 0.35. Hard pulls units out under 0.5 and breaks off whole teams. Easy never retreats.

How it spends

It keeps a bank sized to its own measured income: 80 seconds of it on Easy, 40 on Medium, 20 on Hard, and never less than 6,000, 5,000 or 4,000. Under that it saves, buying only an upgrade whose units are worth 4, 2.5 or 1.5 times its price, and none before 8:00 on Easy, 4:40 on Medium and 2:00 on Hard. Over it, the bar for an upgrade halves and the rest of the money goes on units. Another factory of a kind goes up only once every one it already has has stayed busy.

Where to fire a superweapon

It scans for the spot where the blast is worth most: the price of everything inside it, with the economy counted again on top: factories, power plants, supply centres, black markets, hackers and the like. Those count nothing extra on Easy, twice their price on Medium and three times on Hard. Armed units go the other way: their combat power is added twice over on Easy and once on Medium, and Hard leaves the army out unless it knows none of the target's buildings. It remembers its last four shots, so the next strike does not land in the last crater. Before each superweapon it wants 3, 6 or 12 finished base defences standing.

Taking more of the map

Medium and Hard take supply docks on their own, and Hard defends them. Later the bot founds whole bases on start positions nobody started on: one, from 13:20, on Easy; two, from 8:00, on Medium; every empty one, from 4:40, on Hard, nearest first. Each gets a war factory, then power, guns and a supply centre of its own.

Giving up

It types GG and surrenders, handing what is left to an ally still in the match, once it can no longer rebuild, or once it is worth under 20% of its strongest enemy on Easy, 12% on Medium or 8% on Hard. That has to hold for 20, 30 or 40 seconds, and it never happens before 4:00, 5:20 or 6:40.

Roles and personalities

Two things shape a bot's play on top of its difficulty. The personality is chosen in the lobby, seat by seat, beside the difficulty. The role nobody picks: when the match starts, one bot in five on average comes out Aggressive and the rest Defensive. A personality that brings a role of its own replaces that draw, and the Supporter personality is the only way to a Supportive bot.

A personality works on top of the difficulty. It stretches or shortens the first attack, the size of a wave, the bank, the retreat threshold, the counter-building weight and when upgrades start, each as a share of what the difficulty sets. A Hard Turtle still looks at a unit under fire every quarter of a second, and an Easy Rusher still rushes later than a Hard one.

The three roles

RoleHow it plays
AggressiveCheap early units and few defences; it commits to a fight with less.
DefensiveBase defences first. It waits for a bigger army and counter-attacks.
SupportiveGoes after its ally's target, answers calls for help and shares the map.

The lobby's personalities

PersonalityWhat the lobby says it does
NormalPlays exactly as the computer always has.
AttackerAttacks early and often with smaller waves, spends its money as fast as it comes in and builds few defences.
TurtlePuts up a defence line early and guns at the chokepoints, attacks late with big waves and pulls back sooner when it is losing.
EconomistIncome and upgrades first, a later first attack, and its spare money goes to the poorest ally.
Air ForceBuilds airfields and sends its aircraft out on sorties, and turns away from them when your anti-air is heavy.
RusherThrows everything into one attack, three minutes in on Hard and four and a half on Easy, with almost no defences. After it, it plays as an Attacker.
RaiderSends small groups of its fastest vehicles around your army at your gatherers and workers, from the third minute on Hard and the fifth on Easy.
TechSits behind its defences and races to the superweapon, then plays as the normal computer once it stands. Turns its powers on whoever hits an ally.
InfantryAn infantry army trained from its barracks first, with its waves carried in transports.
ArmorA tank-heavy army that waits longer to gather and attacks in fewer, bigger waves.
SneakyFavours units that turn invisible, spends its general's points on stealth first and comes in by the flanks and the back door.
OpportunistGoes after the weakest enemy in sight, and after whoever is already fighting someone else.
SupporterJoins its allies' attacks and sends its idle army to clear enemies out of an ally's base.
CounterReads your army harder and builds what beats it, even on Easy.
RandomOne of the personalities above, drawn when the match starts. Never Normal.

Random draws from the other thirteen. The lobby gives the Rusher's and the Raider's times in game minutes; on the clock the Rusher goes at 3:00 on Easy and 2:00 on Hard, and the Raider starts at 3:20 and 2:00.

The three difficulties side by side

The lobby lists them as Easy AI, Medium AI and Hard AI. Income aside, nothing here multiplies anything: the difficulties differ in how often the bot looks and in what it does with what it sees.

What Easy Medium Hard
Asks whether a fight is lost never every 2 s every 1 s
Scouts one every 50 s one every 30 s two every 17 s
Draws the influence map in 1.3 s rounds in 0.67 s rounds in 0.67 s rounds
Picks its attack road by the map no no yes
Kites, climbs, pulls hurt units out no no yes
Weight on building counters none half full
Remembers your army and trains its answer no only as Counter yes
Focus fire no yes yes
Retreats never single units, under 0.35 units and teams, under 0.5
First attack, not before 4:00 3:20 2:40
Parks attack teams to go together never only when outmatched until it is ahead
A parked team waits for company while worth under does not park 2,000 4,500
Bank it keeps 80 s of income, at least 6,000 40 s, at least 5,000 20 s, at least 4,000
Upgrades, not before 8:00 4:40 2:00
An upgrade has to be worth, under the bank target and over it 4 and 2 times its price 2.5 and 1.25 times 1.5 and 0.75 times
Looks at which of its units are being hit every 2 s every 0.67 s every 0.23 s
Rest of the group that answers with a unit hit none within 150 within 300
Charges a gun once what is near is worth 0.6 times its cover 0.8 times as much
Keeps a gun it lost sight of on the map 6.7 s 13.3 s 26.7 s
Looks for enemies parked in its base every 10.7 s every 4 s every 1.3 s
Helicopters leave a superweapon's target after 2.2 s after 1 s after 0.23 s
Finished defences per superweapon 3 6 12
Takes supply docks on its own no yes yes, and defends them
Bases away from home one, from 13:20 two, from 8:00 every empty start, from 4:40
Gives up below this share of the strongest enemy's worth 20%, held 20 s, from 4:00 12%, held 30 s, from 5:20 8%, held 40 s, from 6:40
Income 1.5 times, up to 3 1.5 times, up to 3 1.5 times, up to 3

Its one bonus

A bot earns more than you from the same supply pile. Everything it earns by playing is multiplied by 1.5, on every difficulty. The score screen and its charts count the money before the bonus, so a bot's income there reads like a player's.

When it falls behind, the bonus climbs. Every 20 seconds the bot weighs its side against the strongest enemy side, everything each player has standing at its price plus the bank, averaged per player, and moves its bonus up to 25 points toward what that says it is owed. Worth three quarters of the enemy, it earns 2 times; half, 2.5 times; a quarter or less, 3 times, the ceiling. Once it catches up, the bonus walks back down to 1.5 the same way.

That is all the help it gets. It sees only what its units see, and no other number on the difficulty ladder is a multiplier.

50%

It is not behind, so it earns the plain 1.5 times.

The unit matrix

This is the arithmetic the bots pick counters with. For every pair of units the game works out, from what each one's weapons do through the other's armour, how long one alone needs to kill the other, and the reverse. Pick your side and theirs. Each cell says how many times faster your unit kills theirs than theirs kills yours.

Switch to same money and each figure is scaled by the two prices, which is how the bot reads it: a unit at twice the price has to kill twice as fast to break even. The bot stops counting at 16 times either way, and the colours stop there too.

Point at a cell, or tap it, for the story behind the number.

Yours, against theirs
Theirs kills faster Yours kills faster

∞: only yours can do damage. 0: only theirs can. A dot: neither can.

Read it with the limits the bot reads it with. It is one unit against one, standing in range on flat ground. Nobody micros and no crowd joins in, and each fires its best weapon at that target and nothing else. A unit that loses every cell here can still win the fight its army wins for it. The bots know that much: the matrix is one input to what they train, beside the script's list and what they have seen of your army.

Download launcher