Home   Help Search Login Register  

Author Topic: Smart AI?  (Read 2393 times)

0 Members and 2 Guests are viewing this topic.

Neal

  • Guest
Smart AI?
« on: 22 Sep 2004, 21:41:45 »
Is there a way by using the waypoints to make a smarter AI?

Or are any GOOD scripts out there to make the AI smarter?

I tried the ones already listed in the scripts on ofpec site.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Smart AI?
« Reply #1 on: 22 Sep 2004, 21:53:36 »
What are you trying to do, exactly?    I don't understand your question - by definition you cannot use waypoints to make the AI smarter.

If you have exhausted the Editors Depot try searching the forums for "enhanced AI".    There maybe some stuff lying around that never quite made it into the Ed Depot.

However, remember that the AI is often smarter than most people give it credit for.    When you add sophisticated use of waypoint sequences and switch triggers, you can come up with some pretty complex behaviour.     And there's no point in getting bogged down in trying to do fancy stuff unless you are absolutely up to speed on the basics such as script waypoints.

Plenty of reviewed ArmA missions for you to play

Neal

  • Guest
Re:Smart AI?
« Reply #2 on: 22 Sep 2004, 22:34:43 »
Well all my missions are sebnam where the US (live players) have to patrol a certain area. And I have multiple squads of AI running around. Some are set with one waypoint where they will gaurd with Open Fire, Engage At Will with Combat. Then others are set to Move and Safe. And they will surround you and try to take you out yet thats about it.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Smart AI?
« Reply #3 on: 22 Sep 2004, 22:49:32 »
Yeah, for the most part the AI works pretty well; IF you give them good waypoints, triggers, etc, and place them well (in the defense). You can't just plop down some units/scripts and expect them to make the AI do exactly what you want. You weren't really clear on what you wanted the AI to do that it wasn't doing, so if you could explain, maybe we could help you do it. I'm guessing some 'guard' waypoints and 'guarded by' triggers are all you need, but more info is needed.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Neal

  • Guest
Re:Smart AI?
« Reply #4 on: 23 Sep 2004, 00:39:56 »
To make the AI more tactical... by making them move better and more I dunno better. lol Hard to explain

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Smart AI?
« Reply #5 on: 23 Sep 2004, 00:51:50 »
Ok, well making the AI move better in combat, if that is what you mean, is something that most AI scripts don't really do (they do a little, but not that well). What exactly would you like them to do? You can grab my "Squad Rush/Retreat" script from the ed depot, which makes them perform a good assault (some guys run, some guys cover them, then they hit the dirt, and the guys in back run  up, etc). Bremmer's AI script supposedly makes the AI perform flanking movements, though I haven't looked at that very closely.

Actually, the default AI will do flanking movements too, and will actually take a route thru cover or forest to flank you. The main problem is the AI is so blind, they can't see you until you are like 100 meters away from them. I've made a config where the AI can see as far as the player can, and it made me realize the AI isn't really that bad. When they notice you from a ways off, they will have more time to perform flanking movements, so they will actually work. For example, I played a mission where I was attacking one side of a small (50 m?) base. The AI on the other side of the base actually heard/saw the fighting, and flanked me from the forest nearby the base. I was totally caught off guard when they killed me with hand grenades, because I was so used to the AI being a bunch of retards.

Anyway, I think I should release a config that just improves the AI sight/hearing range, for all to use, including myself. The test I mentioned above was with an ECP config, but it would be nice to have an improved config you could run without the extra stuff from a mod. Trust me, it would feel like OFP v1.97. :)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Smart AI?
« Reply #6 on: 23 Sep 2004, 00:55:48 »
This is a playtesting job.    Play the mission until something happens that you don't like.   Then stop, figure out why it happened, figure out what you wanted to happen, then change waypoints, trigger, etc, till you get it.

AI info sharing script might be useful here.    Also standard tricks like combining depleted squads.     Make sure all squads have at least a couple of sergeants, otherwise they flee too easily.

A master script might be useful, perhaps monitoring (by means of global variables) how many groups are on guard waypoints and switching more groups into guard if the original guard groups get wiped out.

The point is that you need to break this problem down a bit:  find a way of thinking about specific parts of it and dealing with them one by one.     That will help you understand and explain what you are really trying to do.    As with most problems, the solution is pretty straightforward once you have a real understanding of what the problem actually is.
Plenty of reviewed ArmA missions for you to play

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Smart AI?
« Reply #7 on: 24 Sep 2004, 02:20:52 »
to make them a bit smarter, and able to view long distances, just add in their init:

Code: [Select]
setViewDistance 1000
they will see you, and do crazy stuff, and sometimes even hit you with a 1000m drill you in the head shot

thats rare though...
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Neal

  • Guest
Re:Smart AI?
« Reply #8 on: 24 Sep 2004, 02:53:08 »
Barron how would I go ahead and do what you did? Do you do setViewDistance 1000? If so where do I put it? In each of the AI players?

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Smart AI?
« Reply #9 on: 24 Sep 2004, 06:23:13 »
Put it in the initiation field of the unit you placed

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Smart AI?
« Reply #10 on: 24 Sep 2004, 19:49:30 »
Well, Tyger is talking about something different than what I am. For his suggestion, just put that line in any init field, or your init.sqs. You only need the line once, because it sets the max viewdistance for all units, player and AI. But it doesn't mean that the AI will see that far, just that it is the furthest they could possibly see. What I'm talking about needs to be in an addon's config, or the game config.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Neal

  • Guest
Re:Smart AI?
« Reply #11 on: 26 Sep 2004, 22:18:16 »
Well, can I have some info on how to try it?

I just tried these waypoints:

5 Squads in an area.

1 Squad moves clock-wise around the area.
1 Squad move counter-clockwise around the area.
2 Squads have guard areas.
1 Squad moves around the middle of the squads moving around the area.



Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Smart AI?
« Reply #12 on: 26 Sep 2004, 22:28:31 »
Well, can I have some info on how to try it?

I just tried these waypoints:

5 Squads in an area.

1 Squad moves clock-wise around the area.
1 Squad move counter-clockwise around the area.
2 Squads have guard areas.
1 Squad moves around the middle of the squads moving around the area.
Who are you talking to/what are you talking about?
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Neal

  • Guest
Re:Smart AI?
« Reply #13 on: 26 Sep 2004, 23:41:20 »
Quote
What I'm talking about needs to be in an addon's config, or the game config

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Smart AI?
« Reply #14 on: 26 Sep 2004, 23:47:34 »
Ok, the two properties you need to edit are "sensitivity" and "sensitivityEar". Change the values for those properties under the "man" class to something like 2x what they are, and you should be in good shape. :)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Neal

  • Guest
Re:Smart AI?
« Reply #15 on: 27 Sep 2004, 00:48:00 »
Where exactly would I make these changes?

Nulear_Man

  • Guest
Re:Smart AI?
« Reply #16 on: 27 Sep 2004, 12:49:24 »
i posted a really good AI Script on this Topic
But i think youll need WINRAR
http://www.ofpec.com/yabbse/index.php?board=13;action=display;threadid=18765;start=0

reply #5
is the one You need its called AI.zip

Neal

  • Guest
Re:Smart AI?
« Reply #17 on: 28 Sep 2004, 01:45:46 »
IS there a way to make ALL the AI spawn as well when using the base respawn? (marker called respawn_west)