Most modern video games require the devs to implement some kind of artificial intelligence – for enemies, companions or even NPCs that populate the game’s background. It’s a tricky subject – players rarely compliment good AI, but will mercilessly mock any problems with it, AI is not easily transferable between projects and the question ’what is good AI’ doesn’t have a simple answer. There’s a lot of different approaches to how game characters should make decisions, changing one game mechanic can make existing AI models broken and the way we feed AI characters information is also a factor to consider. With so many problems at hand we sought a solution that would make the process simpler and less taxing.
Grail combines a number of different techniques for easy AI configuration:
- Multi-agent system
Multiple entities may communicate with each other using blackboards, multiple AIs can control a single character, each using a different decision-making process.
- Utility AI
Model AI agents’ preferences using mathematical curves.
- Planners (GOAP)
Long-term action sequence planning based on defined goals and actions. Planners dynamically adjust the sequence of actions in reaction to changes in the environment.
- Simulated games
Creates a large number of MCTS simulations on a simplified game model to make decisions while taking into account long-term consequences and possible actions of other agents.
GRAIL IN ACTION
HOW DOES IT WORK
Grail is an AI middleware for game development, a plugin, that contains refined yet approachable AI techniques for implementing Advanced Intelligent Behaviors.
Grail consists of a C++ code library, a C# library, and dedicated plugins for the two popular game engines: Unity and Unreal. As such, Grail can be plugged into any game development environment that interfaces with those two programming languages.
In addition to the code and the plugins, we provide a desktop app that can be used for configuration and debugging without the need for coding and recompiling of the game.
State-of-the-art AI solutions for gamedev