Support games with up to 6 players (OMNI-26) #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/six-player-games"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes OMNI-26
Stacked on #25 (base is
fix/review-findings, so the diff is just this change). Retarget tomainonce #25 merges.What changed
MAX_PLAYERSis 6. The value head, masks and per-player resource arrays follow it. The validator accepts 2 to 6 players.zero_sum_payoffs): a sole winner scores +1 and every other player-1/(n-1). Shared wins, or survivors when only losers are flagged, share the win on the same scale; everyone or nobody winning is a draw. Timeouts and random adjudication use the same rule. Two-player results are unchanged except that both players losing at once is now a draw instead of -1 each.PRef::Target(i): acting on the player chosen by aPlayeraction target. Before this, a chosen player could not be referenced from an effect at all (the tempoattack_facehitsOppregardless of the target), which made targeted player actions meaningless beyond two players. The validator checks the target exists and is a player target.Oppstays "next seat in turn order" and is documented as such.play_matchputs the agent under test in a rotating seat againstn-1copies of the opponent and classifies wins by payoff sign.omnia playandomnia simulatework per seat. Generator measurement reports a win rate per seat (seat_win_rates), scales the side-balance floor by player count, and rotates the seat in the skill checks.games/melee.ron: a six-player free-for-all point race with player-targeted raids, used by tests and as an example.Tests
Zero-sum payoff rule for 2 to 6 players; the three hand-written games run to completion with 2 to 6 players and zero-sum payoffs; limit of 2 to 6 enforced; player-target raids hit only the chosen seat; validator checks on player-target references; six-player observations and batches through the model; six-player matches (MCTS beats random, random wins about 1 game in 6); six-player generator measurement. The generic engine tests (determinism, replay, relabelling, hidden-information) now also run on melee.
Limits worth knowing
meleeexercises 3+ players in a purpose-built game.limits.max_stackscaled with the player count (gambit with 5 players overflowed the 2-player limit of 8).play_matchare by payoff sign; the Wilson interval treats a game as a Bernoulli trial, which is only indicative with more than two players.Review (board cleanup 2026-10-08)
Verified on top of #25: the build is clean and all workspace tests pass, including the new six-player engine, match, measurement and model tests.
zero_sum_payoffsgives the same results as the old code for 2 players: a sole winner gets +1/-1, a shared win or nobody winning is a draw, a sole survivor gets +1, and a timeout tie is a draw. Existing 2p results are unaffected.play_matchandmeasurerotate the agent under test through all seats. The side-balance floor scales with 2/n. The note that scores are only indicative for n>2 is accurate.PRef::Target(i)is checked by the validator against both scope and a Player-target slot. The engine falls back tomeon a mismatch, which can only be reached by an invalid def.MAX_PLAYERS4->6 widens the value head and every[f32; MAX_PLAYERS]payoff/value array. Older checkpoints and serialized samples will not load, the same as with #25.Ready to merge after #25. Retarget the base to main first.
Retargeted from fix/review-findings to main after #25 merged, then merged 2026-10-08. All tests pass, including the six-player ones. MAX_PLAYERS 4->6 widens the value head, so older checkpoints will not load. Closes OMNI-26.