Jump to content
The Dark Mod Forums

AI Cooperation During Searches


grayman

Recommended Posts

I'm writing experimental code that I hope will allow AI to cooperate with each other while searching.

 

Currently, each AI acts independently, and when several get involved in the same search, the results can appear chaotic.

 

My plan is to have one AI search near the alert spot, and have subsequent AI search a bit farther out.

 

I'd also like to assign late arrivals to nearby spots to stand guard. They wouldn't move around, but would look in various directions, sort of "keeping an eye out". They might open a door and peer through for a moment, then close it.

 

I'm considering having them stand at doors and/or visportals out of the search area. These can be located automatically by the code.

 

In addition, I might create a new entity, a "guard location" that mappers could place at key doors or spots around the map. The search code would seek out the closest ones to the alert location, and assign guards to them.

 

Can you suggest any other behavior that would give the impression that the AI are cooperating during a search? (I.e. I'm creating roles for "searchers" and "guards". What other roles make sense?)

 

Thanks.

  • Like 4
Link to comment
Share on other sites

Maybe, if there are civilians in the area, a "caretaker" role, either by asking "are you ok, sir?" or "please stand aside, nothing to see here while we search the area for the intruder". Could be one of the same roles, tho.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

If the group encounters a body or bodies, maybe everyone does not need to examine it? Only one goes to inspect the body. Once the body has been inspected, it is not touched by others?

 

Also, is there a way to avoid the "body trampling." I once killed an AI and left them to be found by others. Soon, there was 5 guards at the body, kicking and pushing it around it looked like the guys hated the dead person so much they wanted to dance on their corpse. ;)

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Maybe, if there are civilians in the area, a "caretaker" role, either by asking "are you ok, sir?" or "please stand aside, nothing to see here while we search the area for the intruder". Could be one of the same roles, tho.

 

Good idea, though we'd have to do it w/o the barks, since they don't exist.

 

One thought that comes from this idea is to have civilians stay put if friendly armed AI are there to perform the search. There's no need for a civilian to join in, but he would conduct a search if he were the only AI in the area.

Link to comment
Share on other sites

If the group encounters a body or bodies, maybe everyone does not need to examine it? Only one goes to inspect the body. Once the body has been inspected, it is not touched by others?

 

Also, is there a way to avoid the "body trampling." I once killed an AI and left them to be found by others. Soon, there was 5 guards at the body, kicking and pushing it around it looked like the guys hated the dead person so much they wanted to dance on their corpse. ;)

 

The body trampling should stop when only one AI is allowed near the body (which is part of the new design), though the one AI will still walk through the body if he needs to. I've already looked into having AI walk around a body when it's in the way, instead of through it), but this opens the door for other problems.

Link to comment
Share on other sites

Depending on the kind of event the ai may act differently. Some examples:

  • Currently you can get ai to alert state 4 (weapon drawn searching for you) by making a whole lot of noise. If another ai joins in that didn't heard the noise you made, he may not be convinced that there really was something, and will only join the search for a very low amount of time, and without drawing his weapon, if he even attempts to join the search.
  • If an ai got alerted because of a door left open or some loot stolen (unless it is very important), or due to other minor things that are only a vague hint for an intruder, there may be no need that all other ai passing the scene joins the search.
  • in difference, if a body was found, the search should be strong. The effect may rise if the body is dead instead of unconscious or if it belongs to a high-ranked person (I think we already have ranks). In the latter cases some of the ai may leave the scene to gather assistance.
  • As the game does not only know about the visportals but also on how the visleafs are connected, it may makes sense to place guards in the way that they tend more to guard areas that are some sort of bottlenecks in the map, and therefore are more likely be trespassed by the player.
  • The amount of guards searching in one area may also depend on how bright they are. In a fully illuminated room the player can hardly hide, while some small but dark siderooms may be moer suitable and therefore more probably a hiding spot for the player.

This is what comes into my mind right now. (You opened pandora's box here, mista ;) )

Soon, there was 5 guards at the body, kicking and pushing it around it looked like the guys hated the dead person so much they wanted to dance on their corpse. ;)

It's the beginning of the rise of the worker class :D

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

In addition, I might create a new entity, a "guard location" that mappers could place at key doors or spots around the map. The search code would seek out the closest ones to the alert location, and assign guards to them.

 

This sounds interesting. I remember a while ago we talked about some kind of system like that, where mappers would place something to tell guards to go there if they found something interesting in the vicinity. Like the mapper could put one of these entities beside an important piece of loot or something, so if a guard was alerted in a nearby room, they'd come over to search by the loot to make sure it was still there.

Link to comment
Share on other sites

How about sweeping an area? Say for instance in a hallway with a room off it, one guard will stand by the door, one stands in the hallway facing towards the unsearched area, and a third goes into the room to search? After clearing the room, all 3 regroup in the hall and move further down until the next junction/room?

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

How about sweeping an area? Say for instance in a hallway with a room off it, one guard will stand by the door, one stands in the hallway facing towards the unsearched area, and a third goes into the room to search? After clearing the room, all 3 regroup in the hall and move further down until the next junction/room?

 

Atsabitcomplicated.

Link to comment
Share on other sites

Not knowing how complicated that would be, I just figured it would be a case of 3 AI searching, recognising they're in an ad-hoc "squad", finding a door.

 

- one waypoint assigned to AI 1/3 in the hall just past the door

- one waypoint assigned to AI 2/3 at the door way

- one waypoint assigned to AI 3/3 in the room to search it

 

