AI blocking itself and what happen with flying trucks?

Discuss the future of Warzone 2100 with us.
Post Reply
Poto
New user
Posts: 1
Joined: 22 May 2007, 00:20

AI blocking itself and what happen with flying trucks?

Post by Poto » 24 May 2007, 05:48

Hello

I have been playing for about 2 weeks. I'm a complete addict already.

I started with an old version (0.2.2) and now playing 2.0.6.

First, I noticed that in both versions the AI gets stuck inside its own base, after building defenses or a factory blocking its own path.

Second, why were flying trucks removed from new versions? I saw another thread in this section but I would like to know the official position from the people participating in this project. Maybe, it would be a good idea to have this in the FAQ for people used to old versions.

User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: AI blocking itself and what happen with flying trucks?

Post by lav_coyote25 » 24 May 2007, 06:06

the flying trucks were added in 1.11 by the N.E.W.S.T crew... and i believe thats where the war started.  the flying trucks can and were used to base rape those who didnt know or were too slow to keep up with the research.

imagine 15 flying trucks decending close to your base - not close enuff for mortars or heavy cannon hardpoints to act...  and build a row or several of hellstorms and then place a CB sensor ( 1 for 4 hellstorms) and a wide spectrum sensor...  wouldnt take long and the base is gone.

if you notice the original gameplayers on gamespy ONLY play the 1.10 original game. None of the fellas i spoke with are interested in the GPL version - they say its gone away from the original game play mechanics or the (spirit) of the game.  well i know different... it has changed for the better... some of the annoying little "features" have been solved and some of the more brittle bugs are being sought out and eradicated... ( the multiplayer net code - eventually...). 

and an faq is a good idea... i did have one started for the original ( documents project - here...).  maybe ask a few more of these types of questions and i can start a new section to the WZ2100DocumentsProject. ;D

as for the ai getting stuck in its base.... that is the fault of the map maker... see the section in the world editor...here
‎"to prepare for disaster is to invite it, to not prepare for disaster is a fools choice" -me (kim-lav_coyote25-metcalfe) - it used to be attributed to unknown - but adding the last bit , it now makes sense.

Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: AI blocking itself and what happen with flying trucks?

Post by Giel » 24 May 2007, 09:49

Poto wrote: Second, why were flying trucks removed from new versions? I saw another thread in this section but I would like to know the official position from the people participating in this project.
First, flying trucks were never removed, in fact there never have been flying trucks in Warzone itself before that its source was released under the GPL. Well the 1.11 version basically is a mod, so that wasn't in Warzone itself. Then secondly, that thread was a feature request. As for an official position on this particular subject there is none, although I doubt this will be implemented by anyone. The unbalance being caused is one reason for this. The fact that there's a whole lot of other things to do being a second reason.
Poto wrote: Maybe, it would be a good idea to have this in the FAQ for people used to old versions.
Well the point is this isn't a FAQ (frequently asked question).
lav_coyote25 wrote: and an faq is a good idea...
We already have a FAQ.
Last edited by Giel on 24 May 2007, 09:57, edited 1 time in total.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh

UrbanVoyeur
Trained
Trained
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC

Re: AI blocking itself and what happen with flying trucks?

Post by UrbanVoyeur » 24 May 2007, 13:04

lav_coyote25 wrote: as for the ai getting stuck in its base.... that is the fault of the map maker... see the section in the world editor...here
I don't entirely agree. Some of the old AI mods had better pathfinding code that prevented these bottlenecks. At some point, the several AI issues  -  pathfinding, formations, base building patterns and use of commanders - should be re-visited.  Maybe when the code settles down a bit.

I could be wrong in my perceptions, but at least on the trunk side, scripting and mapping coordinate calculations seem to be in too much flux for an attempt to make sense now, either in scripting or core AI.

Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: AI blocking itself and what happen with flying trucks?

Post by Troman » 24 May 2007, 22:35

UrbanVoyeur wrote: I don't entirely agree. Some of the old AI mods had better pathfinding code that prevented these bottlenecks.
Pathfinding was never changed and scripted AI has no access to the pathfinding.
Sign Up for Beta-Testing:
?topic=1617.0

UrbanVoyeur
Trained
Trained
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC

Re: AI blocking itself and what happen with flying trucks?

Post by UrbanVoyeur » 24 May 2007, 22:45

Troman wrote: Pathfinding was never changed and scripted AI has no access to the pathfinding.
Interesting - was it building spacing? formations? better spacing of attacks and staging areas? The other advanced AI's in some of the older scripts almost never encountered bottlenecks, unlike the current AI.

Of course they also attacked relentlessly...

User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: AI blocking itself and what happen with flying trucks?

Post by lav_coyote25 » 25 May 2007, 04:03

scroll down to the tutorial by by Dr. John    www.KickAssGear.com  specifically parts 9 10 11 12  and the tutorial immediately following by  RBL-4NiK8r_on_begining_map_making.


it is the positioning of the gateways that provokes the problems with the ai.  a simple test was discovered by myself after building a few maps and listening to others tell of their problems... i asked what would happen if you took a 4 arm cross with 5 squares each and assembled it in the exact center of the map.... most people i asked the question of said it wouldn't work or if it did it would make the ai very slow.

well... i did make several maps with this configuration - and had better and faster ai path finding ...  so it is the gateways.  if they arent placed in the right areas... they dont work all that well..ie: slow ai with tail chasing and other anomalies.

all i know is you have to keep gateways completely away from base entrances - or the ai WILL!!!!!! lock itself in.  not might but WILL!!!!.
that and the ai placing structures on bridge type or driveway type areas.... again if the driveway is not wide enuff :ie: 3 to 5 squares - you will notice the ai build and usually have a blockage at that point due to returning units and exiting units not giving way to each other...    ;D
‎"to prepare for disaster is to invite it, to not prepare for disaster is a fools choice" -me (kim-lav_coyote25-metcalfe) - it used to be attributed to unknown - but adding the last bit , it now makes sense.

UrbanVoyeur
Trained
Trained
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC

Re: AI blocking itself and what happen with flying trucks?

Post by UrbanVoyeur » 25 May 2007, 04:20

lav_coyote25 wrote: all i know is you have to keep gateways completely away from base entrances - or the ai WILL!!!!!! lock itself in.  not might but WILL!!!!.
that and the ai placing structures on bridge type or driveway type areas.... again if the driveway is not wide enuff :ie: 3 to 5 squares - you will notice the ai build and usually have a blockage at that point due to returning units and exiting units not giving way to each other...    ;D
Good tutorial, thanks.

I guessing here, but does that mean the pathfinding has trouble with
- yielding right of way
- untying clusters of vehicles with no paths / zero degrees of freedom
- forming narrow formations to deal with choke points
- ignoring some gateways to travel between zones when the gateway would result in a log jam.

and the base building AI misjudges the minimum turn radius when fortifying entrances, especially when the passage is narrow.

Can the AI use waypoints?

I've noticed that after a prolonged traffic jam, the AI seems to shut down and give up., even when alternate paths exist. Do you know why?

User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: AI blocking itself and what happen with flying trucks?

Post by lav_coyote25 » 25 May 2007, 04:34

I'm guessing here, but does that mean the pathfinding has trouble with
- yielding right of way = yes
- untying clusters of vehicles with no paths / zero degrees of freedom = yes
- forming narrow formations to deal with choke points = wont do it - seems to log jam even if there is room for passing...
- ignoring some gateways to travel between zones when the gateway would result in a log jam.  nope - see above this

and the base building AI misjudges the minimum turn radius when fortifying entrances, especially when the passage is narrow. yes - this has been from day one.

Can the AI use waypoints?  not that i know of

I've noticed that after a prolonged traffic jam, the AI seems to shut down and give up., even when alternate paths exist. Do you know why?  no sorry... i am not a coder...i just try and build maps that the ai can use to kick everyones butt.... ;D
‎"to prepare for disaster is to invite it, to not prepare for disaster is a fools choice" -me (kim-lav_coyote25-metcalfe) - it used to be attributed to unknown - but adding the last bit , it now makes sense.

UrbanVoyeur
Trained
Trained
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC

Re: AI blocking itself and what happen with flying trucks?

Post by UrbanVoyeur » 25 May 2007, 04:46

lav_coyote25 wrote: ...i just try and build maps that the ai can use to kick everyones butt.... ;D
Omnius, the machine evermind thanks you for your support. :)

Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: AI blocking itself and what happen with flying trucks?

Post by Troman » 25 May 2007, 12:05

As Coyote said, the biggest problem is the gateway placement (and too narrow chokepeoints). Another problem is obstacle avoidance. AI builds walls of defences on the gateway (chokepoints), leaving only one empty tile. When a unit meets another unit which is driving at the opposite direction right at that tile, it often doesn't manage to drive around and thus blocks the chockpoint.

We now have a function that leaves 2 empty tiles in the center of the gateway, don't remember if 1.10 is already using it instead of the function that was leaving 1 tile.

