Reversi — 6×6 vs Ordenador

Reversi is a classic two-player game. Black moves first; White responds.

When you place a disc, it captures every opponent's disc that ends up sandwiched between your new disc and another of your own (in any row, column or diagonal). Captured discs flip to your colour.

Every move must capture at least one opponent disc. If you have no legal move, you pass automatically. If neither side can move, the game ends.

The player with more discs at the end wins. Equal counts means a draw.

Levels: 6×6 (faster, ideal for learning) · 8×8 (classic Othello).

The black disc closes the top row against another black disc and, at the same time, closes a column against the black disc below: all four sandwiched white discs flip.

The game in one sentence. Reversi (commercially Othello) is a perfect-information, zero-sum game on a rectangular board, with capture by flanking in the 8 directions. Few rules, surprising depth — and a classic playground for teaching positional evaluation and game trees.

Mathematical ideas:
Local branching — each legal move changes several squares (the flanked ones). The average branching factor on 8×8 is around 5-10.
Game-tree search — minimax with α-β pruning.
Positional evaluation versus material evaluation (just counting discs).
Parity and symmetry — the board has diagonal symmetry but the game doesn't preserve it past the opening.

The pedagogical core: local greed versus global strategy. Primary-school students typically start by maximising captured discs each move (greedy material). They quickly discover that:

Corners can never be flipped → worth gold.
X-squares (diagonal to an empty corner) hand the corner to the opponent → poison.
• Giving too much mobility to the opponent (many legal moves) is costly mid-game.
Parity of empty regions controls who plays last in each pocket.

"Flip few discs early to flip many later" is counter-intuitive and therefore powerful pedagogically — it directly confronts the greedy heuristic.

To discuss in class:
• Why can corners never be captured?
• What if the board were 4×4 or 10×10? (4×4 is solved: second player wins.)
• What is the starting position and why was that central "X" of 4 discs chosen?
• How do you measure the "value" of a position without counting discs?

Reversi and computer science: Othello is one of the games where computers beat the human champion earliest (Logistello, 1997). The game-tree size (~10²⁸ positions) is far smaller than chess, but positional evaluation is nonlinear and rich — it was an important laboratory for neural-network game evaluation before AlphaZero.

Hard-mode AI: minimax with α-β pruning to depth 5 (Hard) or 3 (Easy). Evaluation = disc difference + bonus of +25 per owned corner + penalty of −12 per X-square when the adjacent corner is empty + weighted mobility ratio. A solid school-level opponent; a human expert beats it.

Variants and extensions:
Reversi misère — fewer discs wins. Heuristics flip completely.
Non-rectangular boards — with holes, hexagonal… the theme stays the same.
• Connection to Ramsey theory (unavoidable configurations) and "majority" problems on graphs.

Tu turno (negras)
Black (tú)
2
White (CPU)
2