Everybody complains about how dumb the automate settler feature is, but nobody does anything about it. What should the automated settlers or engineers be doing? Or, for that matter, what should a manually controlled settler or engineer be doing? Here is a quick algorithm I threw together. Feel free to add, subtract, rearrange, or argue about it. This algorithm assumes a single production game against the AI. Are there any patches, or could a patch be written, that would implement an improved settler/engineer algorithm?
IF(number of cities <= riot factor) THEN (found new city)
ELSE IF(any city unconnected by road) THEN (connect to nearest city)
ELSE IF(railroad tech AND any city unconnected by rail) THEN (connect by rail to nearest city)
ELSE IF(construction tech AND at war with any civ) THEN (build one fortress on best defensive terrain within city radius for any city with four or more military units within city radius OR two fortresses on best defensive terrain within city radius for any city with six or more military units within city radius)
ELSE IF(any currently worked square that could generate trade does not have a road) THEN (road specials, grass, plains squares in that order)
ELSE IF(city surplus food <= 2) THEN (irrigate specials, grass, plains in that order)
ELSE IF(city surplus food <= 2) THEN (cut down forest)
ELSE IF(pollution icons = 0 AND any production special (eg coal, peat) or hill does not have a mine) THEN (mine special, hill in that order)
ELSE IF(railroad tech AND pollution icons <= 0 AND any special, hill, or forest does not have a railroad) THEN (railroad special, hill, forest in that order)
ELSE IF(pollution icons > 0) THEN (clean up pollution)
ELSE IF(number of improved squares = city population) THEN (road one additional trade-generating square per city, specials, grassland, plains in that order)
ELSE IF(number of improved squares = city population) THEN (railroad or mine one additional production square per city, specials, hills, forests in that order)
ELSE IF(explosives tech AND city surplus food <= 2) THEN (transform swamp to grassland, plains to grassland, hills to plains, in that order)
ELSE IF(explosives tech AND pollution icons = 0) THEN(transform jungles to forest, mountains to hills)
ELSE IF(any city < size 10) THEN(add to city)
ELSE (go to nearest city, have a beer
, sleep)
------------------
"I fear that I shall die a Prince."
-Edward VII, Prince of Wales
[This message has been edited by Adam Smith (edited March 22, 2000).]