Adam K Dean

Notes on software, systems, engineering, and things

5.7 Codex Waves

Codex Thousand ended with an empty map: every deposit mined out, nothing to gain from growth, and nothing to gain from conquest either. The change that came out of it is ore waves. Every 40 ticks a new ore cloud forms at a random place on the map, and every planet inside it, owned or not, gains a fresh deposit. Motherlodes, the richest phenomenon, now regrow their deposits too. The idea is uneven pressure: one region suddenly rich while the rest runs down.

Codex Waves is the first game with waves, and the first with every rule change of this chapter: one faction per empire, the size cost as a share of income (5.5), and the score that counts planets over fleets (5.3). Twelve Codex agents, four each of terra, sol and luna at low and medium effort, played 400 ticks of 30 seconds on an 80 by 60 map with 84 planets.

The outage, and the rewind

At 07:19 the Codex usage limit ran out, in the middle of this game and Codex Marathon. From tick 177 to tick 215 every agent turn failed. The Marathon was left to finish as it was. This one was rewound.

The server stores the full state of an arena after every tick, so an arena can be forked at any stored tick into a new arena, with the same players, the history up to that tick, and the replay, log and turn records intact. Codex Waves was forked at tick 177, and the same twelve agents played the fork from there to tick 400, each with its own notes and login. Everything in this post is the fork.

One thing couldn't be rewound. Each agent's private notes file isn't part of the game state, and the original run had played on to tick 230 before it was stopped. So each agent started the fork with notes that described about fifteen ticks that, in the fork, hadn't happened yet. Nobody seemed confused by it, but the agents did have a glimpse of a future.

Result

Measure Codex Waves
Battles 14, all between ticks 99 and 117
Planets captured 7
Wars declared 9
Colonies founded 72 (every planet owned by tick 60)
Messages 1,749
Faction board posts 1,595
Ore waves 10

Grey Domain (terra on medium effort) won with 2,391 points and 18 planets, well ahead of Sigma Supremacy (terra on low effort) on 1,629. Terra's mean place was 4.3, sol's 6.5 and luna's 8.8. The two luna empires on the bottom finished with no planets at all.

Line chart of planets per empire over 400 ticks: the map fills by tick 60, Grey Domain jumps from 12 to 18 planets between ticks 102 and 115 while Tau Choir and Golden Crown fall to zero, and every line is flat after tick 118

Twenty ticks of war

All the fighting in this game happened in twenty ticks, long before the outage. Grey Domain took four planets from Golden Crown (luna on medium effort) between ticks 102 and 113, then two from Tau Choir (luna on low effort) at ticks 114 and 115. Risen Host (sol on medium effort) took one more from Tau Choir at tick 118. Golden Crown and Tau Choir kept playing for another 280 ticks with fleets and no planets, scoring 160 and 168.

After tick 118 there wasn't another battle. The only event that looked like war came at tick 285, when Silent Theocracy declared war on four empires, all of them partners in its own faction. Nobody fired a shot.

The waves

Ten waves formed, one every 40 ticks. Every one but the first landed on planets that were already owned.

Tick Ore Planets inside
40 voidstone 6: Sigma Supremacy 2, Quell Realm, Silent Theocracy, Radiant Commonwealth, and one unowned
80 iridite 5: Sigma Supremacy 3, Risen Host, Marr Oligarchy
120 pitchblende 1: Marr Oligarchy
160 voidstone 6: Silent Theocracy 2, Risen Host 2, Grey Domain, Radiant Commonwealth
200 iridite 3: Silent Theocracy, Sable Principality, Grey Domain
240 chalcite 2: Grey Domain, Sigma Supremacy
280 cobaltite 4: Sigma Supremacy 2, Risen Host, Marr Oligarchy
320 iridite 4: Grey Domain, Quell Realm, Sigma Supremacy, Marr Oligarchy
360 iridite 4: Sigma Supremacy 3, Marr Oligarchy
400 iridite 1: Sigma Supremacy (on the last tick)

The one unowned planet in the first wave was colonised by Marr Oligarchy eight ticks later. That is the only colony a wave produced. Every other wave deposit went to whoever already owned the planet, and was mined to nothing, most within about 40 ticks. No wave planet changed hands, and no battle was fought in a wave cloud.

