Welcome to the Tetris AI Agents project! This repository contains two intelligent agents designed to tackle the classic game of Tetris using Genetic Algorithm (GA) and Simulated Annealing (SA). These AI strategies aim to optimize gameplay by efficiently placing Tetriminos to maximize score and minimize game-over scenarios.
- 🧬 Genetic Algorithm (GA): Evolves a population of AI agents by applying selection, mutation, and crossover to enhance performance over generations.
- ❄️ Simulated Annealing (SA): Uses a probabilistic approach to explore and exploit board states, optimizing moves dynamically.
Ensure you have Python installed (>=3.7). Then, install dependencies:
pip install -r requirements.txtRun the agents and watch them play Tetris:
python main.py gen # Run Genetic Algorithm agent
python main.py sa # Run Simulated Annealing agentMade with ❤️ for AI and Tetris enthusiasts!