GPGPU-accelerated artificial intelligence expected to be featured in games as soon as this time next year
Nvidia and AMD have already demonstrated the amazing potential of GPGPU technology when it comes to anything from physics processing to Folding@home, but the companies have now revealed that they're working on GPGPU-accelerated AI in games, and that we could see the results as soon as this time next year.
AMD’s developer relations manager, Richard Huddy, explained to Custom PC that the most common AI tasks involve visibility queries and path finding queries. ‘Our recent research into AI suggests that it’s not uncommon for gaming AI to spend more than 90 per cent of its time resolving these two simple questions,’ says Huddy. He also added that these two queries are ‘almost perfect for GPU implementation,’ because they ‘make excellent use of the GPU’s inherently parallel architecture and are typically not memory-bound.’
Nvidia’s director of product management for PhysX, Nadeem Mohammad, agrees,telling Custom PC that ‘all the simple, complex operations’ involved with path finding and collision detection ‘are all very repetitive, so path finding is one of the algorithms which does work very well on CUDA.’
‘You can always imagine CUDA as loads of processors running the same program but not the same instruction, and ideally on the same data set but with different input parameters,’ says Mohammad. ‘So, in the context of AI, the data set consists of the whole game world, and the parameters going into it are the individual bots – that’s one way of neatly parallelising the problem. If you look at it in that context then any AI program could be accelerated.’
It doesn’t look as though we’ll be waiting for long before we see GPGPU- accelerated AI either. Both AMD and Nvidia claim to be working with several game developers and middleware developers in AI at the moment, although no names have been revealed yet. According to Huddy, ‘some middleware providers are looking at this in terms of packaging up a GPU AI library for games, while some developers are looking to transfer their own existing AI code from CPU to GPU.’ Meanwhile, Mohammad estimates that we’ll see GPGPU- accelerated AI as soon as a year from now now. ‘I don’t expect it before 12 months,’ he says, ‘but I would definitely expect it within 18.’
The idea of GPGPU-accelerated AI is also appealing to game developers. ‘I think there's a lot of potential for GPU acceleration to benefit AI,’ Relic’s senior programmer on Dawn of War II, Chris Jurney, told Custom PC, ‘all our AI is grid based, and we're already using rasterisation to keep our maps up to date, and for line-draws on those maps to test for passability, so it's a great match.’
However, both AMD and Nvidia are talking about processing AI using in CUDA and Stream at the moment, which would make it hard for GPGPU-accelerated AI to become a standard. Relic’s Chris Jurney points out that ‘we rely on the fact that all CPUs in all PCs come up with the exact same result to make multiplayer work. We're only transmitting the inputs and commands between players, so if two GPUs decide on slightly different results in the AI, different players will be playing in different worlds.’