Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Concept - AI Enhancement EDX

+5
Gnoblar
tjdagger
John J. Stevens
Regg
TemplarGFX
9 posters

Go down

Which Would you Prefer?

Concept - AI Enhancement EDX I_vote_lcap100%Concept - AI Enhancement EDX I_vote_rcap 100% 
[ 6 ]
Concept - AI Enhancement EDX I_vote_lcap0%Concept - AI Enhancement EDX I_vote_rcap 0% 
[ 0 ]
Concept - AI Enhancement EDX I_vote_lcap0%Concept - AI Enhancement EDX I_vote_rcap 0% 
[ 0 ]
 
Total Votes : 6
 
 
Poll closed

Concept - AI Enhancement EDX Empty Concept - AI Enhancement EDX

Post by TemplarGFX Wed 27 Mar 2013, 23:19

Hello everyone!

Instead of directly working on IW3, I am first going to take the AI system I built for it, and convert it into an EDX module which I will then use to build a new IW3.

As such, there are a few options that can be done as to how the EDX would work in a mission.


Please choose the option that you would like to see the most

Extremely Autonomous AI - Only small control of action
This would be the easiest to use, only a single command would be needed for an echelon over the entire mission (though more could be given, resetting the AI)

Limited Autonomous AI - regular commands required
This would be focused on more control, allowing the programmer to manually insert and remove commands for each echelon, or re-order its queue for finer control. obviously a little more complicated

Precise AI - Smart AI, but you have to tell them everything
This would really just be like having more and smarter commands to give units, once a command is complete, the ai will not choose another command automatically.

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by Regg Thu 28 Mar 2013, 00:55

Brilliant!

In order to give the mission designer the most control, I like an idea combining the first and last options. Having more and smarter commands, but having the option to turn on an autonomous queue (built upon the smart commands), if that makes sense. It seems logical that a 'single command' system would break down into smaller, more precise orders in response to certain events.

Don't want to over-complicate anything, and I'm willing to help however I can!

Cheers
Regg
Regg
Veteran

Points : 143
Reputation : 10
Join date : 2013-02-22

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by John J. Stevens Thu 28 Mar 2013, 09:16

I agree that the AI "moods" are best used for different scenarios - while it would be great to say patrol this radius much like search and destroy level 1 to 11 = there will be times when you need them to focus their attention on tasks.

The First and Last approach provide the quickest solution to get started with while the Middle one probably much more finessing. Also agree that the modular approach ala EDx will provide a much broader reuse and debugging.

Carry on!
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by Guest Thu 28 Mar 2013, 10:11

I'd say making a couple of modules would be prettg cool. I assume you are thinking of using ai modding commands in the module so running them side by side may be less of an option. If you are talking about command modules only that run on top of an external ai mod gou might want to give me a call so we can talk some shop on this.

Cheers Very Happy
Anonymous
Guest
Guest


Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by tjdagger Thu 28 Mar 2013, 12:26

In my mind the concept of a module is to take a bunch of code functionality and refine it to serve a specific purpose. A module should be easy to use, yet perform complex function. It should save the user time and effort, whilst providing specific functionality, even if the function is to produce random results.

I have taken the approach of combining scripted code, units and props into self containing modules. The units and/or props are then tracked via the code and all their spawning, despawning, behaviour, movement and everything else to do with them is specific to that script.

With this approach I can separate different elements and keep them independent. For example random spawning mod deals only with spawning soldiers on the map and all their movements, reactions to enemy etc. Vehicle mod deals with spawning vehicles, crews and passengers, vehicle movement, boarding and unloading to assault or defend etc. The mortars deals solely with all things mortars, from spawning props and mortar crews to mortar target list generation etc, and so on and so forth.

By recording & tracking units with the onSpawnedready in each secondary script I can be assured that specific units react in pre determined ways. For example I wouldn't want a mortar crew member to wonder off and start a patrol. Nor would I want a gun emplacement operator to mount a vehicle. Each module unit type has their own specific behaviour pattern that they follow. Each behaviour type also has a logical cycle to follow which prevent them from wondering off and aimlessly standing by a tree all alone, they will always return to an activity/assessment in the event of onComandcomplete.

