2048 AI
Select AI and Depth, then press Start.
About This Project
This interactive web application demonstrates an AI game engine that was designed from scratch by myself and some teammates to quickly solve the game 2048. All of the game logic and AI calculations run directly in your browser using Python, powered by PyScript and WASM. I was the primary lead on Expectimax AI, heuristic implementation, and performance optimization, while my teammates worked on game logic / implementation, UI, Monte Carlo & MinMax, and heuristic tuning. NB! Time between moves has a floor of 5 ms for UI functionality, to see proper speed you'll have to clone the repo.
AI Types:
- Random: This takes a pseudorandomly selected valid move at each step
- Expectimax: Uses heuristics to look ahead a set number of moves and guess at the best outcome.
The Depth setting for the Expectimax AI controls how far it looks into the future. A higher depth results in stronger play but requires more computation, especially for board states with many empty tiles.