Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathfinding. Ships going to Europe choose paths longer than necessary. #610

Open
windock opened this issue Aug 12, 2022 · 11 comments
Open
Assignees

Comments

@windock
Copy link
Collaborator

windock commented Aug 12, 2022

Develop 2 branch.

All the ships going from my main port city choose path to Europe (Sail to Europe menu item) that is longer than necessary.

On the first screenshot my galleon is going to Europe. I have, for demonstration purposes, plotted it's possible path, by right-clicking on the border of the New World. As you can see, it needs 1 turn only to go to the edge, with a single square extra of pathing available.
turn1

This screenshot is after I end the current turn. You can see that the ship, instead of going East, went South-East. It lost a full turn by that maneuver, comparing to the path of the previous turn.
turn2

Attaching two save files, corresponding to 2 turns in screenshots.
windock AD-1660-July.zip
windock AD-1661-January.zip

@MrZorG33
Copy link
Collaborator

this statement is correct and about the way from Europe to the colonies.
and where is the point of the first appearance of the ship on the first turn? I have an assumption that the ship is sailing towards it. I may be wrong)

@windock
Copy link
Collaborator Author

windock commented Aug 13, 2022

@MrZorG33
The first appearance of the ship (on first screenshot) is needed to show that the ship can go to Europe on the next turn. It shows a path that I would use to manually move to Europe.
However, if you order it to move to Europe instead automatically, next turn is shown on next screenshot.
Second turn’s screenshot shows that the same ship, while ordered to go to Europe, chooses a path that wastes 1 full turn of movement.

@windock
Copy link
Collaborator Author

windock commented Aug 13, 2022

in the following turns of the game ships sometimes choose a better path, going strait East. And they get back from Europe using the same efficient path. Maybe the issue is ships try to avoid any terrain features (unfavorable wind, favorable wind).

@raystuttgart
Copy link
Collaborator

Also possible, since they are actually considered in PathFinding.
(e.g. Damage that the Ship could suffer.)

@raystuttgart
Copy link
Collaborator

Yeah I think this is really just related to Terrain Features like Winds and Storms.
Because those can also hurt the Ships. I think the logic is fine.

@MrZorG33
Copy link
Collaborator

I'll put in my 50 cents
according to my observations, ships going to Europe try to move towards the approximate tile of their first appearance. I noticed this in my last test game. I think this needs to be rechecked. because the path increased by about three times.

@MrZorG33 MrZorG33 reopened this Dec 26, 2022
@MrZorG33
Copy link
Collaborator

MrZorG33 commented Mar 8, 2023

one more addition.
my karakka was shipped to europe in auto mode. when, according to my calculations, she should have already been on the docks of Europe, I found her on the map at this place.

we need to figure out why the ships ignore the first tiles "access Europe". and to what point are they moving?))
image

@devolution79
Copy link
Member

Upload a save or it didn't happen :P

@raystuttgart
Copy link
Collaborator

raystuttgart commented Mar 11, 2023

Also as I wrote in the forum, please check if the correct Europe Plots were placed. 👍
That might also cause Ships to take additional moves before they sail to Europe.

Sometimes map makers e.g. place Europe WEST instead of Europe EAST.
(It is actually pretty easy to check and correct.)

@MrZorG33
Copy link
Collaborator

MrZorG33 commented Mar 20, 2023

Europe Plots is fine (especially since it worked at the beginning of the game).
BeginPlot
x=66,y=149
EuropeType=EUROPE_EAST
FeatureType=FEATURE_ARROW_E, FeatureVariety=0
TerrainType=TERRAIN_OCEAN
PlotType=3
EndPlot
moreover, as can be seen, the current passes through it to the east. however, with the opening of the map, ships sent to Europe in automatic mode stopped using it. which is strange, because the flow speeds up the movement. and while the southeastern part of the map was not explored, the ships used the stream (red line), but then stopped doing so (green line).

image

translation.zip

@devolution79
Copy link
Member

Remember that the AI (and automated units by the player) base their decision on what they can currently see. That means that due to the weather effects or hostile units (pirates, animals) they may choose a path that appears sub-optimal.
As for the current, it should be ignored for this discussion since the pathfinder has no support for it and this it's not a bug but a missing feature!

As for the ship ignoring the nearest Europe plots, I'd need a save or a instructions on how to reproduce. It would also be interesting to know if it applies to random maps as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants