Stage 1) Chessboard
Stage 2) Movement (per piece, check validity)
Stage 3) Evaluate game state
Stage 4) Turn-based game, with user input
Stage 5) Random AI (0-ply)
Stage 6) Greedy AI (1-ply)
Stage 7) Minimax AI (n-ply)
Stage 8) Alpha-beta pruning (n-ply)
- Define a chessboard struct (i.e. 8x8 array)
- Create a function to clear the board
- Create a function to initialize the board with the starting position - what values to use for black and white's pieces (they must be distinguishable)? consider lower and uppercase letters, for black and white
- Create a function to print the board - bonus: change the text color and background color
- Create a function to copy values from one board to another
- Test these functions!
- Which squares can be reached by a piece?
- Is the king (of the playing side’s color) under check (before and after move)?
- Which moves are valid for a player to make for a piece on the board?
- Bonus: Castling
- Bonus: En Passant
- Bonus: Pawn promotion
- Determine if a player is under checkmate or stalemate
- Assign a value to each piece
- Calculate a value for a position (checkmate is infinite, stalemate is zero)
- Bonus: 3-move repetition
- Bonus: 50-move rule
- Main game loop with stubs for player turns
- Asking player for move
- AI generates random move
- Prevent players from making invalid moves
Known bugs:
- need to check that human moves are among the list of potential moves