Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Idea: AI Lib Goto page 1, 2 Next

| Inside3d Forums Forum Index -> Artificial Intelligence

View previous topic :: View next topic
Author | Message
--- | ---
FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Fri Apr 28, 2006 8:45 am Post subject: Idea: AI Lib |

Looking at QuakeMatt's Gyro II post, what do you guys think about an AI lib. What should or could it include? Obviously bots are one thing, but I think there's quite a few other applications for AI, monsters not least among them. Also could be handy in mods like Minion Arena. Although AI tends to be very specific... I dunno, just an idea I'm tossing out there, see if anyone has any ideas on the topic.
_________________

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Fri Apr 28, 2006 11:18 am Post subject: |

a frig around feature, where monsters wander randomly, sort of like the figgin thing. also the added ability to patrol in where they think they saw, so you could like waltz behind a crate before the enemy tracks you into the room, so he just runs forward into the next door running past you
and then forgetting about you
and a "hostage" feature where when provoked, they will attack and kill the entity in its "grudge" .entity field. It could also be used for running and setting off alarms on provoked, so they'll run to the button and press it, or shoot it if it's shootable.
you could make qeus ex lol
we're talking about monster ai, right
_________________

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Fri Apr 28, 2006 11:35 am Post subject: |

I suppose. I really kinda asked for routines & features that would aid in creation of AI opponents, not really a prepackaged AI replacement for monsters. Much the same ways Gyro II has physics features that can be applied to objects. _________________

Back to top |

Quake Matt Joined: 05 Jun 2005 Posts: 129 |

Posted: Fri Apr 28, 2006 1:10 pm Post subject: |

Generic but powerful AI routines, you mean? I think it'd be great to have waypoint functions that handle navigation behind the scenes, and a cover-finder would be handy in all sorts of situations. Obviously, all sorts of other niceties could be included, like target-leading functions, projectile detection (and avoidance) and even camp-spot-finders!

Back to top |

scar3crow Inside3D Staff Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV

Posted: Fri Apr 28, 2006 7:30 pm Post subject: |

I would say automatically bundle a good waypointing system to work with, ala FBX. From there you can have numerous things such as roaming controllers, or take a note from Q2 (I think) and have the player make a waypoint whenever he rounds the corner for the sake of better monster pursuit.
Appropriate target leading code for all manners of projectiles.
A concept of cover (this could be done by checking near by waypoints, and then crossreferencing it with the players position to see if there are obstacles between the player and the goal waypoint).
Intelligent checking for ledges that is sensitive to the player and the monsters ability (fiends should have no qualms leaping from a bridge).
Concepts of defense, so you can set a shambler that will not stray from the key.
Renegade's check for plat so monsters dont get stuck under func_plats or such.
Are we talking just monsters/bots or more generally?

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Fri Apr 28, 2006 7:55 pm Post subject: |

I'd say scar3crow pretty much hit the nail on the head. I'd been pondering such things myself for TAKOP, but have been procrastinating on doing anything because I know it's gonna be a pain in the ass. (AI is definatly not my forte...) _________________
"Roboto suggests Plasma Bazooka."

Back to top |

scar3crow Inside3D Staff Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV

Posted: Sun Apr 30, 2006 4:55 pm Post subject: |

Another thing that could be nice would be different movement types, more specific ones, namely for flying and swimming, as it seems at current everything is just treated as some kind of walking, regardess of where the ground is. It would be nice to see rotfish and scrags acknowledge the range of movement they have.
What about hearing? A conceptual sense of monsters being sensitive to splashes, the player landing thud, or the player's pain sounds.

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Sun Apr 30, 2006 6:07 pm Post subject: |

Additionally, if the waypoint system could be implimented in a style similar to FBX's (so pre-exisiting maps could be enhanced) but be able to coexist with FBX as well via some sort of deathmatch check. Though this probably would break FBX coop compatability...
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

scar3crow Inside3D Staff Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV

Posted: Mon May 15, 2006 3:16 pm Post subject: |

I would like to see for any npc, be it monster or otherwise, to make use of the Target Stack system used in FBX, this could be useful for creatures facing coop players, and for perhaps chain events of scripts with an ai intervention. One simple change that would be nice would be to actually have by default doors, switches, plats, teleports etc as triggerable by monsters, but you can specify in the entity to not be triggerable by them. Thus the monsters could use this along with target stack... It would be awesome in e1m3 to see the ogres drop down from the overhang near the exit... the player flees (their leading grenade shots) around the corner to the tower where he presses the switch, barring him in and initiating the false trap. Outside, a wall panel opens and a slipgate to the top is revealed... Having an ogre use that to be waiting for you would be freaky - or worse, start firing grenades down into the shaft as you rise up.
Honestly one of the best things for a general ai experience, though not really ai, is in DPmod LordHavoc has enemies jumping off ledges when they get near the edge... It is a bit automated but aside from notarget/intermission, it is unlikely you will see it without them attacking you. And I can say from personal experience, it is terrifying to see a shambler leap off the bridge in e4m4 to smash you (he killed both LordHavoc and I, it ambushed us, literally).
One other good thing to see would be grouping and scattering ai. Monsters that move together while searching, but so as to not get boxed up in a room (establish a leader, make way for him if youre between target and him) as well as spreading out on encountering an enemy, as opposed to staying bunched up remaining ripe for rockets.

