This project features an autonomous AI agent designed to master the classic game of Tetris. Developed in Python with the Pygame library, the AI evaluates every possible move in real-time using a heuristic-based algorithm to decide on the optimal placement for each piece. The core strategy is designed to minimize board height, reduce the number of holes, and maximize completed lines. To elevate its performance, the agent's decision-making heuristics were optimized using a genetic algorithm. This process involved training multiple generations of the AI, allowing it to evolve the most effective strategies for long-term survival and high scores. A key feature of this project is the online multiplayer functionality, enabling the AI to compete directly against human players.