I don't think a global AI module is the way to go. Instead I believe "unit/prop" + "behaviour/logic" + "script" = "MODULE"
Possibly do a "Assault/Defend location module" or "Ambient civilian routine behaviour module" or "Hostages" etc.

The biggest advantage to modules is that you can refine and deal with specifics far simpler that trying to work in a single 10000 line level.script . The trick however is to be able to take interconnecting concepts and separate them into their core elements whilst maintaining the ability for them to blend together and run side by side in the grand scheme of things.

If you are talking about command modules only that run on top of an external ai mod gou might want to give me a call so we can talk some shop on this.
Tvig certainly knows his shop talk too!


....Oh! and you all need to get your head around the EDX timers... they are friggin' awesome as you can have 400+ active at once.





tjdagger
Admin

Location : Silverdale, Queensland, Australia
Points : 107
Reputation : 7
Join date : 2012-12-17
Age : 48

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by Gnoblar Wed 17 Apr 2013, 09:54

I think they should be Autonomous so that you can have a massive Battle without having to worry too much.

Gnoblar

Points : 10
Reputation : 0
Join date : 2013-03-30

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TemplarGFX Thu 18 Apr 2013, 04:31

ok, I have done quite a bit of work on this, nothing to the point that I can show you anything, however I figure I might as well give you an update so you know this is still happening!

The module will really be used in two ways :

Autonomous Mode :
This mode simply requires you to add the echelons/units/vehicles to the AI as they are spawned (or at any time once they are in the game world), give it a goal (optional) and leave it be.
The AI will automatically control all units it is allowed to without any input from the Mission Editor (though you can if you want)

Extended Mode :
This mode is for complex or scripted Mission Editors. The AI will not automatically generate and give orders to units who have nothing to do. The AI will still control units and give them on-the-fly orders that come up based on situation and communication between units, but once they have completed their current set of orders, the AI will not give them a new task that it has created itself.
instead of ordering units with the built in OFP commands, instead there are custom versions of these commands that you can use to order units just like you would normally, while still getting the benefit of the AI making micro decisions for you.

Technically you could use both modes at the same time, by enabling autonomous generation of orders, while still giving direct orders through scripting.

Here is an example of the extended commands :

Original : Assault(Echelon, Target, OrderPos)
Extended : Assault({Echelon, Echelon1}, {Target, Target1}, Priority, Duration, Condition, OrderPos)

The new assault command allows you to order multiple sets of units to complete the same task. This tells the AI that these units should be grouped together in order to attempt this task. (the AI may do this anyway, see below)
You can also specify multiple targets to assault. If one or more of the targets are units, they will attempt to kill these units. If one or more targets are locations (IE non units) then they will attempt to clear this location of enemies and hold it.
The Priority is how important this task is, and it will not be replaced (by other units, or situational events) with a lower priority.
Duration is optional, and allows you to specify how long the unit(s) should attempt to complete this task for before it is considered a failure.
Condition is optional, and allows you to specify what counts as success. such as killing a specific unit/group, clearing a location or zone etc
OrderPos is much like ADDTOFRONT and ADDTOEND in the normal commands, but also allows additional choices of ADDTOSECOND (places it after the current order) ADDTOPRIORITY (puts the order at the front, unless the order at the front has a higher priority, in which case it will move back through the order table until it can place itself infront of an order with less priority, or place itself at the end)

The other key difference in these orders are that the AI will take this order you have given, and create smaller more precise orders for the individual units/echelons so that they can complete the task intelligently. Such as grouping together before advancing (for multiple units), flanking and suppressing, moving between friendly units, using buildings (if added to the AI) etc.
Also, if you order a unit to assault an enemy unit, and the AI feels the unit you have ordered is not strong enough to succeed, it will try and find nearby friendly units that have a lower priority task than the assault and join them in the attack. These units will go back to what they were doing if it is still a valid order once this order is successful, or the duration runs out.


When units are added to the AI for control, the AI looks at the weapons that the units have, and categorizes the unit according to its weapon load out. This is used to help identify which units work well together. such as ordering a medic team to assault a heavy machine gun unit will make the AI try and find another echelon or two to join into the attack that are more suited. It will then relegate the medics to staying back giving cover, while the heavier armed units do the actual attacking.