Chances are, having AI realise they're in a team is the complicated part. I'm assuming I've missed something here, and it's probably the AI working cooperatively part.

 

I also thought about how such an ad-hoc squad would work, and the best I came up with was a captain system.

 

If all the guards are the same guard rank, the first person to get the alert knows the most about the threat, and assumes leadership of the squad. If a higher ranked guard is in the squad (like 1 pro guard and 2 normal guards) then the pro guard is the captain. For situations with 2 pro guards, I guess whichever pro guard hears about the threat first assumes captain.

Edited by Xarg

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

- one waypoint assigned to AI 1/3 in the hall just past the door

- one waypoint assigned to AI 2/3 at the door way

- one waypoint assigned to AI 3/3 in the room to search it

 

Well, this part of it is easy. The complicated part is having them all recognize that the room is cleared and they gather in the hall and move to the next room and repeat their roles.

Link to comment
Share on other sites

I wouldn't want them to be too "smart", like the bottleneck example, for gameplay reasons. Players should still be able to game the AI sometimes, and being caught should still be about featuring gameplay of the player escaping. If it's too inevitable they're pinned, you get even more temptation to reload spam.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Well, this part of it is easy. The complicated part is having them all recognize that the room is cleared and they gather in the hall and move to the next room and repeat their roles.

 

How about an "All clear in here!" de-escalation bark, same sort of system as the "I've found an intruder!" escalation bark. I figured the hardest part would be any kind of organised movement (which probably shows how much I know).

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

I've always thought it would be interesting to see the AI (outdoors) fan-out from some point (either a KO, Corpse, or area of suspicion) in a radial

fashion then return to the center and finally go back on patrol. But I am fairly concerned that even this type of behavior would make

many missions too challenging except for ghosting. Xarg's patrol method sounds particularly brutal in that regard but it also sounds like something

I'd love to see in action. :)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I wouldn't want them to be too "smart", like the bottleneck example, for gameplay reasons. Players should still be able to game the AI sometimes, and being caught should still be about featuring gameplay of the player escaping. If it's too inevitable they're pinned, you get even more temptation to reload spam.

 

3 guards moving in formation down a hall sounds like the absolutely perfect time to employ a gas arrow/fire arrow/mine/gas mine ;)

Edited by Xarg

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

Wow this is a great idea. I'd really like to see more guards get alerted if an important (ie an objective) piece of loot

is stolen. Also I think if a body is found there really should be a widespread alert of all AI guards in the area, and

low level alert for civilians.

 

I'd love to see reasons why things like gas arrows, and gas mines are useable. I find I rarely use them when available,

and would like to see more reasons to use the area weapons. However I'd also like to see AI have a chance to

detect the presence of a mine or gas mine, and start a radial search of the area. I always found it odd that

they always just walk into it.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

I always figured the gas in the gas arrows/mines was clear, but for gameplay reasons had a colour, so the guards wouldn't actually be able to see it (though a guard following far enough behind should notice his friends falling over unconscious next to the funny little metal thing on the floor). Maybe if alerted AI could try to avoid mines by pathing around them (which leaves them as killer chokepoint guardians)

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

I always figured the gas in the gas arrows/mines was clear, but for gameplay reasons had a colour, so the guards wouldn't actually be able to see it (though a guard following far enough behind should notice his friends falling over unconscious next to the funny little metal thing on the floor). Maybe if alerted AI could try to avoid mines by pathing around them (which leaves them as killer chokepoint guardians)

 

Yeh I think you are right there, but they should still be able to have a chance to see a mine/gas mine before they trigger it. Gives weapons like that a chance

to fail which I think would be a great feature. Maybe say a 30% chance of detecting them, or whatever ppl thought was good value.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Some rules:

 

1 - Only armed AI can go to guard spots (portals/doors, mapper-designated locations)

 

2 - The amount of time spent milling will vary depending on the alert. If an AI is going to mill, then run to a guard or observation spot, he will spend less time milling about than someone who won't be running to a spot

 

3 - Some alerts only affect 1 AI (Checking a suspicious door, relighting a light)

 

4 - Some alerts only affect 1 AI at first (Hit By Arrow), but yelling for help could bring others to the search.

 

5 - ATM, only 2 AI will actively search. 3 or more starts to look congested. I might change this for larger search volumes, depending on how it looks. Subsequent AI joining the search are assigned as guards or observers.

Link to comment
Share on other sites

Looking good. Is the effect of AI being drawn in by calls for help separate from / in addition to the alerts given in the table? Otherwise I reckon "flying arrow or fireball" should rank as a higher alert. I'd find either very alarming indeed!

Link to comment
Share on other sites

I don't know how to interpret several terms on the chart. What is the difference between "active searchers", "guards" and "observers"? And what is "milling"?

Link to comment
Share on other sites

The first 2 AI that start the search become "active searchers". They do what we're used to seeing them do: wander around the search area, looking for the player. These can be both armed and unarmed AI, though certain alerts (i.e. a dead body) will cause unarmed AI to flee the area.

 

If there are N "guard spots" (exit portals from the area + nearby "guard entities" placed by the mapper), the next N armed AI are assigned to those spots. They will run to and guard those spots.

 

If all the guard spots are occupied, any remaining AI that join the search will become "observers". These AI (armed and unarmed) stand outside the perimeter of the search and observe the activity.

 

"Milling" means that before running off to guard and observation spots, guards and observers will stand near the alert spot for a few seconds. This is sort of a "let me see for myself" activity before they leave the search area.

 

Does that help?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...