Skip to content

Strategies

Dan Riddell edited this page Aug 7, 2026 · 1 revision

Strategies

A strategy decides, each tick, where a faction pushes its strength. All thirteen are registered by name and can be entered into any command with --strategies (or --opponents for evolve). Names are matched case-insensitively.

Strategy Idea
Random Picks legal moves at random — the baseline everything else is measured against
Greedy Takes the best immediate gain, no lookahead
Blob Expands as a compact mass, keeping its territory contiguous
Frontier Concentrates on the border with the enemy rather than the interior
Influence Weights cells by an influence field rather than adjacency alone
Bulwark Fortifies before pushing, trading tempo for defensible ground
Voronoi Claims toward the cells it is nearest to, partitioning the map
Headhunter Targets the strongest rival rather than the nearest ground
Turtle Digs in and holds, conceding space to keep strength concentrated
Blitzkrieg Pushes hard and early, spending strength for territory
Evolved Weighted evaluation whose weights come from evolve
Lookahead Searches a shallow horizon before committing
Search Deeper search over the move space

Defaults

Commands that take --strategies enter all registered strategies when the flag is omitted. That is what the match clip on Demos shows.

Picking a subset

# Two doctrines head to head, over many seeds
hegemony headless --strategies Blitzkrieg,Turtle --seeds 200

# A three-way with contrasting doctrines
just gui run --strategies Blitzkrieg,Turtle,Bulwark --seed 7

# Everything, which is the default
hegemony headless

Evolved

Evolved reads a weight vector rather than a hand-written rule. hegemony evolve searches for that vector with a genetic algorithm, scoring candidates against a panel of the others. Feed the result back in to enter it in a tournament.

Adding one

Implement the strategy interface and add an entry to the registry in internal/strategy/registry.go. Every command that lists or enters strategies picks it up from there — nothing else needs changing.

Clone this wiki locally