Navigation Menu

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

Change #8001: Don't add docking tile cost when ships are still too far from their destination #8009

Closed

Conversation

SamuXarick
Copy link
Contributor

I noticed the problem with #8001 was mainly due to the added cost of docking tile penalty, though it could also be related with ship curve penalties as well, but I decided to mess with docking tile. I know it's used to separate the ships heading to docking tiles of a single station multi-dock.

So I thought of not adding this penalty too early in the search as an effort to reduce the number of pathfinding search nodes. It is only added when the distance to the destination is less than 16 Manhattan tiles.

@LordAro LordAro requested a review from PeterN February 22, 2020 08:38
@SamuXarick SamuXarick force-pushed the yapf-ship-docking-tile-penalty branch 2 times, most recently from 3653240 to 3a4470f Compare February 25, 2020 11:06
@SamuXarick
Copy link
Contributor Author

SamuXarick commented Feb 25, 2020

I've been testing diferent costs for docking tile occupancy, to experiment with their intended purpose of spreading ships to diferent docking tiles, and I realise 300 may be too little. A value around 1400-1500 resulted in a better spread.

1500 cost: 12 ships, 12 docking tiles, ships occuppied 12/12
Lardingstone Transport, 1961-07-05

300 cost: 12 ships, 12 docking tiles, ships occuppied 6/12
Lardingstone Transport, 1962-10-30

Perhaps if this PR is accepted, docking tile penalty cost could also be adjusted for a better spreading of ships.

PS: These tests were done with the #8021 fix already in.

@nielsmh nielsmh added the component: pathfinder This issue is related to Pathfinder label May 6, 2020
@techgeeknz
Copy link
Contributor

This is just a thought, but how is distance to the station calculated (for adding the penalties)? Does it take into account the setting for "station spread"?
I ask this because it could look mighty strange if a ship were to sail past an empty dock only to turn around and sail back to it again because the penalty wasn't added soon enough.

@TrueBrain TrueBrain added candidate: probably not This Pull Request will most likely be closed soon size: small This Pull Request is small, and should be relative easy to process labels Dec 14, 2020
@TrueBrain
Copy link
Member

I am not convinced at all that this is a proper way to solve ship path-finding. It might work for the cases you tried, but it reads to me many more cases will start failing horribly. Basically, you are chunking the path-finders, which is good for performance, but gives many many side-effects most of the time.

Additionally, the way you describe your patch feels to me that you don't really understand what is going on, but that this just happened to work. This too is a reason I am not convinced.

I would need an opinion of someone with in-depth knowledge of our path-finders to convince me otherwise. Or someone who really did his research here, and showed many different cases to proof that common use-cases don't break now.

In general, ship path-finding is hard, because of the open seas. It will always be slow, unless someone comes up with a complete novel idea how to solve it.

@TrueBrain TrueBrain closed this Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate: probably not This Pull Request will most likely be closed soon component: pathfinder This issue is related to Pathfinder size: small This Pull Request is small, and should be relative easy to process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants