CPU budgeting for games

Where Iroboto says multiplayer is easier to do than AI, I know people who say, "do single player games because networking is a nightmare," and they're all right. When you are struggling to get AI behaving itself, multiplayer looks stuipdly easy, and when your networking code is bugging out just in getting the frickin' server started (current issue I have, based on the library I'm using where after a couple of days it appears there's a bug), you think to yourself this would be a lot easier just creating a single player game. I know a guy who's game was refused release on PSN because of multiplayer bugs and there was almost no means for them to debug it without multiple SDKs.

In short, there's no such thing as an easy game. ;)
I should amend that to being "realistically behaving AI: where additional CPU cycles are meant to drive more realistic actions etc. In which a real player might be easier to have around instead.

To be honest I'm not even sure what realistically behaving AI would be. Lol I guess closer to how a human would interact.

But I agree with all posts here.


Sent from my iPhone using Tapatalk
 
Last edited:
Once again I have to mention the good old Halo 1 AI presentation:
http://halo.bungie.org/misc/gdc.2002.haloai/talk.html

Game AI will probably take a few more decades to become truly "intelligent", but that's not really what it should be. The illusion is more important, and I believe one of the most important aspects there is to avoid anything that would break that illusion. Based on how well it worked in an Xbox1 game, I'd say that it has less to do with CPU power and more with careful design, both in the code and in the gameplay and levels.
 
I'll always remember Carmack talking about the incredibly simple AI routines in Doom, but how that led to behavior that looked like flanking and such, and players would convince themselves the AI was really smart and be thrilled with it, based off extremely simple routines.
 
Once again I have to mention the good old Halo 1 AI presentation:
http://halo.bungie.org/misc/gdc.2002.haloai/talk.html

Game AI will probably take a few more decades to become truly "intelligent", but that's not really what it should be. The illusion is more important, and I believe one of the most important aspects there is to avoid anything that would break that illusion. Based on how well it worked in an Xbox1 game, I'd say that it has less to do with CPU power and more with careful design, both in the code and in the gameplay and levels.

BTW - I love that presentation. I've used it in the past to illustrate to people that making a good AI means it also needs to be a believable AI.

That said, it's a combination of the two. I wouldn't say one is less important than the other, or that you can skimp on CPU processing time for AI in favor of clever tricks. For example, it'd take less CPU cycles to make an AI that has prefect aim and reflexes than it does to make an AI that has imperfect aim and variable speed reflexes. You can see this in practice a lot with budget indie shooters where the AI, more times than not, has perfect aim and supernaturally fast reflexes.

And good pathfinding is always going to be CPU intensive. Especially if you want to make it behave believably (more nodes required and more branches/conditionals in behavioral AI for pathfinding choices) and less predictably (IE - not follow the same routes as every other AI in the game). Even more so if it isn't a "corridor" style game where the available pathing options are far more limited.

Hence why you often see very limited AI actors in many games. COD for instance only has a relatively few amount of enemies active at any given time with more spawning only after an existing AI actor is killed. That works for "corridor" style games, but doesn't work for open world games or games that have a lot of actors active.

Regards,
SB
 
http://www.omicsgroup.org/journals/...ted-air-combat-missions-2167-0374-1000144.pdf

Alpha runs on an equivalent of a budget desktop PC and in its current state can readily take out experienced human pilots.

It's not a question of hardware performance anymore it's a question of devs putting the work in to create a robust AI system. But gamers aren't going to want to play a game where the AI hands them their ass every time. It's just has to be good enough to keep players engaged. What we end up with is an emphasis on pretty graphics and AI supposedly good enough to challenge players but eventually be defeated.

Good AI will be the equivalent of a big brother that intentionally loses to his little brother but challenges him enough to create a sense of achievement.
 
Last edited:
I'll always remember Carmack talking about the incredibly simple AI routines in Doom, but how that led to behavior that looked like flanking and such, and players would convince themselves the AI was really smart and be thrilled with it, based off extremely simple routines.

Flanking can usually be easily achieved with changes to the pathfinding system. So if you have multiple AI agents, have the first use an optimum pathfinder route and the other(s) less optimum - flanking will just happen. :yep2:
 
http://www.omicsgroup.org/journals/...ted-air-combat-missions-2167-0374-1000144.pdf

Alpha runs on an equivalent of a budget desktop PC and in its current state can readily take out experienced human pilots.

It's not a question of hardware performance anymore it's a question of devs putting the work in to create a robust AI system. But gamers aren't going to want to play a game where the AI hands them their ass every time. It's just has to be good enough to keep players engaged. What we end up with is an emphasis on pretty graphics and AI supposedly good enough to challenge players but eventually be defeated.

Good AI will be the equivalent of a big brother that intentionally loses to his little brother but challenges him enough to create a sense of achievement.

Making an AI that can hand players their asses is easy. You've been able to do that for decades. At least with regards to shooters. That'd basically be a variation on relatively simplistic aimbots. It doesn't matter if their pathfinding is horrendous and stupid if they see you and shoot you before you can even see them being rendered.

Something like chess is a bit more difficult, but that's just calculating probabilities. The most difficult is making the AI behave in a way that is believable and fair relative to the skill of the player. That requires both computational power as well as good AI design. That's something that doesn't require "too" much with only 1 AI. But once you start ramping things up computational requirements start to escalate. Especially if the AI must then cooperate and coordinate with other AI. Giving the AI more freedom to choose behaviors ups complexity and computational cost yet more.

Hence why most shooters.
  1. Limit the engagement area. Reduces computational cost of path finding.
  2. Limit the number of active AI agents.
  3. Limit the number of permutations that AI can select from when deciding how to behave. Hence, why with multiple playthroughs the AI becomes predictable and easily manipulated by the player.
  4. Limit the way the AI can interact with other AI (either cooperative or in opposition).
  5. For large crowds (like COD battle scenes) AI is significantly reduced in complexity with significantly limited pathing for the majority of the active AI. To the point where much of the NPCs might just be scripted and go along scripted paths.
Moving up to strategy games, things get far more complex. Look at how long it can take for the AI to take a turn in something like Civilization as the size of each nation increases over time. And that's even when there is little to no time spent rendering the actual movements of the AI due to fog of war. RTS games have it tougher as they have to do things in real time unlike turn based strategy games. On the other hand the scale of an RTS match is often smaller than a turn based strategy game.

The fuzzy logic for UAVs already has a computational advantage over game AI in that it doesn't need to attempt to behave in a manner that is believeable. In fact, attempting to do so would be counter productive to a UAV that doesn't have to worry about the limitations of a human body piloting a vehicle in flight. It also doesn't have to share processing time with game logic or rendering tasks. However, it does have to be far more robust than a game AI. It doesn't have the option to suffer from a corner case where it just mindlessly runs into a wall. :D

It's still a fascinating read, however. AI is cool. :)

Regards,
SB
 
Back
Top