Back to top |

RenegadeC Joined: 15 Oct 2004 Posts: 370 Location: The freezing hell; Canada |

Posted: Mon May 15, 2006 4:23 pm Post subject: |

Cover would be fun to code without waypoints, there's several approaches. Here's one that just floated into my head .. I would try spawning an entity as a 'check point', so the monster may throw a invisible entity it's size (this is important) in a random direction (random direction isn't the best method however, I'm sure a better one could be devised, if anyone has a better idea say so as I can't think of one), the entity then checks if the player can see it with a 'visible' check ran on the actual player, and then returns to the monster either TRUE or FALSE if the player saw it then return TRUE, otherwise return FALSE. If false then store the origin of the entity in a vector then remove the entity and start moving the monster to the origin point of the check entity from the vector..
Fun stuff!

Back to top |

RenegadeC Joined: 15 Oct 2004 Posts: 370 Location: The freezing hell; Canada |

Posted: Mon May 15, 2006 4:28 pm Post subject: |

Another thing, flying monsters should fly using more realistic flying AI routines.. which would also seem smoother .. TAoV's flying creatures fly using velocity and it'd be pretty cool to see a Scrag doing the same (this would make them harder to hit also as they're movement is more dynamic); however, since it uses velocity based movement it's harder to stop the monster from getting stuck (Since TAoV is more of a 2D plane this isn't a big deal, it would be in normal Quake however) .. if anyone's interested in this I'll post the code!

Back to top |

scar3crow Inside3D Staff Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV

Posted: Mon May 15, 2006 5:09 pm Post subject: |

Ren - Good stuff, it wasnt until today that I had heard the concept of throwing entities with the same size as the thrower to check dimensions, but it seems so cool to me. However instead of a random direction, they could try within 180 degrees of their field of vision, so they try first in a place they can "see", still kinda random, but not quite as random.
As for flying, yes, though I would say the same could be done with swimming, so it would be more a 'lowerlimitedcontent' movement than just flying (I would love to see a underwater monster with the movement of the Ichtyosaurus, one of the few things HL did right). Rotfish could be much more dangerous simply if they did make use of the full degree of motion in the water (especially if they could dart to attack... quickly nibble off some health). An idea that would be applicable at least in new maps would be a brush with a cliptexture and a "fluid motion" tag, and if a flying or swimming monster is in that, it uses that movement code... So the scrags outside in e1m5 would be quite the threat, whereas the one at the start of e1m4 (assuming Normal skill) would use conventional motion as there is little room. Good fun.

Back to top |

LordHavoc Joined: 05 Nov 2004 Posts: 243 Location: western Oregon, USA |

Posted: Mon May 15, 2006 5:30 pm Post subject: |

Just wanted to point out that there are some useful bot AI functions in my Nexuiz port of dpmod havocbot, I've reorganized it a lot to be even more plugin than it was before, and separated the havocbot AI from the general utility functions. Its concept of waypoints is not very efficient though, manually linking (ala frikbot) and saving the waypoint links would load faster.
Also there's a known bug with tracewalk sometimes returning success when it shouldn't (but only during the code that finds nearby waypoints to start a navigation update), I haven't figured out why.
Some other things worth considering (which my waypoint linking does not consider) are jumping over gaps (such as lava/slime pits), jumping off ledges (as opposed to just falling off them), buttons to open doors, etc, frikbot does these quite well but I'm not sure its navigation would be very portable to monsters.
My code does however automatically create teleporter and jump pad waypoints with proper one-way links, and the items spawn waypoints (which in a few levels are enough for bots to navigate a level without any extra waypoints).
Sorry, rambling, just thought I should point out this code incase it helps anyone developing such an AI lib.
Here's the main code:
http://svn.icculus.org/nexuiz/trunk/data/qcsrc/server/gamec/bots.c?view=markup
havocbot AI:
http://svn.icculus.org/nexuiz/trunk/data/qcsrc/server/gamec/havocbot.c?view=auto
havocbot game-mode AI:
http://svn.icculus.org/nexuiz/trunk/data/qcsrc/server/gamec/havocbot_roles.c?view=auto

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Sun May 21, 2006 4:40 am Post subject: |

Some really great ideas here. I'll have to mull it over. Though none of these really fit with the idea of an AI Lib. We're more or less talking about "Stroggs Gone Mad" for Quake.

Back to top |

scar3crow Inside3D Staff Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV

Posted: Sun May 21, 2006 1:07 pm Post subject: |

Ive wanted Shamblers Gone Mad for years. More so then any other mod for Quake.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Artificial Intelligence | All times are GMT Goto page 1, 2 Next
Page 1 of 2

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group