Pathfinding, March formation, CONFUSION?

Armored Brigade is a real-time tactical wargame, focusing on realism and playability
User avatar
Missouri_Rebel
Posts: 3062
Joined: Sun Jun 18, 2006 11:12 pm
Location: Southern Missouri

RE: Pathfinding, March formation, CONFUSION?

Post by Missouri_Rebel »

Well I thought I was getting better results with the Column order, and I was at first. Then they all bunched up. The waypoint in the example below is East of that HQ tank. The 5 tanks to the immediate West ofthe HQ unit were doing a fair job of following behind in column after the initial confusion but the tank highlighted has chosen its own path on another road and all the units to its west have no orders for some reason.



I'm not sure what is going on, and I can handle some 'bumping' of tighter units. Seems every game suffers from this to some degree, usually (hopefully) straightening itself out in time to complete the order, but here, things are much worse. The units disregard the orders, some stay behind, others bump around for what seems too long, the units constantly try to update its path around 'squares', while others completely choose their own roads to take.

Certainly not a column. Tell me the pathfinding is not completely FUBAR.

Image
Attachments
hh.jpg
hh.jpg (164.35 KiB) Viewed 375 times
**Those who rob Peter to pay Paul can always count on the support of Paul
**A government big enough to give you everything you want is a government big enough to take from you everything you have-Gerald Ford
User avatar
nikolas93TS
Posts: 697
Joined: Fri Feb 24, 2017 4:32 pm
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by nikolas93TS »

Is that river impassable?
Armored Brigade Database Specialist
User avatar
Veitikka
Posts: 1499
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by Veitikka »

ORIGINAL: dpabrams

Vehicles travel off the autobahn and into woods or other squares that are not on the road. I assume this is a "stacking" issue and maybe this will improve when "stacking" is increased?

Exactly. I've even thought about disabling the 'narrow' formation spacing, because in the current system the units collide with each other, because of the one-unit-per-cell limitation. I hope I can increase the unit limit in the patches.

While waiting for that, I recommend to not use the narrowest spacing when moving.
Know thyself!
exsonic01
Posts: 1133
Joined: Tue Jul 26, 2016 6:45 pm
Location: Somewhere deep in appalachian valley in PA

RE: Pathfinding, March formation, CONFUSION?

Post by exsonic01 »

Those issues are coming from traffic due to bridge and winding narrow road during March formation. I saw that if first car stops to make a turn, the second car stops and sometimes try to find alternative way, that makes chaos and delay. This happens when there is a bridge and unpassable water, or when marching column should do multiple turns to follow the road. Vehicles trying to find alternative route, then attempt to go around, which results funny yet dangerous route finding.

Large spacing between vehicles would help, but still sometimes happen. Plus, as far as I know, devs are trying to improve this, by allowing 2 or more multiple units in single 30m x 30m basic unit cell. That will help to reduce those behaviors.

Also, I usually don't use march formation in the field. I only use march formation in city, only when there is no enemy nearby, and preferably on highway. I found that AIs feels more easy to find a good route on highway.

This is one of the reason why platoon is better to maneuver than company, especially for AI. Human can fix this issue, but AI feels hard to fix. If you want to set up challenging AI, consist AI force with platoons only, that will help a bit.

User avatar
Veitikka
Posts: 1499
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by Veitikka »

ORIGINAL: Missouri_Rebel

First, and this may be my fault, is that when I place a tank company in the deployment phase in line on a road and reattach them as soon as I set a waypoint they all get rearranged. Not sure why it does that. They also get rearranged by choosing the formation and hitting the march order. As soon as I do that poof, rearranged.

I'm having trouble doing this now but it worked just last night. Is there a correct way to perform this action? I was setting up a battle to do some tests because my formations have some real pathfinding issues from going way off the roads, picking random routes with some tanks, others saying it is unable to find a path etc, all within a simple march to a waypoint.

Same here. The units collide with each other because they're too close to each other.

Also, the tanks that moved through the heavy woods moved as fast as those down the road with an occasional immobilize. IMO, it should be a very slow trek. Seems unrealistic.

Perhaps those moving on the road slowed down because they tried to match the speed of those moving in the woods?

Lastly, 2 tanks were moving down the road and the one went right through the other and they traveled together almost exactly on top of each other.

There's no collision detection in the game. The one-unit-per-cell limitation has been the primary way to avoid collisions.
Know thyself!
User avatar
Veitikka
Posts: 1499
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by Veitikka »

ORIGINAL: Missouri_Rebel

so a reload. The only time my units were not rearranged is if I start the battle first. Here I set a waypoint with Quick modifier and march.

Image

This is not the correct way to use formation movement. The formation should be let to organize its units automatically. If you don't want them to reorganize between waypoints then select formation->free.
Know thyself!
User avatar
Veitikka
Posts: 1499
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by Veitikka »

ORIGINAL: Missouri_Rebel

Certainly not a column. Tell me the pathfinding is not completely FUBAR.

The pathfinding algorithm is excellent. It's just about what map cells the units see as passable or impassable, and currently any unit blocks the path because of the one-unit-per-cell limitation. If the units should follow a road then the 'march' formation should be used, waypoints placed along the road, without the narrowest spacing.
Know thyself!
noooooo
Posts: 81
Joined: Wed Sep 26, 2018 11:03 pm

RE: Pathfinding, March formation, CONFUSION?

Post by noooooo »

ORIGINAL: Veitikka

ORIGINAL: Missouri_Rebel

so a reload. The only time my units were not rearranged is if I start the battle first. Here I set a waypoint with Quick modifier and march.

Image

This is not the correct way to use formation movement. The formation should be let to organize its units automatically. If you don't want them to reorganize between waypoints then select formation->free.

Yes, that doesn't seem to work because relative positioning is really important to the AI formation. The chance of you ordering them in the exact same ordering as the AI does it low. For example:
https://vimeo.com/301470164

As you can see in my video when you get your units to do a 180, instead of just turning around and going, they have to organize themselves in the exact same relative positioning before they move forward. This doesn't happen if you use free formation.
noooooo
Posts: 81
Joined: Wed Sep 26, 2018 11:03 pm

RE: Pathfinding, March formation, CONFUSION?

Post by noooooo »

Incidentally I think that could be a pathfinding quirk that can be improved upon because relative positioning to each other shouldn't matter. It only wastes time.

Perhaps it would help pathfinding AI to have it like this: Instead of going into the exact same relative positioning, each unit position in the formation searches for the closest unit of the same type and puts it there instead. This way getting back into formation would be significantly faster and more dynamic and doesn't waste nearly as much time.
User avatar
Missouri_Rebel
Posts: 3062
Joined: Sun Jun 18, 2006 11:12 pm
Location: Southern Missouri

RE: Pathfinding, March formation, CONFUSION?

Post by Missouri_Rebel »

I assumed that I could click a location on the map and if I chose March and Quick they would find the quickest path down roads to that waypoint. Are you saying I need to set a waypoint at every turn and corner? Mius Front has the former. Do I need to perform the latter for movement?
**Those who rob Peter to pay Paul can always count on the support of Paul
**A government big enough to give you everything you want is a government big enough to take from you everything you have-Gerald Ford
User avatar
Veitikka
Posts: 1499
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by Veitikka »

ORIGINAL: Missouri_Rebel

I assumed that I could click a location on the map and if I chose March and Quick they would find the quickest path down roads to that waypoint. Are you saying I need to set a waypoint at every turn and corner? Mius Front has the former. Do I need to perform the latter for movement?

If 'march' is used then the SOP pathfinding option (quick/short/cover) is ignored.

You can experiment with this. The more waypoints you add along the road, the more closely the units in the formation will follow it. Sometimes it may be enough to place just one waypoint. If there are several roads to choose from the units may pick different roads. I think they do use the quickest path, but it's not necessarily the same road for all units [:)] You know, in some cases there may not be road at all, depending on where the player commands them to go.
Know thyself!
User avatar
Missouri_Rebel
Posts: 3062
Joined: Sun Jun 18, 2006 11:12 pm
Location: Southern Missouri

RE: Pathfinding, March formation, CONFUSION?

Post by Missouri_Rebel »

ORIGINAL: Veitikka

ORIGINAL: Missouri_Rebel

I assumed that I could click a location on the map and if I chose March and Quick they would find the quickest path down roads to that waypoint. Are you saying I need to set a waypoint at every turn and corner? Mius Front has the former. Do I need to perform the latter for movement?

If 'march' is used then the SOP pathfinding option (quick/short/cover) is ignored.

You can experiment with this. The more waypoints you add along the road, the more closely the units in the formation will follow it. Sometimes it may be enough to place just one waypoint. If there are several roads to choose from the units may pick different roads. I think they do use the quickest path, but it's not necessarily the same road for all units [:)] You know, in some cases there may not be road at all, depending on where the player commands them to go.


I did not know this. I'll try some more. Your thoughts on the column issue above? It it the same? i.e. not enough waypoints, not set to free?

Maybe things would help if on the formation choice screen the modifiers chosen are highlighted?
**Those who rob Peter to pay Paul can always count on the support of Paul
**A government big enough to give you everything you want is a government big enough to take from you everything you have-Gerald Ford
User avatar
budd
Posts: 3093
Joined: Sat Jul 04, 2009 3:16 pm
Location: Tacoma

RE: Pathfinding, March formation, CONFUSION?

Post by budd »

Moreb,
I replied to you over at grogheads, in the shots i only used one way point, but i usually place more.
Enjoy when you can, and endure when you must. ~Johann Wolfgang von Goethe

"Be Yourself; Everyone else is already taken" ~Oscar Wilde

*I'm in the Wargamer middle ground*
I don't buy all the wargames I want, I just buy more than I need.
User avatar
Veitikka
Posts: 1499
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by Veitikka »