As for custom AIs having less troubles with traffic jam, I can't confirm it. Traffic jam mostly happens on gateways and when custom AIs came out we had no cource to take care of the problem.

One of my AIs used a small trick. It recognized a traffic jam and after some time units woule start firing at structures and eventually at units causing the traffic jam nearby. It does work, but it's a bit hacky for an AI script, so I took it out.

There's also a trick to leave more space between structures in the base, but as I said the traffic jam usually happens on the gateways.

We now have another function which takes max number of blocked tiles nearby and calculates a valid building site based on that value, provided x/y coords and structure type. So if you pass 0, it will only look for places where a structure which is about to be built would have no other structures around. It is not widely used yet.

So as you see we do care about the problem, but those are all workarounds, what we really need is a better obstacle avoidance.
Sign Up for Beta-Testing:
?topic=1617.0

Solitaire
Trained
Trained
Posts: 32
Joined: 05 Dec 2006, 22:47

Re: AI blocking itself and what happen with flying trucks?

Post by Solitaire » 31 May 2007, 20:49

Indeed. It's not just the "active" FSM module of the AI but the "passive" base AI that has a good few problems still outstanding, and because a residual form of this AI is used to deal with ALL individual units, including yours, even a human player can get "choked" if he's not careful (indeed smacktards have used this plus dummies and arty for some really cheap tricks against attackers) and it takes time for even a human to untangle the mess. An AI, of course, can't even begin to untangle it in the first place!

In addition to replumbing bits of active AI (esp. gateway control and utilization!) and fiddling some bits of the passive (such as individual unit behavior when dealing with tight turns given turning radius) we really need a THIRD AI system. Just as we have the passive inherent rules and behaviors of individual units, and the FSMs and active decisions of an active AI "bot" player, we need a structure/AI to make group decisions - for the passive behaviors/rules of individual units to "talk" to other friendly and neutral units and decide who gets to go through the choke next, or to tell the guys behind to back up and give them space to reverse themselves, so the wedged-in unit ahead who was "asking" for space finally gets the room to unstick itself.

Sounds simple, and is really useful in the long-term, but it would take some effort to get these code functions working correctly themselves AND alongside the conventional AI code :-\

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: AI blocking itself and what happen with flying trucks?

Post by Watermelon » 01 Jun 2007, 17:01

Solitaire wrote: Indeed. It's not just the "active" FSM module of the AI but the "passive" base AI that has a good few problems still outstanding, and because a residual form of this AI is used to deal with ALL individual units, including yours, even a human player can get "choked" if he's not careful (indeed smacktards have used this plus dummies and arty for some really cheap tricks against attackers) and it takes time for even a human to untangle the mess. An AI, of course, can't even begin to untangle it in the first place!

In addition to replumbing bits of active AI (esp. gateway control and utilization!) and fiddling some bits of the passive (such as individual unit behavior when dealing with tight turns given turning radius) we really need a THIRD AI system. Just as we have the passive inherent rules and behaviors of individual units, and the FSMs and active decisions of an active AI "bot" player, we need a structure/AI to make group decisions - for the passive behaviors/rules of individual units to "talk" to other friendly and neutral units and decide who gets to go through the choke next, or to tell the guys behind to back up and give them space to reverse themselves, so the wedged-in unit ahead who was "asking" for space finally gets the room to unstick itself.

Sounds simple, and is really useful in the long-term, but it would take some effort to get these code functions working correctly themselves AND alongside the conventional AI code :-\
wz's skirmish/indiviual AI is still competitive with/possibly better than modern commercial RTS games,but its A* plan finding implementation is not very effective,because of the limitations of cpu when wz was firstly released commercially I guess.

the avoidance code is quite unusual too,it uses the avoidance techniques in FPS games to do friendly-avoidance,which may make the droids doing avoidance end up as circling around trying to find the desired avoidance turning angle when multiple droids are bumped into each other within a fairly small area.

A common/simple solution to 'bump' in RTS game:
1.get bumped target's direction of motion
2.find a free position with offset(normally a constant AVOID_DISTANCE or sth similar) that is perpendicular to bumped target's direction of motion
3a.insert the newly found position to the first node of move node list
3b.move towards bumped target's destination a bit then redo 2 if last attempt failed/unable to find a free position

group AI is very hard to implement,trying to make them fight togther and cooperatively will more likely to get them jacked up due to the unintentional stuckage by group Ai.

sometimes it makes me wonder if wz AI is too advanced to be used in a RTS game...  :o
tasks postponed until the trunk is relatively stable again.

Post Reply