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

[freeciv-ai] Re: New settler code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: New settler code
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 11 Apr 2003 16:55:43 +0000 (GMT)

A new patch, and some (rather incoherent) notes.

PATCH CHANGES
  - We cache and gain massive increase in speed (thanks to Greg).
  - Corruption and waste of size 1 city deducted. This won't work well
with notradesize, though, since size 1 cities under this regime are mired
hopelessly in corruption. So we just ignore corruption if fulltradesize !=
1.
  - We deduce the build cost of a settler from want to create a want
threshold relative to build cost.
  - Settings are no longer hardcoded in aisettler.c, but are variables in
aidata.c, as requested by Raimar.

I've been running some tests on this code. The ai->perfection variable is
particularily important. Reducing this somewhat gives better results on
normal maps, but gives very much worse results on strange and unfortunate
starting positions. Here is a clear trade-off.

The ai->growth_potential_emphasis variable is also vital. Decrease this to
reduce the smallpoxiness of the AI. The result is prettier AI settlements,
but clear reduction in AI efficiency.

I've been running the patch with Thomas' endtech patch, and it usually
shows a significant improvement in a getting-to-republic-fast metric.
Noticed, however, that changing the priorities altered the results
massively.

TIME-TO-REPUBLIC:               1       2       3
Vanilla 'hard'                  -825    -675    -775
Vanilla 'experimental'          -750    -775    -1000
'experimental' + trade pri +10  -1450   -875    -1500
'experimental' + trade + perf 8 -1250   -1100   -1400

SHIELDS PRODUCTION 1500 BC (under republic):
Vanilla 'hard'                  40      47      27
Vanilla 'experimental'          23      54      38
'experimental' + trade pri +10  50      61      52
'experimental' + trade + perf 8 49      63      41

Perf is ai->perfection, which normally is 12. Trade pri is
ai->sience_priority, which normally is TRADE_WEIGHTING. Too much shouldn't
be read into those numbers. The results I get with different settings
depend greatly on the map. Being able to analyze a map and then set these
settings would be a great boon, but this is hard. I've chosen numbers for
the settings that work well under most conditions.

I suspect strongly (strengthened by above tests) that TRADE_WEIGHTING is
set way too low. So I changed ai->science_priority from TRADE_WEIGHTING to
TRADE_WEIGHTING + 10.

Please try it out.

  - Per

Attachment: citymap.h
Description: Text document

Attachment: citymap.c
Description: Text document

Attachment: aisettler.h
Description: Text document

Attachment: aisettler.c
Description: Text document

Attachment: newsettler4.diff.gz
Description: application/gunzip


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