IA Logo


IA Information
Communication

Dave Mark's books

Post-Play'em - Observations on Game AI


Posts Tagged ‘The Sims’

Skyrim: It’s a Free-for-All!

Sunday, January 1st, 2012

Just had a battle out on the plains west of Whiterun. It was bad enough that I got jumped by a dragon. Then, the dragon flew a ways away and started chillin’ a nearby mammoth. Lydia and I continued to take potshots at Mr. Dragon (Mrs. Dragon?) while the mammoth ineffectually stared down its assailant. Eventually, the mammoth started running (right past me and Lydia!) and the dragon seemed to give up on it.

Unfortunately, I soon realized that there were a couple of mages wandering around the area who, for some reason, apparently decided that Lydia and I were far more menacing than the circling beast. And then there was the skeleton — who may or may not have been the product of the mages who started attacking me. By the time I dispatched the skeleton, the dragon had gotten bored with whatever it was he (she?) was fighting nearby and came back to visit. This all came to a rather unfortunate end… but that’s not what I came to tell you…

“There seems to be a serious lack of proper prioritization of targets.”

The point of all of this is that there seems to be a serious lack of proper prioritization of targets. For example, despite the fact that a mammoth might look awful tasty to a dragon, said morsel is not going to be able to attack you. Better to dispatch the pair of annoyances that are pumping arrows into you and come back for the hairy buffet later.

The same can be said for the mages. If there is a dragon cruising around, it seems rather silly to attack two relatively harmless bipeds. In fact, the chances of defeating the dragon (and therefore surviving) would go up considerably if it was attacked by a group rather than by a couple of individuals. An additional bonus would be that the dragon might take such a toll on your secondary opponents that it leaves you an advantage you might not otherwise have.


Obviously the target selection algorithm doesn’t take a lot of this into account. It’s really a matter of mathematical modeling. Ironically, it is the same sort of modeling that goes into non-combat games such as The Sims. The good news is that it is relatively simple to put together and can adapt to pretty much any situation that your NPCs find themselves in. It can also be  tied into the entire combat selection system so that the possible actions could include not attacking anyone at all (even running away, if necessary).

For those that are curious as to how such utility-based systems can be built, it is pretty much the entire point of my book, Behavioral Mathematics for Game AI.

Doom 3: Pretty Wind-up Toys

Thursday, December 13th, 2007

I dug out my Doom 3 again specifically for this blog. I hadn’t ever finished it when I started playing it about a year ago. It sure was purty, but it just didn’t engage me the way that I was hoping it would. Anyway, my thought as I returned to my saved progress was “pay attention to the AI so I can review it.” As I played, I became a little unsettled – not by my progress in the game, but by my progress in my quest for AI. I finally had to come to a realization that seemed almost blasphemous or sacrilegious.

Doom 3 doesn’t have AI.

Sure, I know that statement is a little over the top. Let’s face it, the AI in Doom 3is better than that of games from when I was a kid in the 80s. But that is also the heart of the problem. Doom 3′s AI isn’t much better than what was in the original Doom in 1993. Considering the related concept of Moore’s Law, you would think thought that AI would have increased at a geometric rate similar to that of anything else in computing. It is with that expectation that I claim that Doom 3 “doesn’t have AI”. Looking backwards down a Moore’s Law curve of AI, one could make the statement that the AIs in the past approach zero… therefore being zero for all intents and purposes – especially in a relative sense to where they should be today. So… my statement is now qualified somewhat. (Why do I feel like I’m going to end up having an uncomfortable beer with someone from id at the GDC in February?)

The comparison to the original Doom (or Quake, et al) is not far from the truth, however. The state machine has to look something along the lines of:

  1. Idle
  2. Agro
  3. If has ranged weapons – fire
  4. If no ranged weapons – approach target
  5. If health <= 0 then Die

That’s it. In the newer versions, you can splice in something towards the end that involves a side-step. The bad guy marines especially will do this. To me, the player, this makes me do the very involved strategic and tactical process of… uh… re-aiming my gun. Wow.

Admittedly, there are some baddies that give me more fits than others because they are not approaching me in a straight line. Lost Souls tend to zip around like gnats once they get close to you which is mildly annoying and Cacodemons will float around as you shoot them – but that means they have as much AI as a helium-filled piñata. There are other differences as well. The half baby/half fly Cherubs will back off a bit, prepare a moment, and then leap. Of course, so do the little spider things.

