Audamir

part 42

The opponent of the original: decisions, leaders and strength

The original has one opponent with no levels. Its nine steps of decision contain one error: the "leader" is chosen by a wrong sort. Measurements show its strength against itself and on the seat of a human, the first move and the stalemate.

· 13 min read

The original has one opponent, without levels. Each time the computer attacks, nine steps are passed through, and one of them is faulty: the rule of the "leader" sorts the players wrongly. This article goes through those steps, measures how strong the opponent is against itself and on the seat of a human, and says what follows for the game Audamir. Everything is a measurement on the description, not on the game. The opponent was not measured against a person; how strong it is for a person is found out only by playing.

The opponent: a random attacker with one rule

The artificial intelligence is one, without levels. Each time the computer attacks, this procedure runs:

  1. Count the dice on the map for each of the eight players (a player without territories has 0) and their sum.
  2. Determine the "leader" (below).
  3. Dominant player: if some player has more than two fifths of all dice on the map, he is dominant. It is counted from the dice, not from the territories.
  4. Candidates are pairs (an own territory of the player on the move with more than one die, a neighbouring foreign territory).
  5. If a dominant player exists, only the pairs in which he owns the source or the target remain. The others therefore stop attacking each other and attack only him; he himself attacks anybody. A player who does not border him has nobody to attack and his turn ends (this is a consequence of the rule, not a separate claim of the description).
  6. A pair is discarded if the target has more dice than the source.
  7. On a tie of dice the pair passes if the player on the move is the "leader", or if the owner of the target is the "leader", or if a random number comes up that has a probability of 0.9. Otherwise it is discarded. If the target has fewer dice than the source, the pair always passes.
  8. If there is no candidate, the turn ends (followed by the reinforcement).
  9. Otherwise one pair is chosen from the candidates uniformly at random, without weights and regardless of the chances; the attack is carried out and the procedure repeats from the beginning. The number of attacks is not limited.
The decision of the opponent of the original in stepsFlow diagram of the decision of the artificial intelligence of the original in nine steps. A dominant player has more than 2/5 of the dice. On a tie of dice the pair passes with probability 0.9 or when there is a leader; a discarded pair does not stay. The turn ends when there is no candidate.Computer's turn1 · Dice and the leadersum of the dice of each of the 8 players;the "leader" comes from the sort of 0 to 74 · Candidatesown territory with more than one dieand a neighbouring foreign territory3 · Dominant player?someone has more than 2/5 of all diceyes: 5 · only pairs in which he isthe source or the target6 · Target has more dice than source?7 · Same number of dice as the source?7 · Leader, or a chance of 0.9?the leader is the player on the move or the ownerof the target; otherwise a chance of 0.98 · At least one pair left?9 · Random attackone pair chosen at random, without weights;then repeat from step 1noyesyesyesyesdiscard the pairnodiscard the pairnoEnd of turnfollowed byreinforcementnostepquestiondiscarded
One decision of the opponent according to the description of the original. Steps 1 to 5 are over the whole map, steps 6 to 8 over each pair of candidates, and step 9 chooses one of the pairs that are left. A solid frame is a question, a dashed frame a discarded pair.

The opponent therefore does not know the chance of winning, the connectedness of groups or the size of territories. It knows only that it does not attack a stronger one, that it attacks an equal one almost always, and that when somebody holds more than two fifths of the dice, the others fall on him. This is an estimate that in practice it is a random attacker with the rule "do not attack the stronger one"; how good it is could not be read from the code, and that is why it was measured (the results are below).

The "leader" that is not a leader

The dominant player has a rule with a threshold of 40%. But the "leader" is chosen by a different procedure, and that one is faulty. The artificial intelligence keeps an array of eight numbers, at the start 0, 1, 2, …, 7 (all eight indices, not only the players in the game). Then for every pair of positions i < j it compares the numbers of dice of players i and j, and **if the number of dice of player i is strictly smaller, it swaps the elements i and j of the array of eight numbers**; the numbers of dice do not change. The result is always a permutation of the numbers 0 to 7, but it is not a sort by dice. The "leader" is the player whose element stayed at the start of the array (value 0). It seems the author wanted to sort the players by dice; he sorted wrongly, and the "leader" is often not the one with the most.

Dice of players 0 to 7"Leader" by the procedureHas the most dice
5, 3, 8, 2, 0, 0, 0, 0player 1 (3 dice)player 2 (8 dice)
6, 6, 2, 2, 9, 9, 0, 1player 2 (2 dice)players 4 and 5 (9 dice)
0, 12, 0, 9, 4, 0, 7, 3player 1 (12 dice)player 1 (12 dice)
1, 2, 3, 4, 5, 6, 7, 8player 7 (8 dice)player 7 (8 dice)
8, 7, 6, 5, 4, 3, 2, 1player 0 (8 dice)player 0 (8 dice)

