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

Settling Suggestion Improvements #12781

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

itanasi
Copy link
Contributor

@itanasi itanasi commented Jan 10, 2025

Bring up floor for Settle Suggestions, and increase radius to a fixed 5 tiles for Player UI icons only
Add distance from Settler penalty to help keep suggestions closer and more stable (suggestion won't jump away as Settler approaches as often)
Human Suggestions do not take into account unseen resources

@EmperorPinguin
Copy link
Contributor

#12772 should hide unseen resources for both human and AI.

@EmperorPinguin
Copy link
Contributor

EmperorPinguin commented Jan 10, 2025

I strongly advice against raising the treshold for minimum acceptable tiles. While we do want to filter out the worst tiles, it can happen our starting continent is all bare tundra. We don't want to go OCC; it's better to found bad cities. than to found no cities at all.

@EmperorPinguin
Copy link
Contributor

EmperorPinguin commented Jan 10, 2025

If I understand correctly, this distance penalty is based on the distance to the settler, so it will move along with the settler, and not actually do anything besides making the suggested city locations jump around more?

@itanasi itanasi marked this pull request as draft January 10, 2025 07:42
@itanasi
Copy link
Contributor Author

itanasi commented Jan 10, 2025

OK, reverted the threshold and removed conflicts with #12772
So the main 2 changes then are the Player Settle Suggestions in the UI will always be a 5 tile radius (instead of shrinking further from cities), and adding the % penalty further from the Settler.
The % Penalty should keep the suggestions more stable across the board for both the suggestion icon in the UI and for AI automation.

@itanasi itanasi marked this pull request as ready for review January 10, 2025 16:51
@EmperorPinguin
Copy link
Contributor

EmperorPinguin commented Jan 10, 2025

OK, reverted the threshold and removed conflicts with #12772 So the main 2 changes then are the Player Settle Suggestions in the UI will always be a 5 tile radius (instead of shrinking further from cities), and adding the % penalty further from the Settler. The % Penalty should keep the suggestions more stable across the board for both the suggestion icon in the UI and for AI automation.

Increasing the range to a set 5 tiles for human is unquestionably good, but are you sure the distance to settler penalty doesn't move along with the settler? Maybe I'm misunderstanding, but I read it as distance to settler that will be calculated anew when the settler moves to a new tile, which makes that the AI will value the same tile differently than it did the previous turn, which could lead to the AI moving the settler back and forth (or in circles) between the same tiles.

@itanasi
Copy link
Contributor Author

itanasi commented Jan 10, 2025

The penalty is any distance from the Settler.

If there is a tile that's better than the one you're currently on, moving towards it will remove the penalty. Therefore you will arrive at a local maxima.

Example:
Stand on Tile A, score 70.
Next tile over, Tile B, base score 73, after penalty, 73*.97=70.81
Tile B is better! Move to Tile B.
Now, standing on Tile B. Score 73.
Tile A is now 70*.97=67.9. Worse than B! Stay on B!

@EmperorPinguin
Copy link
Contributor

EmperorPinguin commented Jan 11, 2025

It should indeed converge into a local maximum. There's a bit of a risk the AI will settle "too early", but that's desireable over settling "too late" I think. Have you tested if they can now handle a constant search radius (5 tiles)? If such doesn't lead to wandering off, it'll probably improve the quality of settles a bit.

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

Successfully merging this pull request may close these issues.

2 participants