Summary: Fix autosettler to use rail connectivity bonus when
planning for railroads
Submitted by: None
Submitted on: Wed 10 Aug 2011 04:28:51 AM UTC
Priority: 5 - Normal
Assigned to: None
Discussion Lock: Any
When thinking about building a road, autosettlers also consider building the
road for the sole purpose of later building a railroad. Both road and rail
building are subject to a connectivity bonus, so that autosettlers prefers to
build roads/rail on tiles that help connect the nation even when the
(rail)road otherwise has no benefit (e.g. to trade).
The code presently uses the road connectivity bonus (which favors building
regular roads on certain tiles adjacent to other regular roads) even when
building the road strictly as a prerequisite for building a railroad. It
seems more appropriate, however, to use the rail connectivity bonus (which is
similar, but for railroads) in this situation.
This patch changes the code to use the rail connectivity bonus in this
situation and also cleans up the code a bit to remove a confusing (and
incorrectly named) duplicated variable.
TODO: The road/rail connectivity bonus computations need to be revisited.
Their logic is difficult to follow and seems a bit buggy, plus the bonus may
not be enough (autosettlers will mine hills for ages before putting much
effort into roads, which can be much more useful to an early nation).
Regardless, this patch will pave the way for more precise future adjustments.
Date: Wed 10 Aug 2011 04:28:51 AM UTC Name:
fix-autosettler-road-to-rail-extra.patch Size: 2kB By: None
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list