A Python implementation of the classic strategy game Obstruction, where a human player competes against an AI opponent on a grid-based board.
- Obstruction is a turn-based strategy game played on a grid. Players take turns placing a marker on empty cells.
- Once a move is made, the selected cell and all adjacent cells (including diagonals) become blocked.
- The player who cannot make a move loses.
The AI is implemented using a heuristic-based approach with move simulation and it applies a set of decision rules:
- The AI checks if there is a move that immediately leads to a win by simulating the board state.
- If no winning move is found, the AI evaluates possible opponent moves and avoids positions that would allow the player to win.
- If no strategic move is available, the AI selects a valid move at random.
This approach ensures a balance between efficiency and intelligent gameplay.
- Player vs AI gameplay
- Heuristic-based AI opponent
- Move simulation for decision making
- Grid-based rule enforcement
- Turn-based system
- Python
- Object-Oriented Programming
- Game logic & state simulation