[freeciv-ai] Re: A TODO list for AI
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Apr 14, 2004 at 04:38:43PM -0500, Mike Kaufman wrote:
> > A partial answer would be to fix the problem the CM has with thinking
> > that a city of size 2 can be in rapture. A patch to do that is
> > attached. Hard-coding '3' is bad, but I'm not sure how better to fix
> > this. Add a function in city.[ch] ?
> well, where is the rapture city size requirement originally defined? If it's
> hardcoded which I suspect, then it should at least be defined-via-ruleset.
Hmm... brainfart on my part. I still don't like copying logic out of
city.c but here's how to get the hardcoded '3' out of there. New patch
> Second, is the happy variable in CM supposed to be a synonym for rapture?
> I suspect not.
It certainly appears to be: you get the celebrating bonus (or fulfill
the requirement) based on result->happy.
At the moment, result->happy is "is >= half the population happy, and 0
of the population unhappy/angry?"
I propose that it should be "would I be in rapture if I kept the current
result indefinitely, ignoring city size changes?"
The two definitions differ in that the former says that a city of size 2
can have result->happy with the current definition, but not with mine.
You can see from the patch that the two are otherwise similar.
I argue this is appropriate because if you're happy but you won't
actually enter rapture, the extra happy guys aren't helping you.
Ideally we should remove the "ignoring city size changes" thing but that
starts getting complicated.
Description: Text document