[freeciv-ai] coreai: assess_danger()
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This is big one.
- Much rewriting. Almost every line of code touched in some way, since I
unnested several ifs by reversing their condition and doing a continue; on
the loop instead. Much, much cleaner.
- Fixed case where less dangerous situation would result in lower want
for city walls than a slightly more dangerous situation (danger > defense,
for high values of each, would give less want than the default want in
danger situation). Now gives AI slightly more wall want in some cases.
- Wrapped up the convoluted military building want algorithms into a more
consise form, and put it into a separate function. Use the more
sophisticated wall algorithm also for coastal, sam and sdi.
- Did not follow Ross' code all the way in giving all cities a default
danger. This I think is fundamentally wrong, and I will change this later
to use the cached information created by ai_eval_* to only give cities
situated dangerously geographically default danger.
- Left the "will this enemy city complete a dangerous unit next turn"
cheesiness in the code. I wanted to remove it but had second thoughts.
Description: Text document
|[Prev in Thread]
||[Next in Thread]|
- [freeciv-ai] coreai: assess_danger(),
Per I. Mathisen <=