This map also had no motherlodes: its eleven phenomena were five pulsars, three nebulae and three nurseries. So the regenerating motherlodes never came into play.

The god view of Codex Waves at tick 400: twelve empires over the whole map, Grey Domain in amber spread across the north-east and centre, the last iridite wave cloud near the centre

Two blocs of six

The factions settled fast. By tick 20 every empire was in one of three factions. The smallest, the Harmonic Accord, was Tau Choir, Golden Crown and Indigo Frontier: the two empires Grey Domain had stripped, and a neighbour. With two of its three members stripped of their planets, it couldn't pay its fleet upkeep for several ticks after 177, voted to dissolve at tick 201, and all three joined the Stellar Concord.

From then to the end the map was two blocs of six: the Stellar Concord in the west, and the Accord of the Gathered Stars, Grey Domain's faction, across the centre and east with 55 of the 84 planets.

The faction map of Codex Waves at tick 400: the Stellar Concord in light blue-violet across the west third of the map from top to bottom, with a few planets in the south centre; the Accord of the Gathered Stars in a darker violet across the centre and east, with outposts in the west

Line chart of factions and memberships over 400 ticks: twelve memberships by tick 20, three factions until tick 201, then two

Fleets grew for the whole game without a fight, from 862 ships at tick 100 to 4,669 at tick 400. Grey Domain led with 1,153.

Line chart of ships per empire over 400 ticks: steady growth with no losses after tick 118, Grey Domain highest at 1,153

The messages

The agents sent 1,749 messages and 1,595 board posts. As with the Marathon, Claude went through all of them and checked what was said against the order log.

The war nobody declared

Grey Domain and Golden Crown each declared peace to nearly every empire they met, but never to each other, so they stayed at the default stance of war from first contact. One message passed between them before the fighting, a claim:

Grey claims s52 at (31,51)... Please respect our claim.

Grey Domain to Golden Crown, tick 44

The first shot was Golden Crown's. At tick 97 it ordered a fleet to attack Grey's, and two more fleets joined the next tick; it lost nine ships at Draorqua on tick 99. Then Grey Domain took four of its planets in eleven ticks. Golden Crown's appeal to its faction left out who started it ("my garrison was destroyed and defence is zero. Please send forces"), and it told an ally "Confirmed Grey declared war and took Ixtormu". Grey had never declared anything.

The terms were short:

I will consider a lasting peace if Golden cedes both Ixtormu and Tiska.

Grey Domain, tick 112

Your terms are unacceptable.

Golden Crown, tick 113

I recognize Grey control of Ixtormu and Tiska and accept peace on that basis.

Golden Crown, tick 114

Tau Choir, Golden Crown's faction partner, declared war on Grey at tick 108 and lost its garrison the next tick. Then Risen Host joined in, and the two divided Tau's worlds between them on Risen's faction board:

Tau declared war on Grey; Risen joins the campaign... advances on undefended nursery Venselgo... Grey can take Tiska and western Tau worlds.

Risen Host, faction board, tick 111

Grey's own posts call it "the agreed western division". At tick 118 Grey promised to "hold its present borders and make no further attacks", Risen promised "no pursuit or further captures", and both kept their word: there wasn't another battle.

Nobody fought for the victims. The third member of their faction moved a garrison to Venselgo the tick after it fell, and pulled it back three ticks later. Help came as energy from faction treasuries. The neighbours' answer to Grey was insurance, not rescue: four of them offered Grey pacts within twenty ticks, and one tracked Grey's fleet on its board for the rest of the game ("Grey has 70 corvettes at Tiska... no hostile stance observed").

A war declared on four friends, by a bug

At tick 285 Silent Theocracy declared war on four empires, all partners in its own faction. Its turn summary explains it: "Declared war on the four empires already at war with us." They weren't.

Joining a faction sets peace between the members, but the game sent no stance notice when it did, and an empire's brief showed another's stance from the last notice it had received, or war if there wasn't one. So two empires that joined the same faction without ever declaring peace to each other each saw the other as at war, for good. Silent Theocracy had never had a notice from exactly those four. Seven ticks earlier it had tried to "request peace" from them, which did nothing because its own stance was already peace. Then it gave up and matched what it thought they had declared.

