Effective talk: Non-fighting AI systems
Year of Talk: 2019
Video Link: Stop Fighting! Systems for Non-Combat AI
Most AI that is meant to be background characters tend to not have many actions. They tend to just repeat the same handful of animations making them seem lifeless. In comparison, most of the effort is put into improving the AI that's meant to be fighting the player.
An example given is in the pillar of eternity whenever there is combat occurring there can be NPC AI seen standing around while a fight is occurring. If the reputation system is considered so that players with a favorable reputation in a town cause the NPCs to join on their side for fights.
When creating AI that is meant to be doing a variety of tasks that aren't fighting then it's important to remember that they dont need to be highly realistic. Only that they seem like they are acting as close to humans as possible.
One of the best systems for AI to create more down-to-earth characteristics is using a Utility AI. This comes down to the fact that the Utility AI allows for all the tasks to be ranked with scores allowing the AI to know what tasks have the most prerequisites filled. At the same time if a random number is calculated that's weighed towards the tasks with the highest scores. This means that even if the environment doesn't change as much the AI will be able to choose different tasks.
A way to improve the values that come out of the Utility AI is through using stats and traits. The reason is that it allows for more personalization for each character to make them feel more unique. It also allows for the values being calculated to have even more variation as a task might be favorable due to a trait and it gets pushed up. Which might not guarantee it all the time but will allow it to be more common.
A continuation of this is having a reputation system between the different NPCs. This helps determine how likely an AI is going to interact with another AI or player. As well as affect the values for different tasks that might require that other characters to complete. For example, when deciding where to do the next activity might be influenced if a person with a good reputation is doing another task nearby.
Once many of these features are implemented an important mechanic to implement is having them work in different levels of detail. This comes down to the fact that as players go farther away from centers of population AIs will require more recourses than necessary. This can be done by reducing or temporarily removing certain features while the LOD is active. Which will cause there to be less factors being calculated and affecting the decision making of the AI until they reach a higher LOD.
A way to test how the AI might react and choose different tasks is through creating various simulations through Excel. As excel allows the user to input an equation with the different stats and traits affecting the final value as well as a random number generation. This means that multiple combinations of characters can be tested and see how they might act over time as well as see if there are any weird unforeseen values before needing to put anything into the engine.
The next step would be to implement prototype versions of the AI to see how they act in the environment. This way they can be tested with the actual tasks and any bugs or unforeseen task choices can be found. It also helps get a visual idea of how one of the AIs might move around in the space world from one task to another. This allows the designers to know if any tasks might need to be moved or the values changed.
One way to help with task decisions was setting up a scheduling system where certain times of the day would give bonuses to tasks commonly done around that time. An example is brushings one teaches in the morning or before going to sleep. This helps give structure to the day of the AI as well as not having them do tasks at a time that doesn't seem appropriate. This is extremely useful for AIs that are constantly interacting with the player or are visually close to the player throughout the game. Meanwhile, the more background characters can simply not have a schedule to follow and randomly choose the task without considering the time of day.
Creating multiple scheduling timelines for each AI means that at the start of the day, multiple tasks can be chosen for different times of the day. When they have multiple overlapping tasks in the same time frame then one of them can be given priority and chosen to be executed. This contrasts with periods when no tasks have been scheduled to occur. This can be used to create a new random task that best suits what is occurring in the environment or as a free time slot to do something else. This can change depending on the design of the game and what the AI is needed to do.
When needing to update the scheduler for different AI one can work out specific timeslots or moments where tasks are being changed to allow to update any important information. This is because trying to update every few seconds all of the schedulers becomes extremely costly. So determining what the more common times that tasks were changing and having many of the updates run around that time. This is set up with a callback method to call the appropriate updates when the tasks switch. At the same time, these are the more important moments when the scheduler and the AI would need to know of any info that has changed or been updated.
Comments