Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2003:
[freeciv-ai] New settler code v7
Home

[freeciv-ai] New settler code v7

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] New settler code v7
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 7 May 2003 19:26:51 +0000 (GMT)

CHANGES
 - In 'easy' don't use omniscience. If our explorer dies, we're basically
   screwed and won't expand. (TODO: Make 'build explorer' code.)
 - Citymap now recreated for each AI and is no longer shared. The 'reserve
   additional tile' code vanished, but the AI didn't seem to take any
   notice. At least I couldn't measure it.
 - Citymap largely rewritten. Importantly, we now also 'crowd' future
   city spots.
 - Some bugs nixed. Probably some changes I've forgotten.

Quick word on omniscience: Yes, I have tested it with map_get_known(). The
results were not as horrible as I had expected. In about half the cases,
the AI stumbled and fell horribly, yes. But in the other half, it
succeeded admirably, as its explorers quickly covered the starting island.
Though, the biggest hurdle is the exploration of new islands, and that was
not even attempted. Note that this code cheats no more than the old code.

I think it is ready to go in. There a lot of stuff that can be improved, I
am sure, but it is better to do this as we proceed with ferry support. The
addition of ferries will no doubt expose a lot of necessary redesign. So
unless there are problems with the design itself, I don't want to spend
more time now optimizing it.

(Before it replaces the current settler code completely, it needs ferry
support and respect the 'easy' expansion parameter.)

Now time for some numbers:

Notes: 'workers' means total size of all cities. Settlers not counted.
Researchcost was set to 40. No huts or barbs allowed.

TIME TO REPUBLIC (& PRODUCTION IN TURN 40)

Quick view:  1  2  3  4  5
HARD        66 72 82 55 66 turns
EXP         51 47 56 49 46 turns

* 1 *
HARD
1: Turn 40: (cities 10, workers 13, sh26 f44 t15)
1: Endyear: -850 (turn 66, cities 21, workers 31, sh57 f100 t26)
EXP
1: Turn 40: (cities 10, workers 15, sh24 f50 t18)
1: Endyear: -1450 (turn 51, cities 15, workers 23, sh37 f76 t23)

* 2 *
HARD
1: Turn 40: (cities 10, workers 13, sh28 f43 t11)
1: Endyear: -700 (turn 72, cities 27, workers 41, sh80 f131 t23)
EXP
1: Turn 40: (cities 11, workers 11, sh29 f41 t19)
1: Endyear: -1650 (turn 47, cities 16, workers 21, sh48 f65 t23)

* 3 *
HARD
1: Turn 40: (cities 9, workers 12, sh25 f40 t13)
1: Endyear: -450 (turn 82, cities 35, workers 53, sh90 f174 t33)
EXP
1: Turn 40: (cities 10, workers 14, sh29 f46 t13)
1: Endyear: -1200 (turn 56, cities 18, workers 27, sh50 f87 t20)

* 4 *
HARD
1: Turn 40: (cities 11, workers 15, sh31 f51 t15)
1: Endyear: -1250 (turn 55, cities 18, workers 23, sh51 f81 t21)
EXP
1: Turn 40: (cities 11, workers 16, sh29 f55 t19)
1: Endyear: -1550 (turn 49, cities 15, workers 21, sh45 f70 t24)

* 5 *
HARD
1: Turn 40: (cities 9, workers 14, sh27 f42 t16)
1: Endyear: -850 (turn 66, cities 22, workers 29, sh58 f100 t23)
EXP
1: Turn 40: (cities 11, workers 16, sh26 f52 t20)
1: Endyear: -1700 (turn 46, cities 11, workers 14, sh26 f48 t22)

  - Per

Attachment: newsettler7.diff
Description: Text document

Attachment: citymap.h
Description: Text document

Attachment: citymap.c
Description: Text document

Attachment: aisettler.h
Description: Text document

Attachment: aisettler.c
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]