Home   Help Search Login Register  

Author Topic: Tactic AI  (Read 945 times)

0 Members and 1 Guest are viewing this topic.

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Tactic AI
« on: 14 Jun 2003, 12:09:09 »
Reading over the 'Cover script' idea i had another idea about advanced AI.

Basically i had the idea about AI groups that use the terrain in a more intelligent way. As we all now, human players will use the terrain to get an advantage - high hills to watch a wider area, thick woods to hide from airunits, villages for cover against enemy tanks, canyons for laying mines, base places that can be defended quite good etc etc...

Even IF there would exist a script that would 'show' the AI where such important places are, it would require a huge amount of cpu resources just to 'calculate' the appropiate places for certain units (a sniper wouldn't want to go into the middle of a forest).

My idea is simply like that:

a.) The map editor marks the spots for the AI. Spots are hardcoded by coords.

b.) Spots are named after their purpose, so the AI 'knows' how to use them (Hill, Forest, Village, GasStation, BasePlace, MinePlace, Airfield... )

c.) Ingame there is 1 script running that tells each AI group what spots are near.

d.) Since the AI can't 'understand' what to do at a spot named 'Hill', there is some sort of translator-script needed that will take into account WHAT the group consists of (tank, soldier, sniper, ship). Depending on that, the script tells the group what to do at the 'hill' spot:

- A sniper would 'want' to move there, then lay down and watch the area without fire.
- A tank would move onto the hill to shoot at a known target in the valley behind the hill.




There are far more things possible, but it's a lot of work to script all this. The main purpose is to 'navigate' AI groups by a network of hardcoded spots, covering the whole battlearea / island. Units would move through forests and villages, instead of using a direct line between 2 points. If the next spot is considered 'enemy', the AI could even force the groups to stop and 'secure' the nearest spot nearby.

That's the idea: a network of spots, telling AI groups where to go and what to do there.

Comments ?  :)

Offline XCess

  • Former Staff
  • ****
Re:Tactic AI
« Reply #1 on: 15 Jun 2003, 19:57:06 »
I had a similar ideaa while ago, and was going to work on improving OFP's AI with HAMMY, but in the end we didn't. The use of GameLogics to mark startegic positions would be a very good idea, and solve my problem of not being able to find the height from sea level. A very good idea, if you would like to start a team of scripters on this- as you probably would for something as big as this- I would love to help. Great idea.  ;D

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Tactic AI
« Reply #2 on: 16 Jun 2003, 02:55:32 »
sounds as kool idea ;D :thumbsup:

i wud like 2help but (ders always a :moon: ;D ;))...

dont have lots of free time - but if u got som Qs post it nd we (every1 in da forums  ;)  ;D but me specifacly) will try 2 help ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

deaddog

  • Guest
Re:Tactic AI
« Reply #3 on: 16 Jun 2003, 05:38:54 »
Quote
....solve my problem of not being able to find the height from sea level
Check the functions section of the editors depot.

Quote
Basically i had the idea about AI groups that use the terrain in a more intelligent way. As we all now, human players will use the terrain to get an advantage - high hills to watch a wider area, thick woods to hide from airunits, villages for cover against enemy tanks, canyons for laying mines, base places that can be defended quite good etc etc...
You, as the mission maker, are supposed to setup the enemy AI units to take advantage of these terrain features.  It sounds like you want to throw a bunch of AI groups in the middle of the map and then have them figure out whats going on and how best to defend (or attack).  That would indeed take a hell of a script.  ;D

Quote
That's the idea: a network of spots, telling AI groups where to go and what to do there.
Aren't these called waypoints?

I'm not trying to put down this idea.  What you are after is a more intelligent AI.  But this has to be tailored to the specific mission you are writing.  A mission where the enemy are looking for a downed pilot is very different from one where they are defending from an armored attack.  Another example are snipers.  They don't generally move around at random.  They have specific tasks at specific locations, whether that involves killing or scouting or both.
« Last Edit: 16 Jun 2003, 05:50:11 by deaddog »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Tactic AI
« Reply #4 on: 16 Jun 2003, 14:17:37 »
uve got a point deadog but (:moon: again ;D)

Quote
It sounds like you want to throw a bunch of AI groups in the middle of the map and then have them figure out whats going on and how best to defend (or attack).  That would indeed take a hell of a script.

not exactly but somin similer - i will like 2 have a way 2 tel ma AIs were ma destination nd wat deyr suposed 2 do - but let em do da hard work of goin in best way  ;) ;D nd cuz WPs somtimes make da game 2 much repeatin itself (wich is y toady wrote da grouplink ;D ;)) so if dey can somtimes decide on oder way (lets say dey spoted lots of enemies on deir way its even beter ;D n kooler  8)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Tactic AI
« Reply #5 on: 16 Jun 2003, 19:06:30 »
@deaddog: none offense taken of course. i need comments for the idea because different ppl see the problem from different angles (which is quite important).

