Skip to main content

Hegemon

Abstract strategy built to fix chess's three structural flaws: solved openings, free piece rotation, and draw-prone endgames.

Progress15%

Hegemon is a deterministic abstract strategy board game I designed and built from scratch โ€” a chess-alternative with a novel core mechanic: directional commitment. Every piece has a facing (N/E/S/W), and turning costs your entire turn. This single constraint reshapes the entire strategic landscape: positional decisions become load-bearing, and over-extension is punished differently than in any game I know of.

The project spans game design theory, algorithmic AI, and a clean web implementation purpose-built for playtesting.


Why I Built It

Classical strategy games like chess have three structural weaknesses I wanted to address:

  1. Over-stabilized openings โ€” theory crowds out creativity
  2. Omnidirectional threat projection โ€” pieces threaten too freely in all directions
  3. Draw-prone equilibrium โ€” high-level play collapses into stalemate

Directional commitment attacks all three: pieces must be oriented to threaten, rotation is expensive, and the asymmetric cost of facing changes creates constant pressure to act.


Game Design

Hegemon is played on a 9ร—9 board with 13 pieces per side across 4 types:

PieceRoleDefining Rule
ArchonSovereign (king-analogue)Moves 1 square any direction. Must survive.
StrategosGeneralMoves forward 1โ€“3, sideways 1. Cannot retreat.
HippeisCavalryKnight-leap in forward hemisphere only. Gets a free reface after capturing.
HopliteInfantryPawn-like forward movement. Promotes to Strategos on the back rank.

Each turn, a player either moves a piece or refacing it 90ยฐ. Reface moves cannot be used to escape check โ€” this prevents the mechanic from becoming purely defensive.

Win conditions:

  • Royal Immobilization โ€” opponent's Archon is attacked with no legal escape
  • Command Paralysis โ€” opponent has zero legal actions of any kind

The central design question I'm testing empirically: Does facing create legible strategic commitment, or mostly bookkeeping cost and accidental paralysis?


Technical Implementation

Stack: React 18 + Vite 6, no external game libraries, pure CSS dark theme.

Architecture: The engine is fully decoupled from the UI. Three independent modules:

  • engine.js โ€” Pure game logic: move generation, validation, check detection, win conditions. No React imports, no side effects. Could power a server, a bot, or a CLI.
  • ai.js โ€” Standalone AI engine with negamax search.
  • notation.js โ€” Algebraic notation system for game records.

AI Opponent

The AI uses negamax with alpha-beta pruning at three selectable depths (Recruit / Officer / General). The evaluation function is handcrafted across 8 factors:

  • Material balance (Archon: 10,000; Strategos: 600; Hippeis: 350; Hoplite: 100)
  • Hoplite advancement with exponential promotion-proximity bonus
  • Strategos forward reach and center control
  • Hippeis activity and advancement
  • Archon safety (penalties for exposure and proximity to enemy pieces)
  • Check state (+45 pts for giving check, โˆ’45 for being in check)
  • Piece facing quality (bonus for correctly-oriented Hoplites)

Move ordering follows MVV-LVA (Most Valuable Victim, Least Valuable Attacker) to maximize alpha-beta cutoffs, with captures sorted before quiet moves and refacings deprioritized. The Hippeis free-reface mechanic is handled correctly: after a capture, the AI evaluates all 4 possible post-capture orientations and picks the best one.

Typical search visits ~500โ€“5,000 nodes at depth 3, with node count surfaced in the UI.

UX Details

  • Piece tokens show type + directional arrow (N/E/S/W)
  • Legal moves rendered as blue dots; capture squares as red overlays
  • Last-move highlighting; auto-scrolling game log in algebraic notation
  • R to toggle reface mode, Esc to cancel selection
  • Fully responsive: board scales from 65vw to 450px max

Playtest Protocol

v0.2 is a structured playtest with a packet distributed to testers:

  1. 3-minute quickstart
  2. Piece movement reference card
  3. Setup + notation guide
  4. Results form

Metrics tracked per session:

MetricTarget
First-mover win rate45โ€“55%
Reface % of all actions15โ€“30%
Average game length35โ€“60 turns
Draw / paralysis rate< 10%

Data from playtests will drive v0.3 (phalanx formations + ranged Toxotai unit) and v0.4 (Epistates command-aura piece + throne win condition).


What I Learned

Designing around a single novel mechanic is harder than layering features โ€” the facing rule touches everything: how pieces move, how attacks work, what a "tempo" means, how the AI should weight positions. Getting it right required treating the engine as a formal system first, and the game second.

The minimax evaluator taught me how sensitive hand-tuned heuristics are: a 20-point tweak to Archon exposure dramatically changed whether the AI played aggressively or passively. Calibrating it felt more like training a model than writing an algorithm.


Status: Active playtest (v0.2). Game design, engine, AI, and UI are all original work.
Tech: React ยท Vite ยท Vanilla CSS ยท Custom negamax AI