This is the idea anyway, I have created a few of the core AI functions that are used in decision making and also quite a bit of the code used to add and remove units and objects into the AI.

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by oANIMUSo Thu 18 Apr 2013, 16:26

This is definitely gonna be interesting to see in action. I'd vote but it won't let me. Once I went to look at results so far there is no way AFAIK to revert it back so I can vote.

Anyway, it's already going in the direction that's best for IW3, as all the AI not under player command were constantly moving the battle lines autonomously. Grouping up to take other places, creating their own patrols to guard them, all while the enemy was doing the same thing. If a place was attacked, someone would run for help, although I never saw one it said so anyhow. Laughing

The thing I found most interesting was the IW assistant. Specifically, how these AI skirmishes happening far away from player were scripted virtual warfare in the background.
I'm hoping you'll integrate IWasst in as well?Concept - AI Enhancement EDX Smiley-bounce015
oANIMUSo
oANIMUSo

Location : Florida, U.S.
Points : 94
Reputation : 1
Join date : 2012-12-22
Age : 52

https://www.youtube.com/user/oANIMUSoTube?feature=mhee

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TemplarGFX Thu 18 Apr 2013, 22:48

I think you might be one of the few people to have actually used the assistant LOL

Further progress last night!

To create more complex AI actions, I have created a system which uses a single recon point in an entity set, that is spawned (instances) in several locations and then stored in the unit data table.
For example, using trig I can spawn a series of points that circle an enemy position at a set distance. These can then be used to give flank left or flank right orders. The system can also be used to create patrol paths or a specific way to get from A to B that passes through buildings for instance.


So far, the following things can be added to the AI's knowledge (that aren't units) (all optional)

Building markers - an entity that represents a building in the game world
If buildings are marked by the mission editor, the AI will use them when carrying out orders, such as defending from inside a building. checking out buildings for search and destroy or include going inside them as part of their patrol

Point of Interest - an entity that represents a particular point of interest in the game world
used to focus the ai on areas of the map. such as towns or facilities. when AI is told to travel from A to B, it will move through points of interest that are between them. If a unit is told to move near a point of interest, they will finish their orders at the point of interest.

Zones - a trigger zone that represents an area of control
used to decide on enemy or friendly territory. AI will act differently in hostile zones to friendly ones

Hopefully this weekend will some good progress!

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by John J. Stevens Thu 18 Apr 2013, 23:36

sounds like you answered the one question that has been bugging me - AI profiles can be assigned to spawn groups while IN GAME not just at the beginning of the mission. Did I understand that correctly?
'
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TemplarGFX Fri 19 Apr 2013, 01:37

If I understand you correctly, then no. BUT I dont really understand what you mean.

You still need to spawn in units and add them to the AI, and those units obviously need to be entity sets that are setup in the ME and cannot be modified on-the-fly.

However, the AI system will take the units you give it, and re-organise them when required to make more effective fighting forces.

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by HomerPepsi Fri 19 Apr 2013, 05:48

TemplarGFX wrote:I think you might be one of the few people to have actually used the assistant LOL

It is very helpful. I was wondering what you used to make the image of skira? The mission editor and screen shots?
HomerPepsi
HomerPepsi
Veteran

Location : Adanac
Points : 87
Reputation : 2
Join date : 2012-12-18

http://filebeam.com/folder/10717

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TemplarGFX Fri 19 Apr 2013, 06:05

the files used by the mission editor to create the map inside itself. They are just image files

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by HomerPepsi Fri 19 Apr 2013, 20:25

Hmmm can you point me in the direction on how you got to them?
HomerPepsi
HomerPepsi
Veteran

Location : Adanac
Points : 87
Reputation : 2
Join date : 2012-12-18

http://filebeam.com/folder/10717

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by dewi316 Fri 19 Apr 2013, 20:54

TemplarGFX wrote: The system can also be used to create patrol paths or a specific way to get from A to B that passes through buildings for instance.


So far, the following things can be added to the AI's knowledge (that aren't units) (all optional)

Building markers - an entity that represents a building in the game world
If buildings are marked by the mission editor, the AI will use them when carrying out orders, such as defending from inside a building. checking out buildings for search and destroy or include going inside them as part of their patrol

