Thameur Portfolio
Mancala Game ๐ฎ
June 15, 2022 (2y ago)
๐ฎ A Python-based implementation of the classic African board game Mancala, offering AI profiles for optimized play and strategy.
๐ Abstract
This Mancala game is a Python implementation of the classical African board game. It features two AI profiles: one that optimizes for free turns and captures and another that randomly selects moves. The game can be played between two players or with the AI, making it an ideal starting point for developing more advanced AI strategies for board games.
๐ Features
- Two AI Profiles: Optimized AI based on free turns and captures, and a random AI.
- Player vs AI: Play against an AI with different skill levels.
- Graphical Interface: Simple graphical interface for a better user experience.
- Mancala Game Logic: Accurate rules for capturing, sowing, and turning stones.
- Easy Setup: Run the Python script to start playing Mancala.
๐ Getting Started
Prerequisites
Before you can run this project, ensure the following packages are installed:
- Python 3.x
- Pygame (for graphical interface)
Installation
- Clone the repository:
git clone https://github.com/verus56/Mancala-game cd Mancala-game
- Install required dependencies:
pip install pygame
Running the App
To start playing the game:
python main.py
To play against the AI:
python play.py
๐ค How It Works
- Game Logic: The Mancala game rules are implemented, including sowing and capturing stones.
- AI Profiles: The AI profiles make decisions based on two strategies: a vector-based approach that optimizes for free turns and captures, and a simple random AI.
- Graphical Interface: The game uses Pygame to display the board and game state interactively, allowing players to make moves.
๐ Technical Stack
- Game Engine: Pygame (for the graphical interface)
- AI Profiles: Simple random AI, vector-based AI for optimized gameplay
- Language: Python
๐ ๏ธ Deployment
This system can be run locally on any machine with Python and Pygame installed to play Mancala against either a human player or the AI.
๐ License
Released under the MIT License.
๐ฒ Contact
Made with โค๏ธ by Hamzaoui Thameur
- GitHub: Hamzaoui Thameur
- Email: thameurhameaoui9@gmail.com