Thread Tools
Old March 22, 2000, 11:59   #1
Adam Smith
Apolytoners Hall of Fame
King
 
Adam Smith's Avatar
 
Local Time: 19:32
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Maryland, USA
Posts: 1,631
What Should Settlers and Engineers Do?
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).]
Adam Smith is offline  
Old March 22, 2000, 12:40   #2
DaveV
Apolytoners Hall of Fame
King
 
DaveV's Avatar
 
Local Time: 19:32
Local Date: October 30, 2010
Join Date: Dec 1969
Location: USA - EDT (GMT-5)
Posts: 2,051
Or, the ICS version:

IF (on potential city site) THEN (build new city)
ELSE IF (plain, shield grass, or trade special) THEN (build road)
ELSE IF (road would connect unconnected cities) THEN (build road)
ELSE IF (city site exists on current continent) THEN (move toward "best & closest" city site)
ELSE IF (bridge building discovered and one or more rivers on current continent has no road) THEN (build road on nearest river)
ELSE IF (one or more hills on current continent is not mined) THEN (mine nearest unmined hill)
ELSE (board ferry for next continent)

Determining city sites is a good bit of the work, but is left as an exercise for the reader.

One quibble with AS's "perfectionist" settler - can't you only "add to city" up to size 8?

DaveV is offline  
Old March 22, 2000, 15:31   #3
tobyr
Prince
 
Local Time: 23:32
Local Date: October 30, 2010
Join Date: Oct 1999
Location: Princeton, NJ USA
Posts: 312
This is fascinating to me, partly because my handling of settlers/engineers is so different. But I'm not a very experinced player yet.

IF(pollution icons > 0) THEN (clean up pollution)
ELSE
IF (in a city) AND (number of improved squares unworked by cits, not occupied by a foreign enemy) > 1 AND (there are no special squares to improve trade by adding a road) AND (there are no squares yielding two shields or more to improve by adding a railroad) THEN (stop automating, let me decide whether the unit should leave the city)
ELSE IF (not in a city and just added a road or railroad to connect to a nearby city, keep doing this)
ELSE IF(city surplus food <= 2) THEN (irrigate specials, grass, plains in that order, but do not irrigate squares that can usefully be mined)
ELSE (ask me for a manual command)

I consider most of the things adam smith wants to automate too difficult to decide, to entrust to an automated unit. I do not want a unit to build roads that would facailitate attacking me, or transform terrain without some careful thought.

Please note that I'm used to playing the fantasy game, where there is much wider variation in types of terrains and (I think) in good ways to handle them.

- toby



------------------
toby robison
criticalpaths@mindspring.com
tobyr is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 19:32.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team