HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Bug #854301
closedAI stops looking too close to its cities when considering want for Migration_Pct effect
0%
Description
When considering EFT_MIGRATION_PCT
, dai_effect_value()
looks for cities near its own which are candidates for inbound migration as follows:
iterate_outward(city_tile(pcity), game.server.mgr_distance + 1, ptile) { /* ...look for other players' cities... */ } iterate_outward_end;
However, it should take into account pcity
's city radius; see check_city_migrations_player()
.
I think the only supplied ruleset this affects is 'experimental', which has Migration_Pct effects on governments; the AI will fail to take these into account when thinking about the relative values of governments (dai_gov_value()
, adv_best_government()
). I don't know exactly what this will affect.
The AI want was added with the Migration_Pct effect in Jul 2009, gna bug #13637, r15795 / commit 734691be95.
mgr_distance
was later changed to be relative to the city radius in Mar 2010, gna patch #1232, r17164 / commit f58f12792a; but the AI was not updated.
(I don't have a patch in progress for this ticket; feel free to take it.)
Files
Related issues
Updated by Marko Lindqvist over 3 years ago
By 'inbound migration' you mean that pcity is the migration destination? From mgr_distance documentation ('/explain mgr_distance') it seems that it's source city's radius which counts:
"...for a suitable migration destination when deciding which city to migrate to. The value is added to the current city radius..."
Updated by Jacob Nevins over 3 years ago
By 'inbound migration' you mean that pcity is the migration destination?
Yes.
The documentation is a bit misleading -- it is the destination which counts.
I actually ended up down this rabbit hole by following up this complaint about the docs: http://forum.freeciv.org/f/viewtopic.php?f=9&t=91051&p=100459 -- I have a patch in progress for that too.
Updated by Jacob Nevins over 3 years ago
- Related to Bug #854305: mgr_distance setting is misleading about which city it applies to added
Updated by Jacob Nevins over 3 years ago
Looking at modpack server, for variant2 this might affect wonder Eiffel Tower (alliance-ranged) as well as Republic/Democracy govs.
Updated by Marko Lindqvist over 3 years ago
- File 0037-AI-Check-migration-from-cities-full-migration-distan.patch 0037-AI-Check-migration-from-cities-full-migration-distan.patch added
- File 0022-AI-Check-migration-from-cities-full-migration-distan.patch 0022-AI-Check-migration-from-cities-full-migration-distan.patch added
- Status changed from New to Resolved
- Sprint/Milestone set to 2.6.2
Updated by Marko Lindqvist over 3 years ago
- Status changed from Resolved to Closed
- Assignee set to Marko Lindqvist