Can AI middleware really branch into high-level behaviours and learning?
Ed Fear takes a look at Xaitment’s wide-ranging modular AI solution…
Price: On request
German company Xaitment has always had a hard task ahead of it: not only convincing people that they need AI middleware – a tricky enough market to crack at the best of times – but that there’s also scope for high-level artificial intelligence tools beyond just pathfinding and dynamic obstacle avoidance.
Co-founded in 2004 by Dr. Andreas Gerber – a long time research scientist at the prestigious German Research Institute for Artificial Intelligence in Saarbrucken – the company has always been excited in the dynamic opportunities for AI to orchestrate new experiences.
“When we started, we came from a University background and we were full of all of these great ideas,” Gerber tells Develop.
“We saw games like FEAR, and the planning and dynamic and adaptive AI that was in them and thought, hey, everyone needs this. In truth, a lot of people said that, although it was nice, they really didn’t need it.”
So the team went back to the drawing board, and looked at what it had to do to make its modular suite of artificial intelligence tools – together referred to as xaitFramework – more appealing to studios.
It’s this introspection that has fuelled the development of the 2.5 versions, most of which will be out by the time you read this. As such, most of the effort has been placed on creating intuitive tools to decouple AI design from programmers and give it back to the designers.
“We came to the point where we realised we needed to provide developers with tools that would really help the internal workflow – especially to decouple the creative part from the development part. Often we see that the game designer and game programmer are completely separate people. One is quite structured, the other is quite creative. The designer comes up with the design, the programmer implements it, and then the designer says 'actually, no, that's not what I intended.' And then you're stuck in a loop,” says Gerber.
“Obviously, game development is all about iteration, but if the designer has to get the programmer to make changes then it really slows down the system. Our idea is that the game programmer can integrate once and then the game designer can make changes on his or her own. We’ve been talking to customers and we’re starting to hear them use the term ‘AI designer’, which is exactly what we’re evangelising.”
Of course, a further uphill battle is convincing people they need AI middleware at all – and in this sense, the firm’s pathfinding and movement modules, xaitMap and xaitMove, act as something like a gateway drug. Which might sound a strange way of describing it, but more and more companies need convincing that they need any AI middleware at all, let alone high level stuff.
“Sometimes we hear people say, ‘We're doing an MMO, we don't need any AI.’ But if you want the player to be able to click on a location and move there, well, that’s AI – it’s just very low-level stuff,” Gerber explains.
“Most people generate navmeshes by hand. They have lots of lines and points, but this is technology from the last century; it's really outdated. Our solution is automatic, and it’s 20 times faster than some other tools.”
Another module of the xaitFramework is xaitControl, a hierarchical, probabilistic finite state machine system. But, we ask Gerber, aren’t games already using FSMs extensively?
“Yeah,” he replies, “you can quite easily implement a simple finite state machine with some if/else statements. Everyone has these in games, and sometimes they’ll have visual editors for them too. But I’ve never seen any team – even the really big ones – develop a tool internally that’s generic enough to apply to the next game, and the next game after that.”
And so xaitControl fills that gap. But it’s not just AI behaviours that the tool is suited to. “You can of course use state machines for determining which animations should play, or even to completely control your GUI. That’s why it’s called xaitControl – it’s control of not only the bot’s behaviour, but also of the whole game flow should you so wish.”
xaitControl is, essentially, a bridging between the traditional AI middleware space of pathfinding – which xaitment covers with xaitMap and xaitMove – and what it really wants to bring to the world: agents that are aware of their surroundings, that can think, infer and learn from experience.
“The new things, like xaitThink and xaitKnow, are rule based systems where you can infer new knowledge about what you've seen before, or you can think about certain situations and come up with new goals. That makes the game much more dyamic but also logical, which makes it more understandable for the player.
“Think about Oblivion, for example: people would get annoyed by that because they would go into a house, steal something, and then get arrested when they leave. In these situations, the AI should only act on what it perceives from the environment. If the player was noisy in the house, and then gets arrested, they can say ‘Okay, I see what I did wrong.’ It’s a direct reaction, and it makes the world much more coherent and alive.”