↑↓ move · ↵ open · esc close

Algorithms and games

Search, planning and decision-making, explained step by step.

How I approach it

An algorithm is easier to trust when you can watch it work. I implement classic search and decision methods, show every step, and compare them on the same problem.

Tools
TypeScriptCanvasCC++Raylib

6 projects

Series

Games and search: How does a program choose a move?

Each game is its own project, with its own rules.

Read the series→
Algorithms

Algorithms

The ideas behind the games and searches on this site, one page each: what it does, how it works step by step, what it costs, and where it runs.

MinimaxAlpha-beta pruningMonte Carlo tree searchGreedy and random baselinesBreadth-first searchDepth-first searchDijkstra’s algorithmGreedy best-first searchA*0-1 breadth-first search
Read the algorithm→
Featured
Algorithms and games

Pathfinding

Five grid search algorithms side by side on walls you draw. The search […]

TypeScriptA*+1
All work in this area
Algorithms and games

Tic-tac-toe

A tic-tac-toe opponent that cannot be beaten, built on minimax with […]

TypeScriptMinimax+1
Algorithms and games

HEX

The connection game with no draws, against an AI whose search […]

TypeScriptCanvas+1
Algorithms and games

Othello

Outflank and flip your opponent’s discs, against an AI you can switch […]

TypeScriptCanvas+3
Algorithms and games

Connect Four

Drop discs and line up four, against an AI you can switch between […]

TypeScriptCanvas+3
Algorithms and games

Mills

Nine Men’s Morris, finished as a graphical game in C++ with Raylib […]

C++Raylib
Related areas

AI and machine learning

Vision, audio, deep learning →

Software and apps

Desktop, web, systems →

Community and open source

Pull requests, plugins, tools →

Creative coding and motion

Animation, 3D, generative visuals →

Design and branding

Logos, interfaces, systems →