Point of Interest - an entity that represents a particular point of interest in the game world
used to focus the ai on areas of the map. such as towns or facilities. when AI is told to travel from A to B, it will move through points of interest that are between them. If a unit is told to move near a point of interest, they will finish their orders at the point of interest.

Zones - a trigger zone that represents an area of control
used to decide on enemy or friendly territory. AI will act differently in hostile zones to friendly ones

Hopefully this weekend will some good progress!



So in theory, could this also be used too make a patrol using vehicles, jeeps apc's.
Drive up and down roads stopping at places of interest, picking up orders, troops exiting vehicles and going inside buildings too pick up orders or even picking up troops and dropping them off at different bases,


Sounds great!


Last edited by oANIMUSo on Sat 20 Apr 2013, 13:25; edited 2 times in total (Reason for editing : Formatting! Lol!)
dewi316
dewi316
Veteran

Location : swansea
Points : 179
Reputation : 22
Join date : 2012-12-19

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TemplarGFX Mon 22 Apr 2013, 23:27

You are definitely on the right track!


I think some people
may be confused as to what this is, and what it is going to do, so here
is a better overview. I built alot of the legwork for this on the
weekend!


The basic idea here is to create an Ai system which
has the ability to completely replace the Mission Makers need to control
units in a mission. While still giving the Mission Maker the ability
to control the Ai should they need to in their missions.

I have split the AI into two levels to best accomplish this :

Top
Level Ai - This Ai is like a General. It organises each side into
fighting groups (which contain one or more echelons) and creates broad
orders to the next Ai level.
Middle Level Ai - This Ai is like a
Sergeant. It evaluates the groups of units and gives each unit a
specific set of orders to complete the command given to that group by
the Top Level Ai.


Heres an example of the process of filtering orders to units :

The
Top Level Ai creates two groups with the available units. One group is
ordered to defend the current location, while the other is ordered to
advance to location X
The Middle Level Ai will first look at the
defending group, and organise the units within into defending, patroling
and scouting roles depending on unit type. It will generate patrol
paths, assign units to emplacements etc. Some units may be exchanged
between groups to better suit the Top Level commands it is trying to
complete.
Next it will look at the attacking group. It will look at
where they are, and where they want to go, and create a path for them to
follow to get there. This path may lead along roads, or through Points
of Interest, or pass by defending units on their way to their
destination.
When the attacking group arrives at their destination,
the Middle Level Ai will then split them up into attackers, flankers and
suppressors and organise a timed attack against the enemies it knows
about, or then sets up defenders, patrollers etc at the destination if
it is clear.

The Middle Level Ai also takes care of reaction
based situations, such as units being shot at, wounded or killed.
Enemeis being spotted or shot at. All those things. Each order given by
the Middle Level Ai is given a priority, and an order can be overriden
or delayed so that a new more important order can be completed first
depending on the priority of the orders in question.

One of the
key things that makes the system so powerful is the "evaluate" command,
this internal only command tells the AI that it should re-avaluate the
order that just ended (for example from a timeout) and re-create the
order if it is still valid. This allows the AI to give a group of units
a command such as advance on location x, and then have that order
evaluated and reconfigured several times during their approach

--I have to go now, so I will continue to flesh this out later, hopefully what I have so far makes sense!--

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by John J. Stevens Tue 23 Apr 2013, 00:05

sounds like an interesting approach this two tier AI - one overseeing unit allocation and the other managing the units in the field - I can only imagine the table nesting going on - sounds like another brain twister
John J. Stevens
John J. Stevens
Admin

Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TemplarGFX Tue 23 Apr 2013, 00:13

Its funny looking at the Unit Table when you add a new unit. half of the line is just

{}, {}, {}, {}

as you init all the inbedded tables
LOL

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TheGeneral Tue 23 Apr 2013, 09:03

With the patrolling units are they given options for vehicle infil or by foot? It would be interesting to see this if they were on foot, incorporating the different formations. The common wedge formation in game is still needed but throwing in column and line aswell as the use of spread will certainly make it look great from a bystander pov.
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TemplarGFX Wed 24 Apr 2013, 01:33