I think the comment about the MISSION TYPE is right. Different missions require different behaviours. Lets just 'pretend' we've got the whole island covered by AI SPOTS and a sniper gets the mission to take out an enemy commander.

The way i'd want the whole script to act, would be like:

- sniper checks what spots are between him and the target
- (optional: if pos of target is unknown, look into 'guess-table': where would an enemy commander be ? a base! sniper takes all known base-spots into account (he'll have to check them all, 1 after 1)
- sniper 'realizes' all possible ways go over a 'SEA' spot.
- sniper goes to 'PORT' spot and gets onto a ship.
- sniper drives ship to target area, leaves ship at 'BEACH' spot
- sniper goes to 'HILL' spot that is near the target
- sniper shoots target (if he sees it)
- sniper tries to use ship to get back; could call ARI attack on target area & call heli evac at his position.


Something like that is HORRIBLY complicated, i know. Such a script would start with very very basic functions, and would surely take some months to evolve into something 'intelligent'.

Maybe we should start this project when OpF2 is out. It could be VERY rewarding ! I'd be interested in joining such a script team for OpF2.

Until then, let's discuss every problem that could occur... i'm sure there's something we didn't see yet

Offline XCess

  • Former Staff
  • ****
Re:Tactic AI
« Reply #6 on: 16 Jun 2003, 19:54:28 »
I don't want to have to wait for OFP2  :( I want it now!!!  ;D I've wanted to work on soemthing like this since I first learnt the OFP scripting language (or SQS as I call it). Your idea might just work so I want to try an' help. Pleeeeeeeeeeeeeeeeeeaase  ;D

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Tactic AI
« Reply #7 on: 17 Jun 2003, 21:00:40 »
Nah. It will take months to complete this and by then OpF2 is released. If you want to make a team, then go for it. Use the idea.  :)

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Tactic AI
« Reply #8 on: 09 Jul 2003, 07:05:10 »
I have to agree with deaddog on this one. AI scripts are nice and all, but you can't expect to be able to make one big script that will do the job of making the mission for the mission editor. Your sniper example could be done with much, much less effort by using waypoints, and maybe a few scripts here and there (call evac, arty barrage, etc). Personally I believe that you can't simply replace a human editor making descisions as to where groups should go with a script. There are way too many different scenarios for you to simply through together one big AI script that would cover any possible situation. For anyone to use something like that, he would have to spend just as much time, if not more, entering in data to the script as he would just putting in the waypoints himself.

Now, if you want a little more randomness in terms of waypoints, that is another issue, but is fairly easy to solve, using either the "radius" field of the waypoint, or by using a few different locations for the "domove" command.

I don't want to bash your attempt either, but I think AI scripts should always be thought of as tools that the mission editor works into his mission, not one that makes the mission itself.
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!

max_killer_payne

  • Guest
Re:Tactic AI
« Reply #9 on: 09 Jul 2003, 20:29:55 »
I too would like to see more advanced AI that try to flank you, or perhaps, rather than blazing away when they see you straight away, try to set up an ambush, or if become under fire run for cover. Like in Ghost Recon. But I think this would b hard. I think we should all just wait to OFP2.

BTW Wots the ETA on OFP2?

Offline KeyCat

  • Members
  • *
Re:Tactic AI
« Reply #10 on: 10 Jul 2003, 01:05:26 »
OFP 2 is scheduled for a late 2004 release so we are talking about ~18 months (probably more!) before we see it.

/Christer (a.k.a KeyCat)

« Last Edit: 10 Jul 2003, 09:26:23 by KeyCat »
- The journey is the reward!

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Tactic AI
« Reply #11 on: 10 Jul 2003, 05:03:47 »
Flanking movements, such as single and double envelopements, would be nice, I agree, and I plan to make scripts to do just that. The problem I have encountered, however, is that there is no way to "detect" where bushes and trees are via a script. So you can't make the AI run from cover to cover, or sneak up behind a line of trees, or whatever.

The closest you can come to this is by using "setcombatmode stealth/combat". If they are under one of these combatmodes, they will take cover  when fired upon, and they will try to use bushes and cover to advance.
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!

max_killer_payne

  • Guest
Re:Tactic AI
« Reply #12 on: 10 Jul 2003, 18:32:05 »
Yeah, but they also tend to be too clever in stealth mode. And too daring Im currently making a mission its been in production for about 6 days so about 60% is done. Anyway, I was testing it and I have a team of 3 Spetz Natz set to stealth and Seek and Destroy player. I have also made the SetDistance shorter so the player is more cautious, and I am constantly getting:

'Spetz Natz 12 o'clock'
'Spetz Natz  5 o'clock'
'Spetz Natz 10'clock'

And its scary cos I dont have a clue were they are or how they managed to get past without being seen.