The Game
A single player card battle game where archetypes, resource management, and tactical decision-making decide the outcome.
Play minion cards onto the battlefield, trade favourably, and push for lethal damage. Every mana crystal counts; playing on curve wins games.
Taunt forces opponents to attack protected minions first. Charge allows immediate attacks. Battlecries and Deathrattles add depth to every turn.
Aggressive fire-based tempo, or defensive earth-based survival. Both archetypes play to a distinct strategic identity.
Play curated 30-card structure decks or randomly generated decks from each element's full card pool; a different game every time.
Artificial Intelligence
Two interchangeable opponents built on a shared Strategy Pattern interface. Swap between a trained neural network and a heuristic AI without changing a line of game logic.
A neural network trained through thousands of episodes of self-play learns to select actions by predicting Q-values - the expected future reward for every possible move from a given board state. The agent never sees hardcoded rules; it discovers strategy entirely through experience.
State -> Action Pipeline
A heuristic opponent that plays on curve, prioritises favourable board trades, and detects lethal damage. Fully explainable - every decision follows explicit scoring logic. Serves as the training baseline and a solid opponent in its own right.
Strategy Pattern
A feed-forward network connecting a 121-dimensional state vector to 68 Q-value outputs. Trained using the Bellman equation with a separate frozen target network updated every 1,000 steps for stability.
Self-Play Training Loop
Engineering
A modern full-stack TypeScript project with clear separation between rendering, state, game logic, and AI — every layer independently replaceable.
Technologies
Architecture Layers