This video shows my approach to an adaptive AI during the process of adjusting itself to the circumstances of a previously unknown environment.
In the environment piles of food (red dots) are randomly distributed among its rectangular surface which is also populated by the NPCs (moving dots). The aim of the NPCs is to gather the food. When a pile is absorbed a new one appears at a random position. A small house which serves as the NPCs' spawn point is positioned in the center of the area. Additionally the environment runs a weather simulation.
During rain an NPC becomes wet (indicated by a bluish coloring) when it stays outside the house. After a while a wet NPC becomes ill (greenish coloring). When it is not located in the rain it dries. To convalesce the NPC has to stay dry for a certain amount of time.
The AI utilizes an Evolutionary Artificial Neural Network to adaptively classify the virtual character's current situation in combination with a Finite State Machine that stores the character's potential reactions to occurring situations.
In this experiment the FSM stores only two different states:
• GoHome: In this state the NPC moves straight to the house in the center of the area and stays there until the state is changed.
• GatherFood: The NPC wanders around until it detects a pile of food in its range of vision. When this occurs the NPC approaches the food to gather it.
The initial AI acts randomly but after only 10 generations all the entities in the population converge to a similar behavior. They have learned that it is best to stay inside the house during rain and go out to gather food when the sun is shining. Subsequent generations stick to this policy.
For further information on this topic please follow this link to my homepage: