Appropriate AI

Discuss Artificial Intelligence and Bot programming.
Post Reply
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Appropriate AI

Post by scar3crow »

What do you feel is appropriate ai for monsters, as opposed to bots?

What delineations do you think should occur between monsters and how isolated should their ai structures be? Obviously a rotfish isnt as smart as a scrag, but how would you do this?

I recall back in 1998, playing Half Life for the first time and my brother seeing me shotgun a Slave Alien and saying "I thought the enemies in this game are supposed to be smart" To which I responded "Well that one in particular is dumb, hes not supposed to be, smarter ones come later." Of course I eventually discovered that the Smarter AI was mostly a fabrication and it wasnt until Unreal that I encountered AI that I was pleased with, but nonetheless - How would you organize such a thing into your mods, and even more so, why havent you?
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: Appropriate AI

Post by frag.machine »

scar3crow wrote:What do you feel is appropriate ai for monsters, as opposed to bots?

What delineations do you think should occur between monsters and how isolated should their ai structures be? Obviously a rotfish isnt as smart as a scrag, but how would you do this?

I recall back in 1998, playing Half Life for the first time and my brother seeing me shotgun a Slave Alien and saying "I thought the enemies in this game are supposed to be smart" To which I responded "Well that one in particular is dumb, hes not supposed to be, smarter ones come later." Of course I eventually discovered that the Smarter AI was mostly a fabrication and it wasnt until Unreal that I encountered AI that I was pleased with, but nonetheless - How would you organize such a thing into your mods, and even more so, why havent you?

Speaking about Quake-related monsters levels of AI:

bosses > (enforcer|grunt|scrag|knight|hknight) > ogre > zombie > (dog|fiend|tarbaby|rottfish)

I don't expect to see a dog or a tarbaby straffing. But simple things, like awaking when a rocket explodes nearby or when stumbles in a corpse would be pretty obvious AI requisites IMHO. Also, puny monsters fleeing if the player is heavy artillery would be funny. :)
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
RenegadeC
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada
Contact:

Post by RenegadeC »

I wish I could reanimate the Quake monsters sometimes. I had a dream of a shambler climbing up a ledge and climbing a wall using his claws, jumping on a platform I was standing on and killing me.

You need appropriate animations to flow along with the AI.
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

Haha.. I think you might be the only one who can imagine the shambler as a climber. In my view he is simply mounds of sexy white flesh, kind of like Marilyn Monroe but not really. And no footholds are going to hold his massive feet.

I once added an animation to the fiend where he hits a wall in midjump, gets his claws stuck in the wall, puts his feet up on the wall and pulls his claws out looney tunes style. It was going to be for Hammy Bob Quake, a humour mod, but I lost it :( I had it QC coded up and everything, it looked pretty funny although I'm not a really good animator.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

One more major problem (atleast to me) is where to draw the line? How smart are you supposed to make monsters? Should they somehow work together (hard!), or is just some cool dodging/strafing routines along with semi-intelligent hiding considered intelligent monsters (as seen in Unreal)? Also, will anyone ever notice all the work you've done if they just run around instantly gibbing things that appear under their crosshair?

These problems are heavily related to the game design itself. The latter issue especially is what makes smart monsters only suitable for games with less superweapons (100 rockets and an automatic quick-reload mechanism anyone?), and more tactical weaponry (and a more vulnerable player). FEAR did a lot of cool stuff, but it also had very few explosive weapons, and lots and lots of possibilities for the soldiers to act smart. Places to hide, alternate routes for flanking (awesome!), and lots of cover and weird geometry to do tricks with. It was sadly also very repetitive.

Quake very much lacks in some of the traditional requirements for smart-enemies to be able to exist, like vulnerable player, geometry for cover and tactics, and weapons that need reloading or some other tactical element. This makes it more of a challenge to create something that could be considered intelligent. There is however, a way to do it.

You will want to look into how the player acts in the world of Quake for inspiration for smart behavior. Generally speaking, it's a very straight on approach. You run towards your goal, and shoot at things in your way. Often the player needs to dodge things (jumping fiends, ogre grenades). He sometimes also hides behind things when things could get very grim (like the un-dodgeable shambler lightning-beam, or Chthon's lavaballs). At times he will run away, when facing something way too tough (facing two shamblers armed with only the shotgun).

With this information, we can come to the conclusion that to be smart in Quake you need to: Be able to dodge (imagine grunts jumping away from a grenade lying on the floor, or circlestrafing you). You need to be fast, because the weapons and the player is fast, so up the monster movement speed and turning speed. Hiding can be tough considering the weak possibilities in the geometry, but combined with the ability to run away and regroup (a lone grunt sees the player, he runs away, finds other grunts, and decides to alert them about the players presence, and wait the player out together to stand a better chance) can make it a useful technique.

Something that's generally a good idea to make monsters look smart, is better navigation. The fact that the Quake monsters have no idea where they are, and barely where they're going, is the main reason they're considered stupid. If they could actually reach you in more advanced cases than looking behind a corner when hunting, it'd make these beings feel a lot brighter. Navigation would also significantly increase the effectiveness of running away and regrouping.

One major thing Quake suffers from, is that all the monsters act the same. They run towards you, at all times, and sometimes stop to shoot or in other ways attack you. This would seriously need to change if you want intelligent behaviour. AI needs to be relevant to the monster. A grunt rarely needs to run towards you if it can see you, so quit that. Strafe a bit instead. Fiends could be able to jump up/down ledges to reach you. Scrags could circlestrafe you more effectively, also using up/down movement. Fish could be faster. In fact everything could be. Knights could try to surround you, as well as be able to jump down ledges. Vores could try to hide often and toss voreballs towards where they last saw you, hoping the voreball will spot you and start following you.

New abilities also increases the impression of intelligence. Scrags could do magic, like reassembling gibbed zombies. Zombies could be really vicious in close-combat, slashing away at you. Certain grunts and enforcers could fire grenades towards where they last saw you when they suspect you to be somewhere around the corner. Vores could spawn tarbabies. Use your imagination :P
I was once a Quake modder
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

I think monsters and bots should have different AI. Bots you want to emulate players, e.g. humans on a computer, with a keyboard and mouse and such. Monsters you want to assume believable roles in the game world. Circle strafing grunts would sort of break immersion for me. Monsters have to act in character. I would elaborate but I have to go again! :O
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

I agree with Sajt, but one shouldn't rule out cheap tricks like circle-strafing, because it's effective in terms of creating more challenging opposition in this very game, which in fact does not fight against the rules of the world the game takes place in. I'd assume grunts are somewhat similar to the player in ability, since they're kind of zombified humans (IMO), and humans in this world (assuming the player is human) are able to run at world record speeds, jumping endlessly, packing enough ammo for an army in a small travellers backpack. So giving grunts the circlestrafing ability would still make them seriously toned down in comparison to the player :P

I'd obviously still vote for the ability to jump away from grenades, and running away to regroup, over circlestrafing. It's all about what's considered reasonable in terms of the world, game balance and overall coolness. Circlestrafing is cheap, and so '96 - '97 :P
I was once a Quake modder
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Post by Dr. Shadowborg »

My general rules:
1. Give monsters attack power every bit as powerful as the player's. This makes them far deadler, without having to do much of anything.

2. Give monsters in combat abilities that are fitting. i.e. enforcers and enhanced grunts could strafe to a certain extent. Another example would be giving the scrags the ability to teleport as seen in the cranked mod. Enforcers leaping away from grenades is cool, but I don't think something as dumb as a grunt is going to care.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

1. If a monster don't have a melee attack, it should keep distance from the player (so at least it does not get into line of sight of another monsters);

2. I don't see any problem if humanoid monsters (except zombies, because they NEED to be dumb) were able to avoid grenades.

3. melee-only monsters should use a hit-and-run tactic when in group: one attacks, then if hurted, retreats while another charges. This should minimize the problem of monsters roaming in random directions because they cannot reach the player blocked by another monster charging in loop. I did something like this with the bat in the monster pack I added to my booth in 2005 QExpo.

4. Monsters should be able to enter in alert when they see another monster corpse or a rocket explosion nearby. Some random roaming, angry sounds and looking around if the player is not visible would give a bit more realism and challenge than monsters that just gives the back to you even if you explode a rocket in the nearest wall.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

It is a good monster when you have carefully balanced its intelligence and capabilities with its actual behavior. This however involves having a decidedly clear idea of the intelligence and personality of each monster. Grunts are described as soldiers with wiring in their brain to the pleasure centers, stimulated whenever they kill, of course naturally this wiring checks if the target is a client...

Really you should consider the frames and the look of a monster... Do their legs look like they can jump, or circle strafe? I dont see an ogre circle strafing quickly at all, but I can see a knight doing such while repeatedly slashing... Damage avoidance, namely recognizing live grenades is a fairly simple skill, even for incredibly dumb enemies. Ive no problem with most monsters recognizing the danger, but I think a lot of them would charge forward on through it anyways.

frag.machine hit upon a good point, if you are primarily a th.missile using enemy, there is no need to get more than medium range, because you become a bigger target. Enforcers have no need to get close to you unless you bump into them in a hallway.

Another point frag.machine makes is more general awareness - hearing a monster attacking or dying should wake up others, logically.

And of course, I heartily agree on navigation. No matter how smart they may be, if they do it drunk, they just look stupid, and the entire impression is lost.

So why arent you guys coding this? Id really like to play it, and Im lazy!
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

The fact is, adding more intelligence almost requires you rewriting the entire monster code. And this means a lot of work. :|
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

frag.machine wrote:The fact is, adding more intelligence almost requires you rewriting the entire monster code. And this means a lot of work. :|
But it's fun! I love rewriting things, but then again, I'm kind of weird.
I was once a Quake modder
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Post by Dr. Shadowborg »

scar3crow wrote:So why arent you guys coding this? Id really like to play it, and Im lazy!
I've got something planned, but it'll be a while till I get around to it.
Post Reply