The same bug was behind Risen Host asking Silent four times to "clear your old war stance", and Golden Crown telling Indigo Frontier "our faction immunity is holding despite your declared war". It is fixed now: joining sends a stance notice for every stance it changes. Nobody reacted to Silent's declarations at all, and thirty ticks later the same four empires voted it 4,000 energy from the faction treasury.

The west balances the east

By tick 190 the six-member Accord of the Gathered Stars held most of the map. Amber Marches made the case for a counterweight:

Six western members could balance eastern six.

Amber Marches to Sable Principality and Quell Realm, tick 195

Quell Realm read the agent guide, found that a dissolved faction's fleets go back to their commanders, and the Harmonic Accord dissolved at tick 201. Its three members joined the Stellar Concord within two ticks, every consent given by message.

Waves were news, not prizes

The agents talked about the waves, 47 messages and 167 board posts, but mostly to report where one had landed. Early on some read them as new land: "colony ships remain dispersed for the t80 wave" (Sable Principality, tick 72). There was no new land to take; every planet had an owner by tick 60. Only owners could see a wave's deposits, so the precise reports came from the empires that gained:

Wave120 is pitchblende centre52,4 radius9: Delgo gained228 ore.

Marr Oligarchy, tick 120

Wave ore flowed into faction treasuries as minerals, but no trade between empires was ever priced in it.

Terra, sol and luna

Measure terra sol luna
Messages per agent 202 162 73
Board posts per agent 206 157 36
Mean length (characters) 148 224 156
Messages that say thanks 30% 27% 6%
Declarations of war 0 1 8 of 9
Failed load orders 3 of 47 1 of 40 12 of 23

The pattern from the Marathon held. Terra talked most, declared no wars and won: first, second and fourth. Luna declared eight of the nine wars and lost two empires' worth of planets. Sol, new in this game, wrote the longest and most polite messages, with "please" in 57% of them. Part of luna's low volume is lateness: it played only about three turns in four.

Promises

Claude found no deliberate deception. The errors were confusion, and each was owned up to. Tau Choir offered the same 24 copper to three empires while holding none, announced "routing 24 copper to Kamuven now" on the tick its load failed, and withdrew; "You twice offered copper and twice withdrew", Amber Marches noted. Tau then told Quell its titanium was on the way and asked for its own side of the deal to be "treated as settled"; the load had failed, and Tau never loaded anything successfully all game. Grey Domain, meanwhile, delivered every unit of copper it promised Amber, in four loads, through the middle of its war.

The talk fades

877 messages in the first 100 ticks, 537 in the next, then 276, then 59. The last message was sent at tick 362. The boards became status logs with tick stamps ("Tick 234: Deposited 20 energy..."), and the Gathered Stars ran its treasury in arithmetic:

~3278 at328. Through400 needs ~5717, so remaining shortfall about2440. Propose a 2500 bridge near t365.

Marr Oligarchy, faction board, tick 328

Claude's summary: the only real war in this game started between two empires that never got round to declaring peace on each other.

Turn times

Turn times per agent over the game: terra medians about 13 to 15 seconds, sol about 17 to 21, luna about 24 to 28 with many turns past the 30-second tick

A 30-second tick suited terra (medians of 13 to 15 seconds) and sol (17 to 21), but not luna, whose medians were 24 to 28 seconds. Luna was late, timed out or failed on about half its turns; terra on about 4%.

The whole game on the god view, 8 ticks a second:

What it showed

Waves didn't do what they were for. They were meant to make one region suddenly worth fighting over. But by the first wave at tick 40 the map was nearly full, and by tick 60 it was full, so every wave landed on someone's planets and simply made that empire richer. A neighbour's new deposit was never worth a war.

The war that did happen came early and from one empire: Grey Domain took six planets from the two weakest neighbours and won the game on them. After that, nothing. Twelve Codex agents with every chapter 5 rule spent 280 ticks building fleets they never used.

This is where chapter 5 ends. The rules now give factions real benefits and real costs, make resources scarce and uneven, and let agents trade, pay for pacts and pool research, and the Codex agents use all of it. What they don't do is fight, unless fighting is the only way up. Chapter 6 makes it that: points for every capture and every battle won, a bonus for your share of all planets and ships, a rank in every brief, and a knockout where only the top half survive.