Logo Lanfrica

zachary013/mancala-game-ai

Record type:

software
Creator:
zac
Host:
A Java implementation of the traditional African board game Mancala, featuring AI opponents and various game strategies. This project implements adversarial search algorithms to create an intelligent computer opponent and provide move suggestions to players. # Mancala Game with AI A Java implementation of the traditional African board game Mancala, featuring AI opponents with multiple difficulty levels and various game strategies. This project implements the Alpha-Beta pruning algorithm to create an intelligent computer opponent and provide move suggestions to players. ## Authors - Zakariae Azarkan (zachary013) - Salaheddine Eljably (Sam-Jab) ## Project Overview This implementation of Mancala enhances the traditional two-player game with artificial intelligence capabilities. The game features multiple difficulty levels, AI-powered move suggestions, and the ability to save and load game states. ## Game Preview ### Traditional Mancala Board Layout ### Game Implementation Interface ## Project Structure ``` MancalaGame/ ├── src/ │ ├── GameSaveManager.java # Handles saving and loading game states │ ├── GameSearch.java # Implements Alpha-Beta pruning algorithm │ ├── Mancala.java # Core game logic and AI strategies │ ├── MancalaGame.java # Main game controller and UI │ ├── MancalaMove.java # Move representation and validation │ ├── MancalaPosition.java # Board state and evaluation │ ├── Move.java # Abstract move interface │ └── Position.java # Abstract position interface ├── mancala_saves/ # Directory for saved games └── .gitignore ``` ## Features ### Multiple Game Modes - Player vs AI (with difficulty selection) - Player vs Player (with AI move suggestions) - Save/Load game functionality ### AI Implementation - **Algorithm**: Alpha-Beta pruning with position evaluation - **Difficulty Levels**: - Easy (Depth: 2) - Basic evaluation focusing on stone count differences - Simple decision-making suitable for beginners - Medium (Depth: 4) - Enhanced evaluation considering both stones and pit positions - Balanced strategy for intermediate players - Hard (Depth: 6) - Advanced evaluation with weighted positions - Strategic consideration …