Age of Empires Team Generator
Generate balanced random teams and assign civilizations for Age of Empires II. Supports 2-8 players, draft mode, and civ bans.
About
Uneven teams and civilization mirror matches degrade competitive Age of Empires II sessions. Manual randomization introduces bias - humans are poor entropy sources. This generator uses the Fisher-Yates shuffle algorithm seeded by crypto.getRandomValues to produce uniformly distributed permutations across n players and 45 civilizations from the Definitive Edition roster. It supports team size constraints, civilization bans, and optional tier-weighted balancing to reduce lopsided matchups. Results are deterministic per seed but non-reproducible across runs, ensuring fairness without requiring a trusted third party.
The tool accounts for practical edge cases: odd player counts with remainder distribution, duplicate civilization prevention across teams, and architecture-set diversity scoring. Note: balancing assumes a generalized tier list derived from community consensus (not tournament ELO). Actual game outcomes depend on map, strategy, and player skill - variables this tool cannot model. Pro tip: ban civilizations before generating to prevent arguments after results are revealed.
Formulas
Team assignment uses the Fisher-Yates (Knuth) shuffle to produce an unbiased permutation of the player array. For an array of n elements, the algorithm iterates from index n − 1 down to 1, swapping each element with a uniformly random element at index j where 0 ≤ j ≤ i.
After shuffling, players are distributed to k teams via modular assignment:
where i is the player index in the shuffled array and k is the number of teams. This guarantees maximum team size difference of 1 player when n mod k ≠ 0.
Tier-balanced mode calculates a team score by mapping tiers to numeric weights: S = 5, A = 4, B = 3, C = 2. The generator runs 1000 shuffle iterations and selects the configuration minimizing the score variance across teams:
where m is the number of players on a team and w is the tier weight function.
Reference Data
| Civilization | Architecture | Strengths | Tier | Unique Unit |
|---|---|---|---|---|
| Aztecs | Meso | Infantry, Monks | A | Jaguar Warrior |
| Berbers | African | Cavalry, Navy | B | Camel Archer |
| Bohemians | Eastern European | Gunpowder, Monks | A | Hussite Wagon |
| Britons | Western European | Archers | A | Longbowman |
| Bulgarians | Eastern European | Infantry, Cavalry | B | Konnik |
| Burgundians | Western European | Cavalry, Economy | A | Coustillier |
| Burmese | South East Asian | Monks, Elephants | C | Arambai |
| Byzantines | Mediterranean | Defense, Versatile | B | Cataphract |
| Celts | Western European | Infantry, Siege | B | Woad Raider |
| Chinese | East Asian | Archers, Economy | S | Chu Ko Nu |
| Cumans | Central Asian | Cavalry, Speed | B | Kipchak |
| Dravidians | South Asian | Infantry, Navy | C | Urumi Swordsman |
| Ethiopians | African | Archers, Siege | A | Shotel Warrior |
| Franks | Western European | Cavalry | S | Throwing Axeman |
| Goths | Western European | Infantry | C | Huskarl |
| Gurjaras | South Asian | Cavalry, Camels | S | Shrivamsha Rider |
| Hindustanis | South Asian | Gunpowder, Camels | A | Ghulam |
| Huns | Central Asian | Cavalry Archers | B | Tarkan |
| Incas | Meso | Infantry, Economy | A | Kamayuk |
| Italians | Mediterranean | Archers, Navy | B | Genoese Crossbowman |
| Japanese | East Asian | Infantry, Navy | A | Samurai |
| Khmer | South East Asian | Siege, Elephants | A | Ballista Elephant |
| Koreans | East Asian | Towers, Navy | C | War Wagon |
| Lithuanians | Eastern European | Cavalry, Monks | A | Leitis |
| Magyars | Central Asian | Cavalry Archers | B | Magyar Huszar |
| Malay | South East Asian | Infantry, Navy | B | Karambit Warrior |
| Malians | African | Infantry, Cavalry | A | Gbeto |
| Mayans | Meso | Archers, Economy | S | Plumed Archer |
| Mongols | East Asian | Cavalry Archers, Siege | S | Mangudai |
| Persians | Middle Eastern | Cavalry, Economy | B | War Elephant |
| Poles | Eastern European | Cavalry, Economy | A | Obuch |
| Portuguese | Mediterranean | Gunpowder, Navy | B | Organ Gun |
| Romans | Mediterranean | Infantry, Navy | A | Centurion |
| Saracens | Middle Eastern | Camels, Monks | B | Mameluke |
| Sicilians | Mediterranean | Infantry, Cavalry | B | Serjeant |
| Slavs | Eastern European | Infantry, Siege | B | Boyar |
| Spanish | Mediterranean | Gunpowder, Monks | B | Conquistador |
| Tatars | Central Asian | Cavalry Archers | B | Keshik |
| Teutons | Western European | Infantry, Defense | B | Teutonic Knight |
| Turks | Middle Eastern | Gunpowder | C | Janissary |
| Vietnamese | South East Asian | Archers, Elephants | B | Rattan Archer |
| Vikings | Western European | Infantry, Navy | A | Berserk |
| Bengalis | South Asian | Elephants, Navy | C | Ratha |
| Armenians | Mediterranean | Cavalry, Defense | B | Composite Bowman |
| Georgians | Mediterranean | Cavalry, Defense | B | Monaspa |
Frequently Asked Questions
crypto.getRandomValues(), which provides cryptographically secure randomness. Unlike Math.random(), which uses a PRNG with potentially predictable sequences, the Crypto API draws from the operating system's entropy pool. Each of the n! permutations has exactly equal probability of occurring.