Heuristic Optimization of a Tetris Bot Using Genetic Algorithms: An Adaptive Evolutionary Approach


Creative Commons License

Erkalkan E.

Turkish Journal of Mathematics and Computer Science, cilt.18, sa.1, ss.220-247, 2026 (Scopus, TRDizin)

Özet

This study presents a Genetic Algorithm (GA)-driven optimization framework for enhancing the heuristic evaluation function of a Tetris bot. The proposed approach combines offline evolutionary training with real-time dynamic weight adjustments to adapt the bot's strategy to evolving gameplay conditions. Key heuristic features—including hole minimization, line clearing, and surface bumpiness—are weighted dynamically based on board state metrics such as maximum column height. Evaluated through 100 independent simulations, the GA-optimized bot demonstrated significant performance improvements over a baseline bot with fixed heuristic weights: +61.79\% in average lines cleared (91.38 vs. 56.48) and +55.74\% in average game duration (3.17 vs. 2.04 minutes). While decision latency increased marginally (7.33 ms vs. 7.05 ms), this trade-off was justified by the bot's enhanced strategic adaptability, evidenced by reduced performance variance and outlier frequency. The results validate GA's efficacy in optimizing complex, multi-objective decision-making processes in dynamic environments. Future work will explore hybrid GA-reinforcement learning architectures and applications to other real-time strategy games.