I am going to approach vehicles in a slightly different fashion this time around.

vehicles are treated like resources in much the same way as emplaced weapons. Transport vehicles (jeeps/trucks) can be driven by anyone, and will be used by the AI intelligently depending on their order they are executing.

For example, if you (or the AI) tell a group to move to a location a few clicks away, the Middle Level AI will look at what unused vehicles are nearby, and if there are enough vehicles to transport the entire lot of units in the group, it will create a set of orders that gets them all into the vehicles, creates a convoy and then moves them to a location nearby their destination, then finally disembark them and continue with the order.

Of course you can still manually tell a unit to board a vehicle and then use it to do something.

other vehicles, like APC's, Tanks and aircraft require trained units to fly them, so these types of vehicles will not be used on-the-fly by units such as rifleman, scouts, medics etc. Spec Ops can use any vehicle, and "OPLAND" and "OPAIR" unit types can use their land or air vehicles.

TemplarGFX
Veteran

Points : 159
Reputation : 18
Join date : 2013-02-20

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by dewi316 Thu 04 Jul 2013, 12:04

TemplarGFX wrote:You are definitely on the right track!


I think some people
may be confused as to what this is, and what it is going to do, so here
is a better overview.  I built alot of the legwork for this on the
weekend!


The basic idea here is to create an Ai system which
has the ability to completely replace the Mission Makers need to control
units in a mission.  While still giving the Mission Maker the ability
to control the Ai should they need to in their missions.

I have split the AI into two levels to best accomplish this :

Top
Level Ai -  This Ai is like a General.  It organises each side into
fighting groups (which contain one or more echelons) and creates broad
orders to the next Ai level.
Middle Level Ai - This Ai is like a
Sergeant.  It evaluates the groups of units and gives each unit a
specific set of orders to complete the command given to that group by
the Top Level Ai.


Heres an example of the process of filtering orders to units :

The
Top Level Ai creates two groups with the available units.  One group is
ordered to defend the current location, while the other is ordered to
advance to location X
The Middle Level Ai will first look at the
defending group, and organise the units within into defending, patroling
and scouting roles depending on unit type.  It will generate patrol
paths, assign units to emplacements etc. Some units may be exchanged
between groups to better suit the Top Level commands it is trying to
complete.
Next it will look at the attacking group. It will look at
where they are, and where they want to go, and create a path for them to
follow to get there.  This path may lead along roads, or through Points
of Interest, or pass by defending units on their way to their
destination.
When the attacking group arrives at their destination,
the Middle Level Ai will then split them up into attackers, flankers and
suppressors and organise a timed attack against the enemies it knows
about, or then sets up defenders, patrollers etc at the destination if
it is clear.

The Middle Level Ai also takes care of reaction
based situations, such as units being shot at, wounded or killed.
Enemeis being spotted or shot at. All those things.  Each order given by
the Middle Level Ai is given a priority, and an order can be overriden
or delayed so that a new more important order can be completed first
depending on the priority of the orders in question.

One of the
key things that makes the system so powerful is the "evaluate" command,
this internal only command tells the AI that it should re-avaluate the
order that just ended (for example from a timeout) and re-create the
order if it is still valid.  This allows the AI to give a group of units
a command such as advance on location x, and then have that order
evaluated and reconfigured several times during their approach

--I have to go now, so I will continue to flesh this out later, hopefully what I have so far makes sense!--

 Bump for interest.
dewi316
dewi316
Veteran

Location : swansea
Points : 179
Reputation : 22
Join date : 2012-12-19

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by TheGeneral Thu 04 Jul 2013, 22:49

Not sure if this is worth bumping tbh. If you are doing it for the community to show more interest in a new AI concept then great, but if it was for the hope that Templar will work more on it, I'm not sure it will be soon.

I've tried to contact him through skype by saying hello a few times lately and he must be really snowed under with other things. I know for a fact he has become alot more relied upon in work, due to a new developement which he is heading. Also He gave me a list of projects he is working on outside of work. Must be about 10-12 things on there and only about 2 or 3 were DR related. So I'm not holding much hope for this coming soon.

 Wink
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

Concept - AI Enhancement EDX Empty Re: Concept - AI Enhancement EDX

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum