Description
The objective of this project is to design and implement an antagonist system for a cRPG genre game using the Unity 3D engine, leveraging Artificial Intelligence technologies. The priority is to ensure the adaptation of enemy behaviors and skills to their environment, the situation, or the player's level of training, while also considering the level of experience gained in combat with the user or another enemy.
As the game progresses, the enemy is expected to develop abilities in prediction, rational decision-making, and executing actions that are the most justified option for a given problem. The system will learn through successive interactions with the player, thereby developing its combat skills and responses to attacks, ultimately presenting the player with an increasing challenge.
The project utilizes two types of Machine Learning.
- The first employs a Behavioral Tree used for making decisions and performing actions based on the current state of the non-playable character's surrounding environment. Example reactions include following the player when they come into the model's line of sight, or fleeing to the safest possible location when critically low on health. The model also tailors its reactions depending on the situation - freely moving around the map in the absence of an opponent nearby.
- The second type of Machine Learning is based on reinforcement learning. In this case, the enemy representing the model is provided with numerous observations concerning both its current state and the surrounding environment, as well as the state machine values of the enemy or player. Based on the provided information, the model makes decisions regarding the choice of one of the available actions, which in this case are selecting the appropriate spell or opting for none. The actions taken are then evaluated, and the total points awarded in a given episode are used to optimize decision-making in later encounters.
In February 2022, this project was defended as my engineering thesis. It also won second place in the " Engineer 4 Science 2022" competition.