Grunt AI in Source
Post Reply
Quote
Re: Grunt AI in Source
Posted by satchmo on Fri Dec 3rd at 12:33am 2004


Most of you probably agree that the AI for those marine grunts in HL1 isn't much higher than that of G. W. Bush's. They frequently get lost, even with info_nodes scattered everywhere. In addition, they tend to just drop a grenade at their own feet and watch it explode.

Has anyone had any experience with the new grunt AI in Source? The full SDK has been out for a few days now, so those of you lucky enough to have the game must have had some opportunity to play around with it a bit (Unless everyone is busy hammering away at their entry for the DM competition).

I sure hope the AI is improved, as Valve claims. I love making SP maps, so this is obviously important for me.
[addsig]




Quote
Re: Grunt AI in Source
Posted by Campaignjunkie on Fri Dec 3rd at 1:01am 2004


Errr, how can grunts get "lost"? They only follow the info_node paths. Any ineffectiveness is on the part of the mapper, who didn't place the info_nodes very well. Essentially, you should not be "scattering" info_nodes everywhere. Anyways, the Combine grunts will work together and assault you from different sides. They will throw grenades sometimes to flush you out if you're hiding. They will seek cover. Elite grunts will also shoot off a plasma-orb, time to time. I'm no coder, but those are my observations.

As for AI; what exactly are you looking for in an AI? Consider the fact that most Combine grunts will be killed within a few seconds of contact, maybe surviving up to a minute at the very very most. The goal of AI is never to actually defeat the player, but just put up a fight for the player's eventual triumph. Realistically, if Combine grunts really wanted to kill you, they would spam your position with grenades or kill you just as easily as a human opponent in deathmatch. Is that situation desirable? Of course not. The Combine grunts are therefore, quite killable and similar to Half-Life 1 grunts. There's not much room to expand AI when the NPC's are limited to moving around and hurting you.

[addsig]




Quote
Re: Grunt AI in Source
Posted by KungFuSquirrel on Fri Dec 3rd at 1:49am 2004


No, the ineffectiveness is reliance on a node system that doesn't allow the AI to self-navigate, like certain other engines. hehe

There are still some traces of the marine AI in the combine soldiers... I did see the infamous grenade at the feet and ducking once and a number of spots where they felt pretty stupid. You do get the added bonus of hint nodes (think ai_scripted_sequences, but not called scripted sequences, so they can call the game 'unscripted,' even though it ended up being hugely scripted anyway), which specifies certain actions as being available at certain nodes. This gives you a little more control over things that you didn't have in HL. [addsig]




Quote
Re: Grunt AI in Source
Posted by satchmo on Fri Dec 3rd at 2:48am 2004


Thanks for the info.

When I described grunts getting "lost", I mean they'll run form one info_node to the other, sometimes running right past the player without confronting the player. And the info_nodes are carefully placed. I usually spend a whole day just to tweaked the info_node positions just right so to minimize their suicidal behavior. (Yeah, I shouldn't have used the word "scattered all over". I just meant that there is sufficient number of info_node strategically placed.)

And Campaignjunkie has a really good point about the purpose of the AI. I never thought of it from that perspective. I just figured they should do their darnest to kill the player, whichever way they can (even risking their meager lives). But I agree with your point of view.

I also found that, sometimes the grunts will stand right in front of you (facing you) without shooting you. And you can just start pumping them with bullets while they say "Ah, is that's all you've got?" or "Medic!" right before they die.

So Valve is really exaggerating when they claimed that the AI is dramatically improved. It's a sham (and a shame) that they use this ploy to market the game, yet it's really not true. Just changing the name of the entity doesn't ultimately mean the AI is unscripted.

The AI in FarCry is better, but too bad I can't play the game because of my anemic hardware.

[addsig]




Quote
Re: Grunt AI in Source
Posted by Campaignjunkie on Fri Dec 3rd at 3:02am 2004


Ah, yes, I guess grunts occasionally have other things on their mind.

But regarding the scripting: I don't think Valve's duplicity is as bad as some people make it out to be. As mentioned before, the average lifespan of a grunt isn't going to be very long. Think about that first Traptown E3 demo; the demonstrator avoided the grunts and ran into a building to barricade the door.

Would an average player actually do that? Probably not; they would whip out a machine gun and mow that soldier down (or at least I would), and then maybe explore the building afterwards for supplies. Let's assume that the AI does all those fancy tricks, knocking on doors, climbing things, etc. Most of the time, the grunt will likely be dead before doing any of this. So then, in the few instances that the player will actually run away, then you can script it and it'll still have the same effect.

I don't think it's practical (in the interests of finishing the game quickly) to spend time on teaching AI how to do this when the player will usually never see it. Of course, I'm not exactly defending Valve, as they did technically lie their pants off. Compared to Half-Life 1 though, I really think it is indeed an improvement. Monsters can actually patrol now, hurrah!
[addsig]




Quote
Re: Grunt AI in Source
Posted by satchmo on Fri Dec 3rd at 4:18am 2004


Guess I was expecting too much from the grunts when I design my maps. I tried to make maps that require stealth to evade the grunts, and most of the times that'll just make them seem too stupid. Occasionally, there would be a major fire fights in their vicinity, and they would just stand there, daydreaming about their girlfriends instead of jumping into the fray.

Another interesting grunt behavior is that sometimes one of them would keep trying to run away from the player, except that he's actually running against a wall. You can walk right up to him, start whacking him with a crowbar, and he *still* wouldn't turn around (even though he's got an assault rifle). He'll just keep on running in the same spot until he's dead. Perhaps it's a strange encephalitic virus that has affected his prefrontal cortex?

I should try to make all the grunts on the same squad. Perhaps that'll solve some of the issues. But at least Valve made some attempts at upgrading the AI in HL2.

Thanks for all the feedback.

[addsig]





Post Reply