The table shows five of the six examples from the description; the sixth (eight equal values) gives player 0 as the "leader". All six were recalculated by hand and checked by a script, and while writing this article they were recalculated once more with a separate script: they came out the same. The effect of the error is, by the shape of the rule, rather small, but its size was not measured: the "leader" decides only about pairs with an equal number of dice, and it changes their chance from 0.9 to 1.0.

What the game does not have

The original does not have: surrender, agreement, a draw, a limit of rounds, detection of a stalemate, a setting of difficulty or of rules (only the number of players) and, as already noted, a seed: the same game cannot be repeated.

A stalemate (a situation in which nothing changes, because nobody wants to attack) is according to the description something to expect in practice; that was a guess. It was measured in games where the artificial intelligence of the original was played by every player: in 0.3 to 0.7% of them the game was not finished even within 300 rounds (TUNING §44.5, tribes.js --strength; see below). A stalemate is therefore possible, but rare.

How strong the opponent of the original is

The opponent of the original is one level, and the game Audamir has three. It could be measured like this: an AI of level 1, 2 or 3 plays the seat of the human (seat 0), and all other seats are played by the opponent of the original. The AI behaves the same towards everybody; the maps are the same 300 for every level (tribes.js --strength --games 300, TUNING §44.5). A win is a win of seat 0; the defeat of the human ends the game at once, as in the original.

Playersfair shareAI level 1AI level 2AI level 3
250%13.0% (0.26×)49.3% (0.99×)53.0% (1.06×)
425%15.3% (0.61×)43.3% (1.73×)60.0% (2.40×)
714.3%12.7% (0.89×)34.7% (2.43×)50.7% (3.55×)
812.5%10.7% (0.85×)27.0% (2.16×)45.7% (3.65×)

(In brackets the ratio of wins to the fair share.)

AI levels of the game Audamir against the opponent of the originalRatio of the share of wins of the AI on the seat of the human to the fair share, the opponent of the original on the other seats. Level 1: 0.26, 0.61, 0.89, 0.85; level 2: 0.99, 1.73, 2.43, 2.16; level 3: 1.06, 2.40, 3.55, 3.65 with 2, 4, 7 and 8 players.0×1×2×3×4×0.260.991.062 players0.611.732.404 players0.892.433.557 players0.852.163.658 playersAI level 1AI level 2AI level 3fair share (1.0×)
AI levels 1, 2 and 3 on the seat of the human against the opponent of the original on the other seats: the share of wins over the fair share (1.0 = as strong as the opponent). 300 games per cell, the same maps for each level (tribes.js --strength --games 300).
  • In a duel of two players the opponent of the original is about as strong as the AI of level 2: level 2 wins 49.3% of the fair 50, level 3 53.0%. The AI of level 1 loses (13% of wins).
  • With 4 to 8 players it is weaker: level 2 wins 1.7 to 2.4 times its share, level 3 2.4 to 3.7 times. Level 1 still loses (0.61 to 0.89 of its share). The opponent of the original is therefore roughly at level 2 in a duel, and between levels 1 and 2 with more players.
  • Why it is what it is: it is a random attacker with the rule "do not attack the stronger one", which is exactly what a level between 1 and 2 would do (TUNING §44.5). It does not stop the leader at the top: the rule of two fifths only diverts the others from attacking each other.

First move, fairness, length and stalemate

The advantage of the first move in Tribes is large only in a duel of two players: the starting player wins 79.6% of 299 games, and it disappears from four players on: 23.4% with 4 (fair 25), 12.7% with 8 (fair 12.5), and with 7 players the starting player wins less than its share (9.7% of 298 games against 14.3%).

First-move advantage in TribesShare of wins of the starting player when all seats are played by the opponent of the original: 2 players 79.6%, 4 players 23.4%, 7 players 9.7%, 8 players 12.7%. The fair share is 50, 25, 14.3 and 12.5%.0%25%50%75%100%5079.62 players2523.44 players14.39.77 players12.512.78 playersfair sharestarting player
The share of wins of the starting player when all seats are played by the opponent of the original: 2 players 79.6% (299 games), 4 players 23.4%, 7 players 9.7% (298 games), 8 players 12.7%. The fair share is 50, 25, 14.3 and 12.5%. (tribes.js --strength --games 300.)

A game that does not end is rare: in 0.3 to 0.7% of games of the original against itself it was not finished even within 300 rounds, against the AI opponents of the game Audamir in 0 to 1.7%. A game against them lasts 10 to 13 rounds with two players and 20 to 33 with four to eight (level 3 prolongs it); between the seats of the original 29 to 42 rounds.

