Arcade
This page is to journal my construction of the arcade.
Technology stack
Frontend:
- React with Typescript
- Tailwind CSS
- Zustand (simple state management)
- Framer Motion (smooth animations)
Backend:
- Node.js with express
- Rest API
Steps
mkdir -p backend/src/controllers backend/src/models backend/src/routes
mkdir -p frontend/src/components/games frontend/src/pages frontend/public
- create
package.jsonfor both backend and frontend - create main backend file, game routes, game controller
pm2configuration for containerisation- create
tailwindconfig - create
App.jsin frontend
Resources to work through
Chess
AI Strength Analysis:
Architecture
Iterative deepening minimax with alpha-beta pruning, running in a Web Worker. The search deepens incrementally (depth 1, 2, 3, …) until the time budget expires, always keeping the best result from the last fully completed depth.
Per-difficulty estimates
┌────────┬─────────────┬───────────────────────┬──────────────────────┬─────────────┐ │ Level │ Time budget │ Typical depth reached │ Est. nodes evaluated │ Approx. Elo │ ├────────┼─────────────┼───────────────────────┼──────────────────────┼─────────────┤ │ Easy │ 1s │ 4-5 ply │ ~50k-200k │ ~1200-1400 │ ├────────┼─────────────┼───────────────────────┼──────────────────────┼─────────────┤ │ Medium │ 2s │ 5-6 ply │ ~200k-800k │ ~1400-1600 │ ├────────┼─────────────┼───────────────────────┼──────────────────────┼─────────────┤ │ Hard │ 3s │ 6-7 ply │ ~500k-2M │ ~1600-1800 │ ├────────┼─────────────┼───────────────────────┼──────────────────────┼─────────────┤ │ Expert │ 4s │ 7-8 ply │ ~1M-5M │ ~1800-2000 │ ├────────┼─────────────┼───────────────────────┼──────────────────────┼─────────────┤ │ Master │ 5s │ 7-9 ply │ ~2M-10M │ ~1900-2100 │ └────────┴─────────────┴───────────────────────┴──────────────────────┴─────────────┘
What makes it strong
Piece-square tables (PST) — It knows positional chess: control the center, develop knights away from edges, castle the king, advance passed pawns. Even at depth 4 it plays principled chess.
- MVV-LVA move ordering — Captures are searched in Most Valuable Victim / Least Valuable Attacker order,
which makes alpha-beta pruning very effective (prunes ~90%+ of the tree).
- PV move ordering — The best move from the previous iteration is searched first at the next depth, which is a huge speedup.
- Endgame awareness — Switches king PST from “hide in the corner” to “march to the center” when material
drops below ~2600cp (roughly when queens are off).
- Auto-queen promotion — It always promotes to queen, which is correct 99%+ of the time.
What it lacks (potential weaknesses to exploit)
- No quiescence search — This is the biggest weakness. The search evaluates positions at a fixed depth
with no extra capture-chain resolution. This means it has a horizon effect: it can’t see that a sequence of exchanges ending 1 ply beyond its depth is losing. Exploit this by initiating complex tactical exchanges — it may miscalculate the outcome.
- No transposition table — It re-evaluates the same positions multiple times. This limits depth but
doesn’t create an exploitable weakness per se.
- No opening book — It calculates everything from scratch. You can gain a small early advantage by
playing well-known strong openings (e.g. Italian Game, Ruy Lopez, Queen’s Gambit) while it burns time recalculating known theory.
- Simple evaluation — No understanding of: pawn structure (doubled/isolated/passed pawns beyond PST),
bishop pair bonus, rook on open files, king safety beyond PST, or connectivity. You can exploit positional themes it doesn’t understand — e.g. create a passed pawn on the side it’s not watching.
- Random tiebreaking — When two moves evaluate equally, it picks randomly with 50/50. This means it
occasionally makes suboptimal choices in quiet positions.
Tips to beat it on Easy/Medium
- Play solid openings — 1.e4 e5 2.Nf3 Nc6 3.Bc4 (Italian) gives you natural development
- Trade queens early — the endgame evaluation is weaker, and you remove its tactical sharpness
- Create long-term positional advantages — passed pawns, bishop vs knight in open positions, rook on the
7th rank. It can’t plan strategically, only tactically within its horizon
- Avoid sharp tactical positions — even at 4-5 ply depth, it calculates accurately within that window.
Don’t leave pieces hanging or set up tactics it can see
- Push into the endgame — its endgame play is the weakest phase due to no specialized endgame knowledge
(no opposition, no Lucena/Philidor patterns, etc.)
Backlinks (2)
“We all die. The goal isn’t to live forever, the goal is to create something that will.” — Chuck Palahniuk
Originally the AI suffix stood for archived intellect, however these days it has concretised to becoming an Augmenting Infrastructure — a place from which to branch out in many directions.
Within this site you will find self-contained material in the form of project posts and blog posts, but also external links 1 to other work – my own as well as not.