Author Topic: AI (dot product) bots != rcbots  (Read 4874 times)

0 Members and 1 Guest are viewing this topic.

Offline Zyklus

  • Full Member
  • ***
  • Posts: 109
  • Karma: 1
AI (dot product) bots != rcbots
« on: January 09, 2007, 01:24:14 PM »
I have got to admit, rcbots are the worst kind of bots ever invented.  Not only are they stupid, they can head-shot you with a pistol from more than 3,000 ft away.  It sucks! 

So I decided to build a framework for AI in my head for some really good bot AI.

Here's what I have so far:
1.  Waypoints ("nodes") are built from surfaces.  A surface is a plane in which any node on the plane can be connected with any other on the plane.  After all surfaces are defined, a couple passes will be made to connect the surfaces together, usually with an identifier to get to another such as "from where you are you can jump there," "from where you are can only long jump there," and etc. for "you can jump up onto this high ledge if you have the tau cannon with this much ammo."  Surfaces also have a sound-type identifier, which allows the bot to know which surfaces you could be in if it heard the specific walking sounds (ie grass, duct, metal, etc.).

2.  Listening.  The bot will only know (about) where you are if it can put together a sequence of sounds.  It will never know where you will exactly be unless it sees you.  Especially for chargers, like the healthkit and the battery charger, where if it were to hear for example, a series of sand-type walking sound, and then the sound of a healthkit charger being used, then it will search for all surfaces that has the sand-type walking sound, and will check where in that surface you can use a healthkit charger.

3.  Learning.  This is very difficult, but I've decided to use a list that the bot knows and will check at every event.  An event may be something like "when I was here, and he about here hunting me with this kind of weapon, I died" and will learn to evade quickly when in this kind of situation.  Or maybe something like "When I was hunting for this player, and I was in this area, I was sniped" and will learn to be careful around that area where it died.  If it saw the player sniping it, it will definitely mark the area the player was in as a sniper-point.  Oh, and definitely:  "When I heard this player moving at this speed, he most likely had this kind of weapon, if he hadn't noticed me, find a quick place to hide!"

4.  Conflict.  This is the most difficult part, since you don't want it to be too accurate and not too stupid either.  It will definitely use predicting, and with the gathered information in its learning, will determine weather to evade completely (to another room), or prolong its death by trying to defeat the player with all it has.

Anywho, these are all based on my experience playing hl1dm.  It sounds to be like much fun.  Note this will probably not be one of my projects yet, since it is still under what I call a framework.

Offline Mank

  • Full Member
  • ***
  • Posts: 209
  • Karma: 9
    • Ulysses Mod!
Re: AI (dot product) bots != rcbots
« Reply #1 on: January 09, 2007, 01:45:52 PM »
Good ideas, but coding AI is very hard, take a look at these articles for an idea:
http://www.gamedev.net/reference/list.asp?categoryid=18

Also, it'd take a lot of coding, but I do agree, something has to be done about the AI, it's terrible, easy is very easy to kill, and expert just headshots you instantly even if it doesn't know where you are, I've also noticed when I hide for a while, I get up and suddenly I'm headshotted.
If you doubt your powers you bring powers to your doubts.

Offline Golden-Death

  • Hero Member
  • *****
  • Posts: 751
  • Karma: 0
  • Honored Lua Scripter
    • BlueFire
Re: AI (dot product) bots != rcbots
« Reply #2 on: January 09, 2007, 04:05:19 PM »
That'd be interesting to code.



But in other methods...
I hear asia has lots of poor third world kids.

Jobs in air conditioned rooms playing as "bots" are pretty hot right now. Best AI possible, I say. So life like.


Offline Mank

  • Full Member
  • ***
  • Posts: 209
  • Karma: 9
    • Ulysses Mod!
Re: AI (dot product) bots != rcbots
« Reply #3 on: January 10, 2007, 11:03:52 AM »
That'd be interesting to code.



But in other methods...
I hear asia has lots of poor third world kids.

Jobs in air conditioned rooms playing as "bots" are pretty hot right now. Best AI possible, I say. So life like.

Haha, but they'd have to imitate the cheesy VOIP messages the bots excrete every few seconds.  That's the only enjoyable part of bots.
If you doubt your powers you bring powers to your doubts.

Offline Zyklus

  • Full Member
  • ***
  • Posts: 109
  • Karma: 1
Re: AI (dot product) bots != rcbots
« Reply #4 on: January 10, 2007, 02:50:34 PM »
Good ideas, but coding AI is very hard, take a look at these articles for an idea:
http://www.gamedev.net/reference/list.asp?categoryid=18

Also, it'd take a lot of coding, but I do agree, something has to be done about the AI, it's terrible, easy is very easy to kill, and expert just headshots you instantly even if it doesn't know where you are, I've also noticed when I hide for a while, I get up and suddenly I'm headshotted.


AI programming doesn't have to be difficult to program.  There is a algorithm for AI, and it is called the finite-state-machine (FSM).  Basically for everything that has AI a set of states, and a set of actions.  A state is a function of collected "if" statements, and actions are results of the if statements. 

Some example states, in the bot AI case above, could be "hunt" which would hunt for other players; "hide" when being attacked, or when it knows that it doesn't stand a chance when there's a player nearby; "wander" when it has nothing to do (which probably should be replaced by "prepare"); and "prepare" when the bot wants to pick up weapons, armor etc to prepare for a match with the hardest player it knows of. 

Actions could be "transverse" which will either use a combination of running, longjumping, and using the tau cannon  "plan_shortest_path" which should be used regularly so; "grab_healthkit_asap" when low on health; "evade!" which will analyze the best possible way to avoid an attack, for example, an rpg coming at it (or it thinks its coming after it); and etc.     

It also might be more fair to the player if the bot has reaction time.  And to make it more complicated, with its "knowledge" list ("I died 3 times when I was in this area by this player with this weapon.", "There is useful collection of items in this area.") to expect a series of possible events, which reaction time if it expects correctly, while it may heighten reaction time for unexpected events.

Offline Golden-Death

  • Hero Member
  • *****
  • Posts: 751
  • Karma: 0
  • Honored Lua Scripter
    • BlueFire
Re: AI (dot product) bots != rcbots
« Reply #5 on: January 10, 2007, 10:10:50 PM »
You still have to tell it what the heck a tau cannon is.

The CS bots have reaction times.
They're like....


KKSHT... "Enemy Spotted."


















































", I'm still alive?  Sweet." BOOM BOOM BOOM.


Offline Mank

  • Full Member
  • ***
  • Posts: 209
  • Karma: 9
    • Ulysses Mod!
Re: AI (dot product) bots != rcbots
« Reply #6 on: January 11, 2007, 02:07:58 PM »
Heh, I see. =P
If you doubt your powers you bring powers to your doubts.