Tribes and the field of the Principalities with the same AI on all seats (tribes.js --compare --games 150, played to a winner): a game in Tribes lasts comparably long as on the field (close medians; the mean number of rounds is 1.0 to 1.2 times that of the field with 2 to 4 players and 0.7 to 1.0 times with 8), and a stalemate is just as frequent: the limit of 300 rounds is reached by 9.3% of games of level 3 in Tribes (with 7 and 8 players), and by 10.0% and 14.7% on the field (the war of full stacks from DESIGN §39, which Tribes cannot end, because they do not have the offer to end on points). The differences between the columns are mostly noise: with 150 games per cell the error is 3 to 4 points.

When Tribes are counted: points, pace and analysis

A win in Tribes is counted (except the daily challenge). Audamir derives the points from the difficulty of the setting, which is measured by the AI opponents. Tribes do not have such a setting (the opponent is one level, outside levels 1 to 3), and so a win is one number for each number of players (TUNING §45). The AI of levels 2 and 3 play the seat of the human; the other seats are played in the Principalities by the preset Normal and in Tribes by the opponent of the original (2,400 games per cell). To the points of the Principalities 8 points are added per unit of change of the chance to win in the logarithm of chances (negative if Tribes are easier for the AI). The par is the 40th percentile of the rounds of won games. The table shows the shares of wins of AI levels 2 and 3 (in the Principalities → in Tribes), the points of the Principalities (Pr.) and of Tribes, and the par in rounds.

PlayersAI 2, %AI 3, %changepoints Pr.points Tribespar
251.5 → 52.555.4 → 55.9−0.0379797 (the formula holds 8)
335.8 → 48.451.0 → 59.9−0.44898514
424.3 → 46.048.1 → 57.2−0.67938818
520.6 → 38.646.5 → 53.8−0.59979221
616.9 → 35.243.5 → 51.5−0.65999424
714.8 → 31.840.2 → 49.2−0.681019625
813.2 → 27.940.6 → 48.5−0.631039826

For the AI, Tribes are easier than the Principalities, except in a duel, and the more players, the more so. The points follow this: with two players they are the same, from three on 4 to 5 fewer; a win with 7 players has 96 points, with two 79. The error of the table is about a point or two (TUNING §45.2); from the table about the opponent upwards it differs by at most 3.2 points, within the error of 300 games. It is a table for the AI, not for people.

Pace. A win pays three quarters of its score in experience (factor 0.75) and the Golden Dice at the full value of the score; there is no free box of the Golden world. node tools/core/xp.js prints for Tribes 506, 384, 330, 307, 284, 279 and 278 experience per hour with 2 to 8 players. The documentation of the game compares this with the Principalities: on the island 316 and on the field 278 an hour, and the band of the Principalities is 225 to 800. Tribes are therefore the fastest with two players, and from six players on they are at the level of the field. Minutes of a round were not measured, so the pace is an estimate.

Analysis of the game. The chance of winning from the analysis of a game of Tribes is unbiased (average prediction 52%, result 50%), but less sharp: Brier 0.1039 against 0.0625 in the Principalities (56 games), skill 0.584 against 0.748; a prediction of 80 to 90% came true in 57% of cases. The cause was not looked for. A hypothesis, not evidence: the opponent of the original attacks at random, so a leading position of the representative can be reversed by a run of lucky attacks. What the analysis says about a game of Tribes must be read with a wider margin than in the Principalities.

What I take from it

  • Reading code is not the same as running it. A description from reading is evidence of what the code does, not of how the game is played. Everything that was measured was measured on the description, and it is written as such.
  • Not every error does harm. Dealing of territories in the order of creation mixes the colours twice better than random, so an error in drawing does not make the game unfair.
  • A measurement corrected a guess by eye. A territory of the original has 20.5 cells, not 11 to 13 as estimated from the pictures. An estimate from a picture is good for the shape, not for the numbers.
  • A measurement on a stand-in must be named. The AI on the seat of the human is not a human, and that also holds for the points of Tribes. A correct copy is a claim about the description, not about the original.

Sources and notes

  • Numbers: docs/TUNING.md §44.5 and §44.6 in the repository of the game (tribes.js --strength --games 300 --players 2,4,7,8 --cap 300, tribes.js --compare --games 150), §45.2 (tribes.js --points) and §45.3 (node tools/core/xp.js).
  • Description: the official HTML5 version by GAMEDESIGN, read on 2 November 2026 (steps 1 to 9 and the examples of the "leader"); see the article about the source code.
  • Related: Tribes: a copy that can be measured and Why the starter wins 93%.