2048 Game Bot Project
$ Source Code
toy_archive/2048_ai at main ยท hekoh99/toy_archive
$ Overview

The 2048 Game Bot project involves developing a bot that plays the 2048 game using four distinct heuristics to optimize its gameplay. The bot calculates the best possible move within a time limit of 1/12 of a second.
Heuristics Used
- Big:
- Evaluates boards where the sum of all numbers is higher, giving a higher score to such boards.
- Emptyness:
- Favors boards with more empty spaces, as they offer more potential for future moves.
- Monotonicity:
- Scores boards higher where larger numbers are positioned towards the corners and arranged in descending order.
- Smoothness:
- Boards with smaller differences between adjacent tiles are given a higher score, indicating a smoother tile distribution.
Algorithm and Time Constraint
- The bot operates with a time constraint of 1/12 of a second to evaluate and decide the optimal move for the maximum possible score during that time frame.
- Utilized Minimax and Expectimax algorithms to make optimal decisions based on the heuristics.
Key Learnings
- Virtual Environments: Created and managed Python virtual environments, including handling package installations and version conflicts.