This is a major let down. I remember seeing some in-game clips at a game conference during an interview with Carmack. (I believe it was at E3.) The scene where the pink baddie tried to beat down the door, gave up and instead came crashing through the window was terrifying! “Wow! It gave up and used the window!” I told myself. When I played the game… and that exact same sequence happened, I realized that the whole thing was scripted. Oh. Bummer. Again, it wasn’t AI. Unlike F.E.A.R, where the agents do use their environment and re-plan when faced with obstacles such as the door above, the Doom solution was a movie crafted for my benefit.

I have been flanked by the computer, however. This I admit. Often! But that has nothing to do with the AI and everything to do with the placement of triggers. In true horror movie fashion, the computer does come up behind you often – but only because a designer placed a trigger on the floor that says “when player gets here, spawn evil dude behind him”. That isn’t AI. It isn’t even fake AI. In fact, it’s getting rather tiresome to know that every step I take is likely to generate an attack from a place I just cleared out. It makes for great anxiety and twitchyness – which is great for a horror movie. I admit that I have a good deal of tension when I play the game not knowing from which dark corner or what hidden panel I will receive the next assault. But it’s not AI. Really, it’s like making the “only average” fastball pitcher harder to hit by moving him closer to the plate or allowing him to throw from foul territory. He isn’t a better pitcher now… he just has been given an artificial advantage.

Really, the movement and attack logic for the enemy is not much more advanced than the little table-top wind-up toys. They will chatter away in my general direction, but there isn’t much purpose or reactivity to their actions. That gets very disappointing.

There does seem to be a bit of cheating going on, as well. The first time I fought a Mancubus, I was doing my best to flank him around walls. Despite having moved at least 60° off to the side, when I poked my nose around the wall to take another shot, I found he was already facing right at me. The explanation would have to be that there is omniscience on my position. Here, I had decided to do a simple, but what I thought clever, evasive maneuver only to have the game say “tough… I don’t care”. It’s deflating to have that happen.

There also may be some cheating going on for my benefit as well. This doesn’t fall exactly into AI, but it is relevant nonetheless. I swear that I take less damage per attack when I am almost dead. I haven’t done the math yet, but it seems that I can be in the teens or single-digit health for far longer than I spend in any other 10-number range. A hit that takes me down from 100 to 80, for example, may also only take me from 15 to 10. The result is that I spend a ton of time between 0 and about 40. Of course, if this is happening, this is a great device for creating tension in the game – and is a variant on rubber-banding. It’s rather artificial and arbitrary, though.

All in all, Doom 3 is a pretty game. It’s gorgeous. It’s use of dynamic lighting was cutting edge and very impressive for 2004. However, when you put it up against the interactivity and dynamicity of other shooters, there is something empty about it. It’s like trying to engage in a dialog with paintings in the Louvre. They are very impressive as art – but they aren’t going to talk back.

I have always respected John Carmack for his vision – and the “visions” that his games have provided for me. I just can’t help wondering what would happen if they were to put a bit more focus on AI. I notice on the Wikipedia site that Johnathan Wright is listed as an “AI Programmer” but that in the credits for Doom 3, he is just listed as a “programmer”. I would love to sit with him at a GDC party and have that beer. “What’s up, dog? Is there anything else you could be doing?” I can’t blame him, necessarily. Given the depth of the graphics rendering, he may very well just be out of clock cycles. *shrug* I hope that he has a better chance in the future. I would very much like to see an id offering that does “speak to me.”
Until then… there’s more than enough to challenge me elsewhere.

Technical AI reviews at AIGameDev.com

Sunday, December 9th, 2007

AIGameDev.comNot to distract attention from my blog, but my friend, colleague and co-author in AI Game Programming Wisdom 4, Alex Champandard of AIGameDev has a brilliant series of articles on his site. They are technical AI reviews of major games that are written in a bulleted sort of fashion such as “21 tips from [Title] to use in your game.”

Much of the time there are links to interviews or write-ups by the AI designers themselves that Alex uses to put together his lists. Often, that is where the true meat of the entry is. The content is definitely geared towards the programmer or designer, but much of it can be digested by the game enthusiast as well. The best part is if you have actually played the games as well so you can have a peek under the hood and see what was causing it to be so engaging.

Since Blogger allows me to paste in urls automatically, I’m going to cheat and paste links to each of the articles:

Anyway, after completely immersing yourself in the AI wonderland that is AIGameDev.com, please remember to stop back by here once in a while! :-) Alex would want it that way, too!

Add to Google Reader or Homepage




Content 2002-2017 by Intrinsic Algorithm L.L.C.

OGDA