Enhancing Player Levels in the Nim Game Using Genetic Algorithms - Peres, Matheus; Viana, Francisco Henrique de Freitas; Fernandes, Kennedy M.; Gonzalez, Pedro Henrique; Soares, Leandro de M. B.; Bezarra, Eduardo; dos Santos, Joel Andre F.; Brandão, Diego (Anais do Simpósio Brasileiro de Jogos e Entretenimento Digital (SBGames); 2024: Anais do XXIII Simpósio Brasileiro de Jogos e Entretenimento DigitalDO - 10.5753/sbgames.2024.241335, 2024)
The Nim game is a fundamental example in combinatorial game theory, exemplifying impartial games where moves depend solely on the current position. Creating difficulty levels in Nim for computer play presents challenges, as small changes in game element positioning can significantly alter the game’s difficulty. Initial ideas, such as randomly applying the winning formula or ensuring constant computer wins, but it proved unsatisfactory due to erratic or discouraging gameplay. This article proposes using Genetic Algorithms (GAs) to develop varied difficulty levels in Nim. Our approach avoids the established winning formula, making defining an independent fitness function complex. Instead, we employ a competitive coevolutionary fitness function, where individuals are evaluated against each other, allowing the fitness criteria to evolve with the population. This method produces more nuanced and engaging difficulty levels, enhancing player experience through a balanced and evolving challenge.