Tutorials
RSS Feed
Brain Training
An overview of the artificial intelligence field
by Ed Fear
Not so long ago, AI was the ingredient many thought would bring about a revolution in gaming. And then physics came along and stole its thunder, leaving it to flounder. We look at what today’s consoles can do to train games’ brains…
There’s a bit of a problem with AI. But it’s not some insurmountable scientific barrier, and neither is it a technological constraint. Rather, the problem is that it largely exists in the eye of the beholder.
While a complex physics engine produces easily observable, predictable results – shove a pile of boxes and they will topple, push a barrel down a hill and it will roll – AI is much more of a mythical force, one that has less immediately visible effects. That’s not to say that the line between convincing, intelligent behaviour and blindly running into a wall isn’t distinct – clearly, it is – but that it’s an extremely thin line, breaking a binary boundary between ‘great’ and ‘awful’.
So, how do you make sure you stay on the right side of the divide? The key to making characters behave in a realistic manner, says PathEngine’s Thomas Young, isn’t in using brand new AI techniques, but in applying currently existing techniques in a uniform way.
“As a game player I see many aspects of game AI that could be improved to make a big difference to my game-play experience, but essentially are all about making known techniques work correctly in a context; about implementation nuts and bolts.
“For a game developer, the key issue is making techniques apply absolutely robustly in all kinds of situations.”
In essence, there’s no point in using new fancy AI techniques if they don’t fit or can’t be relied on to always provide acceptable results.
NEURAL MELTDOWN
For example, much talk was previously focused on neural networks, an area of AI that aims to approximate the brain’s structure to provide a similar learning/judgement model.
Despite featuring a topology suitable for learning – an often-requested feature in games – their usage never took off as some expected. Training the network to give acceptable outputs takes time and can require significant horsepower, and the ‘network’ structure means that they act like a black box; the rhyme and reason behind outputs lost amongst a tangled nest of arcs.
But neural networks are just one example of several ‘vogue’ techniques that have been developed in the AI research field and jumped on expectantly by developers, only to discover non-suitability. “Few AI concepts are used in gaming because AI is a very broad domain, from cognitive science to natural language or advanced data mining,” explains Pierre Pontevia, CEO of Kynogon. “Most of these domains aren’t relevant for game programming.”
The fact is that, unlike many other areas of game development, AI isn’t driven by research into new techniques because the aims of the researchers are so different to those of the real-world implementers.
“The world of academic research tends to be about demonstrating something new and interesting, at a high level, with the actual engineering details not so important – but in the world of game development things are the other way around,” admits Pontevia.
FINDING YOUR PATH
It’s fitting, then, that AI middleware doesn’t approach the problem in quite the same way that other middleware does. While Havok might be a complete solution to providing accurate physics in a game, there’s little such ‘full solution’ AI middleware available on the market. Think about it: would you want your AI to act exactly like it does in your competitors’ games because you’d used the same behaviours?
As such, a large amount of the AI middleware available automates low-level, but absolutely crucial, elements like pathfinding – something that doesn’t sound nearly a sexy as neural networks or genetic algorithms, but is far, far more essential, and can make or break your game.
Kynogon, which counts dynamic pathfinding as one of the key features of its Kynapse technology, distinguishes the sorts of tasks that middleware can provide from the ones that have to be developer controlled. “We split game AI into two fields – ‘Decision AI’ and ‘Action AI’. Decision AI is the decision making: why a character does something and makes certain decisions, whereas Action AI is about how the character will do what it has decided.
“Decision AI is very gameplay specific and constrained by scenario, so if there are evolutions in this domain they will come from the game designers. But we focus on Action AI with key components such as 3D pathfinding and special reasoning.”
Time was, pathfinding meant an implementation of A* or one of its variants, often accompanied with pre-calculated navigation meshes based on level topography, but these days things have changed significantly. Thanks to the advent of advanced physics simulations in games, levels now tend to be littered with more objects that can – and frequently do – move and scatter. As such, relying on pre-calculated walk meshes alone is a less feasible prospect, as objects need to be dynamically circumnavigated or avoided, whole routes recalculated on the fly.
Doing this in real-time on previous-gen consoles would have been impossible, but the parallel nature of modern console architectures means that these calculations can be offloaded to another core or SPU.
“Multi-core technologies enable the game developers to spend much more resources than were possible before,” elaborates Dr. Andreas Gerber, CEO of AI behaviour technology company Xaitment. “Implementing believable AI on the last generation consoles was just not possible.”
These parallel architectures are also enabling larger amounts of intelligent agents on screen at once, realistically populating the large worlds that players have come to expect in contemporary games. “We’re seeing more scenes with crowds of characters that can display complex behaviours, like panicking or rioting,” explains Robert Kopersiewich, VP of product management at Presagis, the developers of AI.implant.
BRAINS OF THE FUTURE
So if the future of game AI isn’t in new revolutionary concepts or models, where does it lie? Most agree that it likely lies in improvements in current techniques, but there are areas into which research is being applied.
One such area is that of spatial reasoning, says Pontevia: “Pathfinding tells you how to go from point A to point B, but spatial reasoning tells you why B is an interesting destination.
“You need to be able to dynamically analyse the 3D topology to identify interesting locations, such as hiding places, access ways and threatening zones. Being smart starts with understanding properly your environment.”
And the future? TechExcel’s CEO Tieren Zhou imagines a future where games are all like virtual worlds: “Characters could adapt themselves to change, not based on pre-defined characteristics. That would make games more adaptive, more exciting.
To build characters with infinite change, and with self-adapting and self-forming capabilities, AI will play a significant role.”
Such a vision may seem far off, or even a nightmare to some designers, but in reality the latest hardware makes this sort of autonomy a more viable prospect.
“The time is right for significant advancements in AI,” says Kopersiewich.
But nothing will happen until developers see the need for it. Despite being a hot topic in previous years, AI would appear to some to have fallen as the gaming zeitgeist. Adds Gerber, that doesn’t mean it’s any less important.
“Physics was the hype of yesterday, but now every game does it. Every game has a complex graphics engine. The only thing games can differ is AI, but only when game studios and publishers spend more resources on AI. If only one to three per cent of the budget is spent on AI, it’s clear that the results won’t be adequate.”
INTELLIGENCE GATHERERS
Xaitment
www.xaitment.com
andreas.gerber@xaitment.com
+49 (0)681.9593.140 (EU)
+1 (415)259.6253 (US)
Kynogon
www.kynogon.com
info@kynogon.com
+44 (0) 1372 454083 (UK)
PathEngine
www.pathengine.com
partners@pathengine.com
(+33) 4.78.27.06.02
AI.implant
www.ai-implant.com
info@presagis.com
1-800-361-6424 (US)
TechExcel
www.techexcel.com
emeasales@techexcel.com
+44 (0) 208 322 7750
Other Tutorials
- Heard About: Battlefield Bad Company
Apr 18 - Behind the scenes of EA DICE's next-gen sound design
- The Power of Touch
Apr 16 - A guide to using haptic devices for art and design
- Heard About: SingStar PS3
Apr 03 - London Studios' Dan Bardino on the production of Sony's singing game
- Sound for a pound
Mar 20 - Guide: Audio engines
- Autodesk's move into middleware
Mar 18 - Behind the scenes of the Kynogon acquisition
- Never Say Die
Mar 14 - An introduction to Havok Behaviour
- iPhone development
Feb 14 - An iPhone / iPod Touch programming primer
- The Epic Diaries: February
Feb 14 - Epic's monthly update on all things Unreal
- Enter the light
Feb 13 - KEY RELEASE: We look at Geomerics' Enlighten
- Striking the right pose
Feb 11 - Character animation tools round-up
- Where next for NVidia and Ageia?
Feb 07 - ANALYSIS: How the recent acquisition could affect developers
- Q&A: France's Play All initiative
Feb 05 - The nuts and bolts of building a shared tech framework
- Mobile Antix
Jan 16 - How one company plans to revolutionise mobile development
- Q&A: Microsoft Research Labs' Joaquin Quiñonero Candela
Jan 04 - On new XNA contest Silicon Minds and work with Lionhead and Rare
- Killer Characters
Jan 02 - An overview of the leading character animaton tools
- Part of the process
Dec 13 - Our round up of source control and build managers
- The Epic Diaries: December
Dec 07 - Epic's monthly update on all things Unreal
- Visual arts
Nov 23 - What's new in Microsoft Visual Studio 2008
- Security tools round-up
Nov 09 - Keeping your code locked and bolted
- Heard About: Sega Rally
Oct 16 - All about the audio in Sega's racing remake
- Poetry in motion
Oct 08 - The latest moves in the mocap market
- Heard About: Harry Potter and the Order of the Phoenix
Sep 19 - The audio production of the new movie tie-in
- In-house Party
Sep 12 - UK independents talk up the benefits of in-house tech
- Designing for Next-Gen Game Audio
Sep 05 - Rob Bridgett
- MMO Engine Round-Up
Aug 29 - Building the online planet
- Quick thinking
Aug 24 - Part 2 of 2: Further exploration of EA’s fast prototyping strategy
- Grand Rapids
Aug 23 - Part 1 of 2: How EA is implementing rapid prototyping
- Designing games for the Wiimote
Aug 22 - Making games for Nintendo's motion sensor
- Arcade Fire
Aug 21 - Stainless Games offers eleven top-tips for Xbox Live Arcade development
- Heard About: Heavenly Sword
Aug 14 - Ninja Theory and SCEE discuss the audio production of a PS3 epic
- Brief Encounters
Aug 07 - How to prep your outsourcing partners
- Lost in Translation?
Jul 19 - Guide to getting audio translation right
- Transition Tips
Jul 16 - Swordfish Studios' advice on getting ready for next-gen production
- Deal... or no deal?
Jul 06 - How to get a good contract
- 8 steps to a successful studio
Jul 06 - Simple advice for your business
- Succesful networking
Jul 04 - Online gaming best practices
- Avoiding crash and burn
Jul 04 - Ensuring staff stay happy
- Casual creations
Jul 04 - Justin Felker
- Sell your studio
Jun 28 - Nav Sunner












