Turn‑Based Duel(Turn-based Duel)

Core of turn‑based combat: action rights and adjudication

What is it

You take one turn, they take one turn — race to the goal first. Tic-tac-toe, Gomoku, and chess are all built on this.

How it plays

On your turn the board freezes and you can think as long as you like; once you place, the situation flips and the opponent answers instantly — every move wonders "what will they do next?"

Why learn it

It is the oldest and cleanest model of opposition — if you want to learn where strategic depth comes from, start with turn rights and adjudication.

Turn-based dueling breaks confrontation into discrete, explainable decision points: turn rights guarantee both sides express intent in alternation, legality checks keep the rule boundary crisp, and adjudication closes every match. The hard part is not the rules — it is the intelligence gradient of the opponent and the completeness of endings: the AI difficulty ladder IS the learning curve, and a missing draw branch means a match can never end. Players "lose without complaint" because every consequence traces back to one specific move.

Why This Mechanic Matters
For Players

Turn-based dueling satisfies the oldest intellectual competitiveness: no excuses about reflexes — the outcome lives entirely in your head. Losing feels fair; winning feels earned.

For the Ecosystem

Turn-based opposition is the origin form of competitive socializing: the rules ARE the social protocol, and a board is a face-to-face connection that needs no network. From board games to card battlers, it remains the ecological bedrock of adversarial play — and the oldest testing ground for AI opponent design.

Transferable Craft

Learn turn-based duels and you learn discrete decision-point design — turn rights, legality, adjudication closure — a skeleton that extends directly to tactics games, deck-builders, and even asynchronous social duels.

Play Behavior
Turn‑Based Duel(Turn-based Duel)
Gameplay Features
Complexity
Beginner → Advanced
Learning Goals
  • Beginner: understand the turn state machine (turn start → action → switch → adjudication) and reproduce a legal move plus a win judgment in the demo
  • Intermediate: write the full legality-check and adjudication contract (including draw/full-board closure), and wire up a minimax AI
  • Advanced: design the AI difficulty ladder and action-count rules (combos/cooldowns), and verify balance with match-length distribution and first-move win rate
Core Patterns

② Instant Playable Demo

Turn‑Based Duel(Turn-based Duel) Demo
Loading game…
Rule Hints
Example: First player places a piece → Second player places a piece → First player continues, until one side connects N or the board is full.
Lab Guide: treat the demo as an experiment
AI Ladder Experiment
Do: Play a full game at each level of "AI Strength (0=random, 1=blocking, 2=forced-win search)"
Observe: Level 0 is a legality sandbox (any move teaches the rules); level 1 blocking teaches defensive priorities; level 2 exposes the long-term cost of every move. The AI ladder IS the learning curve — a fixed-difficulty AI repels beginners and veterans alike
Forced-Win Attribution Watch
Do: Against level 2 AI, deliberately play a bad move (e.g. ignore an open three)
Observe: The search AI punishes it immediately — the loss traces back to one specific move. This is the extreme form of "explainable consequences" in turn-based play: failure attributes to a decision, not luck, so players know exactly what to learn next
Draw Closure Watch
Do: Against level 1 AI, both sides block conservatively until the board fills up
Observe: A full board with no line is a draw. The adjudication must cover win/loss/draw — miss the draw branch and the match never closes. It is the most commonly omitted rule in a minimal ruleset

③ Behavior System Breakdown

3.1 Problems Solved
  • Use turn switching and phase machines to keep each side’s action rights clear and controllable.
  • Use legality checks to turn rule boundaries into interpretable rejection feedback.
  • Provide clear win/loss/draw adjudication to give each game a definitive conclusion.
  • By limiting actions to one per turn, the pacing is balanced and prevents excessive combos that end the game too quickly. Allowing multiple actions lets players play several cards in a single turn, increasing strategic depth but potentially extending game duration.
  • Choosing the line length N is a key trade‑off: too large makes players search longer for a connect, slowing the pace; too small makes connections easy, speeding the game. Experiments show N=5 on a 15×15 board offers the best balance.
  • In card‑based turn systems, allowing multiple cards per action (combo) may seem to add complexity, but it lets players generate higher value through combinations, actually deepening the game rather than weakening it.
3.2 Minimal Ruleset
  • Action rights: Each turn starts with the current player; after performing one action, control immediately switches to the opponent. The acting player may perform only one action per turn, and it counts as completed only after passing legality checks. Turn count starts at 1 and records the current player.
  • Legality: The placement must be within the board and unoccupied; for card actions, the player must have sufficient cost and at least one card in hand; for special skills, cooldowns and resources must be satisfied. Illegal actions return error code "InvalidMove" with a reason.
  • Adjudication: If either player forms a continuous N of identical symbols (horizontal, vertical, or diagonal), that player wins; if the board has no empty spaces and no connections, the game is a draw; if neither condition is met, the turn continues. The adjudication check runs immediately after each legal action.
3.3 System Loop (optional)
Action → Legality check → Update board → Determine win/draw → If undecided, switch player → Proceed to next turn
Design Notes
AI strength is not a difficulty knob — it is a teaching path: random AI is a legality sandbox, blocking AI teaches defensive priorities, mate-search AI exposes long-term consequences. Put all three side by side and players pick the teacher they need right now.
Draws are first-class adjudication: a full board with no winner must close explicitly, or the match never ends — the most commonly omitted entry in a minimal ruleset is exactly this one.
Action limits trade rhythm for depth: one action per turn keeps pace snappy but caps depth; allowing combos explodes the strategy space but bloats match length — the limit is not laziness, it is what gives the duel its shape.

④ Common Combos & Variants

Turn + Grid
Board placement and adjacency become the action space (e.g., Gomoku, Othello, Tic‑Tac‑Toe).
Turn + Numbers
Health/Cost and other numeric gradients support card‑based turn combat.
Turn + AI
Single‑player mode has AI control the other side, with an evaluation function setting the difficulty ceiling.
⑤ Advanced Design & Algorithms (collapsed)Click to expand
Design Warnings
  • Missing legality checks can cause players to treat rule loopholes as bugs (or bugs as rules).
  • Unadjustable AI difficulty can deter both beginners and veterans.
  • Omitting draw conditions can leave games unresolved (full board/long play must be explicitly handled).
  • Overly permissive adjudication rules make connections too easy, stripping strategic depth.
Algorithm Examples
  • Win/loss determination: N‑in‑a‑row scanning, comparison logic, and draw rules.
  • AI: minimax with alpha‑beta pruning and a board evaluation function.

⑥ Related Case Articles