Game Semantics

Nim

Single-heap Nim from 5 stones, last take wins. The winning strategy leaves a multiple of four; greedy always takes three (or the rest); take-one is the slowest legal policy.

OP?!₁P-viewΩ…₊ / ₋₁ ₂ ₃

Arena

Enabling structure of the arena (each move drawn once). Hover a move for its role. Enabling.

Strategies

winning

Leave a multiple of four stones.

Trace against auto. (stuck — Ω)

start? 0₀
take-1! 1₁
opp-1? 2₂
take-3! 3₃

P-view

●●●●●

Strategy tree

Unfolding against every legal Opponent continuation, up to the page bound. O branches fan out; P is a single reply. Click a reply count to expand folded Opponent options.

ε
Ostart?
Ptake-1!

greedy

Always take three, or the remainder.

Trace against auto. (stuck — Ω)

start? 0₀
take-3! 1₁
opp-1? 2₂
take-1! 3₃

P-view

●●●●●

Strategy tree

Unfolding against every legal Opponent continuation, up to the page bound. O branches fan out; P is a single reply. Click a reply count to expand folded Opponent options.

ε
Ostart?
Ptake-3!

take-one

Always take a single stone.

Trace against auto. (stuck — Ω)

start? 0₀
take-1! 1₁
opp-1? 2₂
take-1! 3₃
opp-1? 4₂
take-1! 5₅

P-view

●●●●●

Strategy tree

Unfolding against every legal Opponent continuation, up to the page bound. O branches fan out; P is a single reply. Click a reply count to expand folded Opponent options.

ε
Ostart?
Ptake-1!

bot

The empty strategy Ω: Proponent never moves.

Trace against auto. (stuck — Ω)

start? 0₀

P-view

●●●●●

Strategy tree

Unfolding against every legal Opponent continuation, up to the page bound. O branches fan out; P is a single reply. Click a reply count to expand folded Opponent options.

ε
Ostart?
Ω