ORIGINAL: Missouri_Rebel

I did not know this. I'll try some more. Your thoughts on the column issue above? It it the same? i.e. not enough waypoints, not set to free?

I think in your column example the middle unit you had selected strayed off because it thought the other bridge was a faster way to the destination, or the main bridge was blocked because of the one-unit-per-cell limitation. The column formation does use the SOP 'pathfind' setting (unlike the march formation), so if you set the SOP pathfind to 'short' instead of 'quick' they should be less prone to find detours.
Know thyself!
User avatar
Missouri_Rebel
Posts: 3062
Joined: Sun Jun 18, 2006 11:12 pm
Location: Southern Missouri

RE: Pathfinding, March formation, CONFUSION?

Post by Missouri_Rebel »

ORIGINAL: budd

Moreb,
I replied to you over at grogheads, in the shots i only used one way point, but i usually place more.


Yeah, i seen that. Thanks. I did reply. I appreciate the pics as on Matrix the upload size is minuscule.

http://grogheads.com/forums/index.php?topic=20671.105
**Those who rob Peter to pay Paul can always count on the support of Paul
**A government big enough to give you everything you want is a government big enough to take from you everything you have-Gerald Ford
User avatar
budd
Posts: 3093
Joined: Sat Jul 04, 2009 3:16 pm
Location: Tacoma

RE: Pathfinding, March formation, CONFUSION?

Post by budd »

I let that example run and a few units did re-route but not anything to out of bounds, but they were engaged at the time so it might just be a threat assessment thing.
Enjoy when you can, and endure when you must. ~Johann Wolfgang von Goethe

"Be Yourself; Everyone else is already taken" ~Oscar Wilde

*I'm in the Wargamer middle ground*
I don't buy all the wargames I want, I just buy more than I need.
User avatar
Missouri_Rebel
Posts: 3062
Joined: Sun Jun 18, 2006 11:12 pm
Location: Southern Missouri

RE: Pathfinding, March formation, CONFUSION?

Post by Missouri_Rebel »

ORIGINAL: Veitikka

ORIGINAL: Missouri_Rebel

I did not know this. I'll try some more. Your thoughts on the column issue above? It it the same? i.e. not enough waypoints, not set to free?

I think in your column example the middle unit you had selected strayed off because it thought the other bridge was a faster way to the destination, or the main bridge was blocked because of the one-unit-per-cell limitation. The column formation does use the SOP 'pathfind' setting (unlike the march formation), so if you set the SOP pathfind to 'short' instead of 'quick' they should be less prone to find detours.


Thanks. I'm going to experiment more. I have a feeling that most of the errors are on my end. It sure would be helpful if the formation panel stayed open when you click the settings and the chosen settings were highlighted to see what has been selected and to differentiate what modifiers are mutually excluded.
**Those who rob Peter to pay Paul can always count on the support of Paul
**A government big enough to give you everything you want is a government big enough to take from you everything you have-Gerald Ford
geordietaf
Posts: 31
Joined: Sun Dec 18, 2016 1:55 pm

RE: Pathfinding, March formation, CONFUSION?

Post by geordietaf »

ORIGINAL: actrade

I have had the same issue. The DEV mentioned using the march command, but I believe the stacking issue is making organized movement very difficult. Try sending a formation across a bride if you want to see how bad this can get.

Hmmm... anyone got a bride I can try this with?
User avatar
Veitikka
Posts: 1499
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: Pathfinding, March formation, CONFUSION?

Post by Veitikka »

ORIGINAL: Missouri_Rebel

It sure would be helpful if the formation panel stayed open when you click the settings and the chosen settings were highlighted to see what has been selected and to differentiate what modifiers are mutually excluded.

The information is already there in the UI. When the formation flag is selected, you see M(arch), S(hortest), Q(uickest) or C(overed) above the flag. The dots next to the flag indicate the shape and spacing. If no dots are seen then the formation type is 'free'.
Know thyself!
Mousehold
Posts: 7
Joined: Mon Dec 15, 2014 11:51 pm

RE: Pathfinding, March formation, CONFUSION?

Post by Mousehold »

It seems to me that the root issue is from the pathfinding algorithm (correctly) evaluating a cell with another unit in it as impassable. Perhaps if the unit in the cell is currently moving (or has an order to move, which might work better but it seems less safe from deadlocks) the cell should be treated as passable by the pathfinding algorithm. If the unit is moving then we can reasonably expect that cell will eventually be passable, so it's safe to route through it. Of course if the other unit stops, then the cell becomes impassable and a new route must be found.

One possible worst-case scenario for this is two (or more) units moving towards one another across a narrow bridge. All units will think the bridge is passable until they "collide" in the middle and are forced to stop. They must then reevaluate their pathfinding. Any stuck in the middle of the pack will not see a way off until all vehicles to one side of them have started moving again. This seems like something rare and manageable by the player though.
Post Reply

Return to “Armored Brigade”