URL:
<http://gna.org/patch/?2885>
Summary: Fix autosettler to use rail connectivity bonus when
planning for railroads
Project: Freeciv
Submitted by: None
Submitted on: Wed 10 Aug 2011 04:28:51 AM UTC
Category: ai
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release:
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 10 Aug 2011 04:28:51 AM UTC Name:
fix-autosettler-road-to-rail-extra.patch Size: 2kB By: None
<http://gna.org/patch/download.php?file_id=13818>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?2885>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev