Pathfinding Algorithm Improvement

Do you have suggestions or ideas for improvement, post them here and we will them out.

Pathfinding Algorithm Improvement

Postby KGB » Mon Nov 26, 2012 12:11 am

There is *nothing* more annoying than the pathfinding algorithm trying to move your armies through neutral defenders that have been placed on the map or are guarding a site. This gets really bad when it happens turn after turn as you keep walking armies though the same path from city to city forcing you to manually do some extra clicks to walk around this obstacle.

A minor but HUGE improvement would be to weight squares with neutral defenders as costing 10 more points so that the algorithm by default avoids these squares.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Pathfinding Algorithm Improvement

Postby Chazar » Mon Nov 26, 2012 10:06 am

...but I, for one, want to move through neutral units if they are truly in the way! Especially if it happens repeatedly, I'd rather loose a unit or two in a battle than having several units loose many movement points.

However, I agree that the current behaviour is annoying: if there is an alternate route avoiding neutrals which is just as fast, then the pathfinding should really come up with that one!

I think the best solution to this problem would be waypoints, i.e. allowing the player to find the best path from A to C that goes via point B. (I think Warlords offered waypoints through shift-clicks, didn't it?)

This solution would also solve the current issue with scouting the fog of war: I often want to go only a part of the current path, but when I click on the midway point on the shown path, the unit then goes a direct route to that point, often resulting in much less scouting. For example, say I want to go Southwest, but here are hills in the way. The displayed path will start off southwest and then go northwest again to go around the hills. However, clicking the path directly above the hills will cause the unit to just go west, without the zigzag scouting (i.e. not exploiting that diagonal movement cost the same has horizontal or vertical movement in Warbarons).
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm

Re: Pathfinding Algorithm Improvement

Postby smursh » Mon Nov 26, 2012 12:52 pm

The problem I run into occasionally is when the best path goes through an enemy city I want to bypass. If my only way around is to go out to sea, or a long trip through hills the algorithm does tend to want to send me through the enemy city. If it is heavily defended and I am looking to bypass, or link up with other units on the opposite side I want to go around the long way. The main change I would like to see is to not go through occupied cities at all since if I wanted to attack I would be heading there as my destination. Occupied cities should be counted as impassable terrain in the algorithm.
smursh
 
Posts: 437
Joined: Sat Dec 24, 2011 4:05 am

Re: Pathfinding Algorithm Improvement

Postby Chazar » Mon Nov 26, 2012 2:20 pm

smursh wrote:Occupied cities should be counted as impassable terrain in the algorithm.
It does this already!

I just verified this to be sure: a spider on a road through hills, where the road is interecpted by a city with hills on either side, will show a path that goes through the expensive hills around the city, not through it. As it should be.
(PS: the city in my test was occupied by an enemy, it was not neutral - does this make a difference?)
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm

Re: Pathfinding Algorithm Improvement

Postby Zaque » Thu Nov 29, 2012 9:46 am

I find it more annoying with NAPs than with neutrals.
Zaque
 
Posts: 49
Joined: Mon May 21, 2012 9:30 am


Return to Wish list

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Not able to open ./cache/data_global.php