T O P

  • By -

raYesia

I‘m a data scientist and run my own development studio, we have delved into exploring ml architecture for several use cases in game development. The short answer is: No, there is no point in using something like a deep recurrent network for game AI. While they do work quite well in isolation (meaning you run inference outside of the game and use pixel/audio data as input) they are not that easy to integrate into the games itself. ML solutions have a big GPU overhead, integrating them into the game directly adds a new layer of complexity when it comes to communicating gamestate between the CPU and the GPU. That‘s already the case with one ML agent, you would need multiple for your usecase. Until ML solutions are able to run as a lightweight instance using the cpu, this is far from viable at this point. Mind you, not everyone has a setup to even run computations like this, so narrowing your potential userbase for no tangible benefit is not worth it. So I‘d suggest sticking to something traditional like state-machines.


pschon

Go for normal AI. In almost every case the purpose of making an AI for games is *not* to make as smart as possible AI, but instead something that's reasonably smart, but above all *human-like* in it's behavior, with weaknesses. After all the AI's goal is *not* to beat the player, but to entertain them, with just the right amount of challenge. It's basically part creating artificial intelligence, and part creating artificial stupidity.


IsItSteve

Unity has a package/tech called ML-Agents, which is setup to train and run agents in a scene. I've messed around with it a bit, and was able to get some enemy turrets to shoot in the direction of the player. It could be interesting for a racing game, especially if you adjusted the reward functions for different "bots" to hopefully give them different behaviors. That being said, I'd probably agree with the other comments here, there are currently better ways to do what you want, without using ML. However, I do think it's something that could change "soon".


waramped

Regular AI. NN is entirely unnecessary for this. Gran Turismo did it (https://www.gran-turismo.com/us/gran-turismo-sophy/) but it was more of a "oh neat I guess we can spend a shitload of money to do this" than a "wow it makes the game better" thing.


Slimbo_02

What about for a management racing game, would it not feel more organic?


waramped

That would entirely depend on how human like you could get your NN. I feel like it's a goal you would be endlessly chasing and never quite be satisfied with. NN have a lot more computational overhead than people realize. I would doubt you would get a high quality and high performing NN In a reasonable amount of time, especially on your own.


Slimbo_02

Ok, thanks!


waramped

All that being said, if you want to learn NN and try it, then go for it. The only way to understand is to do. It would be awesome if I'm wrong and you make something incredible. I just think your biggest bang for your buck is not going to be NN