You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make the AI opponent skeleton playable (single-player mode) #54
Ship a first version that plays a random legal move, then a material-greedy one-ply move using the existing _evaluatePosition.
Add minimax with alpha-beta at depth 2 to 3.
UI: a "Play vs computer" toggle with side and difficulty selectors; lock input while the AI is thinking; Undo takes back two plies in AI mode. Normalise the difficulty key casing.
Open question: depth 4 on the main thread may stall the UI. A Web Worker needs the engine code to be DOM-free, which game.js is not today.
Who benefits
Solo visitors to the hosted page, who currently have no one to play against.
Acceptance criteria
A player can start a game against the computer and pick a side
Activity