Integrating AI for Turn-Based 4X Strategy Game
Lääveri, Toni (2017)
Lääveri, Toni
Metropolia Ammattikorkeakoulu
2017

Creative Commons Attribution-NonCommercial 1.0 Suomi
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2017100215623
https://urn.fi/URN:NBN:fi:amk-2017100215623
Tiivistelmä
Although computer games have been around for over half a century, the gaming has matured to become a mainstream phenomenon in the past decade, partly propelled by the breakthrough of mobile platforms which provide users access to a vast selection of games. As the complexity and selection of games is constantly increasing, there is growing pressure to provide meaningful artificial intelligence (AI) opponents in certain gaming genres.
This master’s thesis focused on finding a way to implement an AI player for a turn-based 4X computer strategy game. As there was no suitable project at work to apply this research on at the time of the study, the project was created as a personal venture with a theoretical game used as the source for requirements.
In the research phase, dozens of sources of existing literature and information about the field were analyzed, which included extraction of the knowledge and technologies appropriate for this project. The selected technologies were documented in the thesis, and their use cases were identified, and examples were created for most of them.
A high-level technical design for AI integration was created as an outcome of this thesis, which describes a proposed architecture for the AI opponent and combines the technologies evaluated in the thesis into a modular framework. These features can also be leveraged in the player assistance features such as micro-management automation and advisor functions.
The resulting design was supported by actual prototype development done in Unity Editor of selected key technologies. These prototype implementations included a rule-based system inference engine, A* pathfinding on a hexagonal grid map, a spatial database for tracking map data such as player influence, and tactical pathfinding leveraging the information in this database.
Although a complete game was not created during the project, the technical design and research done can be used as a foundation for building AI opponents in turn-based strategy games in future. The practical implementations will most likely also provide feedback on the possible shortcomings of the design and possibilities for improvement, which will be reflected back on the design.
This master’s thesis focused on finding a way to implement an AI player for a turn-based 4X computer strategy game. As there was no suitable project at work to apply this research on at the time of the study, the project was created as a personal venture with a theoretical game used as the source for requirements.
In the research phase, dozens of sources of existing literature and information about the field were analyzed, which included extraction of the knowledge and technologies appropriate for this project. The selected technologies were documented in the thesis, and their use cases were identified, and examples were created for most of them.
A high-level technical design for AI integration was created as an outcome of this thesis, which describes a proposed architecture for the AI opponent and combines the technologies evaluated in the thesis into a modular framework. These features can also be leveraged in the player assistance features such as micro-management automation and advisor functions.
The resulting design was supported by actual prototype development done in Unity Editor of selected key technologies. These prototype implementations included a rule-based system inference engine, A* pathfinding on a hexagonal grid map, a spatial database for tracking map data such as player influence, and tactical pathfinding leveraging the information in this database.
Although a complete game was not created during the project, the technical design and research done can be used as a foundation for building AI opponents in turn-based strategy games in future. The practical implementations will most likely also provide feedback on the possible shortcomings of the design and possibilities for improvement, which will be reflected back on the design.