Unit pathing

Post bug reports and ask for game support here.

Moderator: Shannon V. OKeets

Post Reply
joshuamnave
Posts: 967
Joined: Wed Jan 08, 2014 3:51 am
Contact:

Unit pathing

Post by joshuamnave »

Note - this is NOT a bug, and as non bugs go, it's pretty low priority, if a priority at all.

Units ordered to move through enemy territory make some pretty odd decisions about the paths to take. They seem to go out of their way to avoid claiming rail/road hexes, preferring to move through enemy controlled farmlands. It happens in all parts of the map, and it happens reliably in a few places like the one in the following two screenshots.

Here, the Japanese division is about to move. Note that both the road and the hexes just north of it are Chinese controlled at the moment.



Image
Attachments
pathing1.jpg
pathing1.jpg (247.44 KiB) Viewed 152 times
Head Geek in Charge at politigeek.net - the intersection of politics and all things geeky
User avatar
AxelNL
Posts: 2389
Joined: Sat Sep 24, 2011 12:43 pm
Location: The Netherlands

RE: Unit pathing

Post by AxelNL »

You know the AI is not active yet?[8D]
joshuamnave
Posts: 967
Joined: Wed Jan 08, 2014 3:51 am
Contact:

RE: Unit pathing

Post by joshuamnave »

Now I'll order it to move to the rail line NE of the HQ. Rather than moving along the road and capturing it for Japanese use, it diverges through farmlands. The path chosen by the pathing AI is not shorter either in distance or in movement points.



Image
Attachments
pathing2.jpg
pathing2.jpg (102.7 KiB) Viewed 152 times
Head Geek in Charge at politigeek.net - the intersection of politics and all things geeky
joshuamnave
Posts: 967
Joined: Wed Jan 08, 2014 3:51 am
Contact:

RE: Unit pathing

Post by joshuamnave »

This happens frequently in Russia. It happens reliably in Denmark (send a 4 movement factor division up to northern Denmark to overrun the naval units there and it will go out of its way to move off the rail and bypass the other Danish port).

Yes, I'm aware I can manually move the unit hex by hex. It's not a big deal, but at some point perhaps it would be worthwhile to take a quick look at the pathing AI and have it prioritize capturing enemy rail/roads when given the option.
Head Geek in Charge at politigeek.net - the intersection of politics and all things geeky
joshuamnave
Posts: 967
Joined: Wed Jan 08, 2014 3:51 am
Contact:

RE: Unit pathing

Post by joshuamnave »

ORIGINAL: AxelNL

You know the AI is not active yet?[8D]

The opponent AI is not active yet. I'm using AI in the more general sense. When the computer chooses how to move the units, that's a form of AI also. Here I'm referring to it as the pathing AI, which is probably how Steve refers to it as well.
Head Geek in Charge at politigeek.net - the intersection of politics and all things geeky
User avatar
Dabrion
Posts: 740
Joined: Tue Nov 05, 2013 10:26 am
Location: Northpole

RE: Unit pathing

Post by Dabrion »

There probably is a pathing heuristic kicking in (something like walk x coordinate of source hex until you are intercepted by y or z coordinate of target hex, then follow along that coordinate). I think you can ctrl+click to determine waypoints for "fancy" pathing.
"If we come to a minefield, our infantry attacks exactly as it were not there." ~ Georgy Zhukov
User avatar
AxelNL
Posts: 2389
Joined: Sat Sep 24, 2011 12:43 pm
Location: The Netherlands

RE: Unit pathing

Post by AxelNL »

ORIGINAL: Dabrion

There probably is a pathing heuristic kicking in (something like walk x coordinate of source hex until you are intercepted by y or z coordinate of target hex, then follow along that coordinate). I think you can ctrl+click to determine waypoints for "fancy" pathing.

Correct - I sometimes want a bypass route instead of what is the most optimum route and do that also.

What you propose is something modern TomTom like applications have: Evade tollroad, always use highways, use bicycle roads.

This area is where the coming AI will not be great, I am convinced. There are so many different factors to evaluate what path is best (cutting rails, conquering cities when having the odd MP available, etc that I cannot image creating the code which can match a good player.
User avatar
AxelNL
Posts: 2389
Joined: Sat Sep 24, 2011 12:43 pm
Location: The Netherlands

RE: Unit pathing

Post by AxelNL »

but I can imagine that you ask why the game looks like it tries the evade the more interesting hexes.

User avatar
WarHunter
Posts: 1174
Joined: Sun Mar 21, 2004 6:27 pm

RE: Unit pathing

Post by WarHunter »

Warhunter's rules for moving land units in MWiF.
Moving units is like taking out the trash. If you want it done right. Do it yourself.

An optimally moved unit is in the eyes of the beholder. The computer has no eyes.

The computer move will never move a unit or stack of units optimally.

If a unit is moving behind your lines. Only the destination matters. Save yourself some clicks of the mouse.

If a unit is moving in enemy territory. Click each hex.

If a unit is moving in and out of enemy controlled hexes. Click each hex.

Moving an oos unit is detrimental to the combat health of oos unit.

Undo is your friend. Except when its grayed out.

Getting up and moving to get a beer is more important than not moving to get a beer.
Image
“We never felt like we were losing until we were actually dead.”
Marcus Luttrell
User avatar
AxelNL
Posts: 2389
Joined: Sat Sep 24, 2011 12:43 pm
Location: The Netherlands

RE: Unit pathing

Post by AxelNL »

hear hear

[8D]
User avatar
Finarfïn
Posts: 145
Joined: Sun Dec 22, 2013 11:03 pm

RE: Unit pathing

Post by Finarfïn »

Thus spoke Warhunterand there was light.... errr units movements [:D]
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Unit pathing

Post by Shannon V. OKeets »

Not surprisingly the path algorithm processes in numerical order. In this case the hexsides are numbered from 0 through 5 with due west 0 and clockwise thereafter. But before choosing a path, the algorithm looks for the best hexside which leads towards the destination hex. It then chooses one of the two hexsides. In some instances there is only one hexside. In your example, hexside 3 is being chosen over hexside 4.
Steve

Perfection is an elusive goal.
joshuamnave
Posts: 967
Joined: Wed Jan 08, 2014 3:51 am
Contact:

RE: Unit pathing

Post by joshuamnave »

This isn't really an issue right now, because we can manually choose paths and even with a more dynamic pathing AI we would probably still choose paths by hand in many instances. But it's going to be an issue with opponent AI's, if they aren't looking at the long term supply and mobility ramifications of not moving across rails lines.
Head Geek in Charge at politigeek.net - the intersection of politics and all things geeky
bo
Posts: 4175
Joined: Thu Apr 30, 2009 9:52 pm

RE: Unit pathing

Post by bo »

ORIGINAL: WarHunter

Warhunter's rules for moving land units in MWiF.
Moving units is like taking out the trash. If you want it done right. Do it yourself.

An optimally moved unit is in the eyes of the beholder. The computer has no eyes.

The computer move will never move a unit or stack of units optimally.

If a unit is moving behind your lines. Only the destination matters. Save yourself some clicks of the mouse.

If a unit is moving in enemy territory. Click each hex.

If a unit is moving in and out of enemy controlled hexes. Click each hex.

Moving an oos unit is detrimental to the combat health of oos unit.

Undo is your friend. Except when its grayed out.

Getting up and moving to get a beer is more important than not moving to get a beer.

+ 1 Damn warhunter you almost sound you know what your talking about[:D]

Bo
Post Reply

Return to “Tech Support”