← All projects
Games
Othello
Rewrite of a game from my studies: C engine (rules, minimax alpha-beta AI), playable in the browser through WebAssembly.
Done
Sprint S17-S18 · 8 points
In short, no jargon for non-developersRead the summaryClose
- What it is
- The game of Othello against the computer, playable in the page.
- What it is for
- A game from my studies, rewritten from scratch with the methods of a professional project: automatic tests, versions for several systems.
- What it shows
- An artificial opponent that thinks several moves ahead, and a fast program whose every rule is checked.
How the pieces fit together
- Perft (reference counts) → Engine (C, two bitboards): checks the rules
- AI (alpha-beta negamax) → Engine (C, two bitboards)
- Engine (C, two bitboards) → WebAssembly (Emscripten, 4.5 KB): built by Emscripten
- WebAssembly (Emscripten, 4.5 KB) → Project page (mouse, touch, keyboard): game, undo
Play against the AI
The project's C engine and AI, compiled to WebAssembly (4.5 KB), run in your browser. Dots mark the possible moves.
Loading the engine…
With the keyboard: arrows move the active square, Enter or Space plays. Level and colour apply to the next game.
Tech stack
Who does what
- C
- The engine (board as two 64-bit integers, moves computed by bit shifts) and the alpha-beta AI.
- CMake
- Building and testing with GCC, MSVC and Clang, warnings as errors, with ASan and UBSan.
- Emscripten
- Compiles the engine and the AI to WebAssembly: you play the AI on the project page.
- Unity
- Tests of the board (perft up to 8 moves, against the published counts) and of the AI.
Definition of Done
- Code reviewed, diff by diff
- Unit and integration tests green
- Green CI on Linux, Windows and macOS when compiled
- README, REVIEW.md and DECISIONS.md up to date
- Texts in French and English
- Demo deployed and tested on mobile