A - Multi-Player Territory Game Editorial
by
nikaj
AI Summary
Solution Editorial
1) General strategy
This is a stochastic multi-player game with hidden opponent parameters, so deterministic greedy play is weak.
The core strategy is:
- infer each opponent’s behavior parameters online from observed moves,
- keep multiple plausible parameter hypotheses per opponent,
- evaluate our moves by expected value over sampled futures,
- spend more simulation budget on promising moves via progressive pruning.
So the solver is a model-based rollout agent with online opponent inference.
2) Special handling by case
M = 2
Two-player games are more tactical and contact-driven.
- Before contact, move toward the opponent quickly.
- After contact, switch to deeper simulation.
- Use a faster, tactical move policy in rollouts for this mode.
M >= 3, U = 1
When U=1, reinforce/weaken depth disappears, and steal pressure dominates.
- Start deeper simulation earlier.
- Use stronger early-game shaping in evaluation.
- Prefer moves that keep options and avoid unnecessary exposure.
M >= 3, U >= 2
Use the default pipeline (inference + rollout + pruning + optional shallow extra lookahead).
3) How rollouts work
Each tested current-turn move is evaluated by simulating future turns up to a horizon.
Rollout policy
At each simulated turn:
- Our move:
- in 2-player mode, use a fast tactical heuristic;
- otherwise use a probability-aware greedy heuristic.
- Opponent move:
- sample one parameter hypothesis for each opponent,
- sample random values for that turn,
- apply the statement model:
- with probability
epsilon, pick by uniform indexed choice among reachable cells, - otherwise pick action type by highest weighted class score, then pick among tied best cells by indexed choice.
- with probability
- Apply simultaneous move resolution exactly under the game rules (occupy/reinforce/steal/weaken outcomes).
This repeats until the simulation horizon.
Rollout evaluation
The terminal simulated state is scored by a phase-aware objective:
- late game: close to true objective (our score vs strongest opponent),
- earlier turns: smoother surrogate with temperature/softmax shaping so estimates are less brittle.
For U=1, early scoring uses additional value transformation to better reflect that early control structure is different from final raw score.
4) Horizon design and length choice
The lookahead window is dynamic.
- It starts longer in early game.
- It gradually shrinks as turns progress.
- 2-player mode gets slightly longer lookahead than multi-player mode.
- The horizon is always clipped by remaining turns.
In practice this gives:
- long enough horizon early to capture setup effects,
- shorter horizon later to keep per-turn runtime stable,
- better time allocation across all 100 turns.
The solver also uses per-turn time slicing (remaining time divided by remaining turns), so simulation count adapts automatically.
5) Brief note on second-layer lookahead
A shallow extra lookahead is used only in selective situations (few top candidates left and enough budget).
It tests a small set of plausible next-turn continuations, picks the best continuation on one sample set, and evaluates it on another set to reduce selection bias.
This is intentionally limited; most strength comes from robust first-layer rollouts.
6) Speed techniques
Main performance optimizations:
- bit-mask board sets for fast set algebra and iteration,
- incremental local updates after simultaneous actions,
- cached per-player class maxima/tie sets,
- sampling mostly high-weight opponent hypotheses,
- progressive candidate elimination (
sequential halving), - lightweight state snapshot/restore for selective extra lookahead.
Overall: online opponent inference + high-throughput stochastic rollouts + adaptive horizon/time control.
posted:
last update: