Support games with up to 6 players #26

Closed
opened 2026-10-06 16:37:19 +08:00 by Breadway · 1 comment
Owner

Why

The engine currently allows 2 to 4 players (MAX_PLAYERS = 4) and in practice only 2-player games are generated or tested. Games with up to 6 players are required.

What I found (2026-10-06, probing the hand-written games with num_players 3 to 5)

  • 3 and 4 players run to completion without faults; 5 is rejected by the validator (limit is 4).
  • Payoffs for n > 2: a sole winner scores +1 and everyone else -1, so the total is not zero-sum (-1 at 3 players, -2 at 4).
  • Opp / ZWho::Opp mean "the next seat", which is only an opponent in 2-player games.
  • Two-player assumptions: generator side-balance and skill checks, omnia play and match seat alternation, CLI win counting, datagen zero-sum invariant.
  • No generated or hand-written game with more than 2 players, and no test covers it.

Plan

  • Raise MAX_PLAYERS to 6 and fix everything sized by it (resources, payoffs, value head, masks, observation).
  • Zero-sum bounded payoff rule for any player count (sole winner +1, shared wins and all-win/all-lose are draws).
  • Document Opp as the next seat in turn order.
  • Generalise matches, CLI play and generator measurement to n seats.
  • Add a purpose-built multi-player example game and tests that run 3 to 6 players.

Confidence

Medium: scope is from reading plus the probe; there may be more n-player assumptions in eval and training code to find.

## Why The engine currently allows 2 to 4 players (MAX_PLAYERS = 4) and in practice only 2-player games are generated or tested. Games with up to 6 players are required. ## What I found (2026-10-06, probing the hand-written games with num_players 3 to 5) - 3 and 4 players run to completion without faults; 5 is rejected by the validator (limit is 4). - Payoffs for n > 2: a sole winner scores +1 and everyone else -1, so the total is not zero-sum (-1 at 3 players, -2 at 4). - `Opp` / `ZWho::Opp` mean "the next seat", which is only an opponent in 2-player games. - Two-player assumptions: generator side-balance and skill checks, `omnia play` and match seat alternation, CLI win counting, datagen zero-sum invariant. - No generated or hand-written game with more than 2 players, and no test covers it. ## Plan - Raise MAX_PLAYERS to 6 and fix everything sized by it (resources, payoffs, value head, masks, observation). - Zero-sum bounded payoff rule for any player count (sole winner +1, shared wins and all-win/all-lose are draws). - Document `Opp` as the next seat in turn order. - Generalise matches, CLI play and generator measurement to n seats. - Add a purpose-built multi-player example game and tests that run 3 to 6 players. ## Confidence Medium: scope is from reading plus the probe; there may be more n-player assumptions in eval and training code to find.
Author
Owner

Implemented on branch feature/six-player-games (commit 62b4d98), PR #27 stacked on #25. MAX_PLAYERS is 6; zero-sum payoff rule for any player count; new PRef::Target(i) because a chosen player target could not be referenced from effects at all (found while writing a multi-player game); evaluation, CLI and generator measurement are per seat; games/melee.ron is a six-player example. Tests cover 2 to 6 players across engine, validator, model batching, matches and measurement. Still open: no generator family makes more than two players, and deep-stack games need max_stack scaled with player count.

Implemented on branch feature/six-player-games (commit 62b4d98), PR #27 stacked on #25. MAX_PLAYERS is 6; zero-sum payoff rule for any player count; new PRef::Target(i) because a chosen player target could not be referenced from effects at all (found while writing a multi-player game); evaluation, CLI and generator measurement are per seat; games/melee.ron is a six-player example. Tests cover 2 to 6 players across engine, validator, model batching, matches and measurement. Still open: no generator family makes more than two players, and deep-stack games need max_stack scaled with player count.
Sign in to join this conversation.
No labels
bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/omniastra#26
No description provided.