[freeciv-ai] Re: More on AI Diplomacy v8 (PR#2413)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Quoting "Per I. Mathisen" <per@xxxxxxxxxxx>:
> Here are a few problem areas that maybe someone would like to comment on
> 1. The dist_to_empire() function is very crude. A better algorithm here
> would be much appreciated. In short, it calculates the average distance
> from your capital to all the other player's cities.
I would suggest minimum distance between any of our cities to any of their
cities. This can be done via new PF + a function.
> 2. Maybe pplayer_allied_with_enemy() and pplayer_war_with_ally() and
> pplayer_is_allied_with_ally should be calculated in aidata.c, then read
> from an aidata variable, to avoid too many calls to these functions.
count the calls.
> 3. mistrust_to_gold() is awful. A better algorithm is much desired.
Nae bother, gov. And the inverse of this algorithm should be used for
converting gifts into trust adjustment.
> 4. ai_goldequiv_city() may not be good enough. At least it should do more
> checks, like ensuring that we get enough defensive troops in the city to
> defend it for one turn. On the other hand, we only accept cities from
> players we are in peace with.
> 5. We don't suggest trading techs with players we are not allied with.
> This should be implement at some point, but not necessarily before cvs
> 6. Should AIs that are almost completely destroyed surrender? That would
> save players some unnecessary time wiping up the last remnants of an AI
> enemy that has no chance in hell of putting up some amusing resistance.
> Human players usually quit when they know they have lost, I think.
Yes, please, that would make it so much more fun!! This is the most boring of
all phases, finishing off half dead players with tiny cities on remote islands.
> 7. A target_players_iterate(pplayer, aplayer) iterator which skips dead
> players and also pplayer would be very useful in simplifying code. Should
> beparate patch, though.
Oh yes, I thought about it when I first saw your code and it occured to me that
so many iterators throughout the code do something with dead players regardless.
> 8. Someone should playtest the spacerace part of the code. It has received
> very little playtesting by me.
> 9. We don't consider going to war against NO_CONTACT players. This may be
> a very bad idea, I am not sure. The reason is that I suppose that
> NO_CONTACT players are further away and we won't be able to reach them. On
> the other hand, they might be the ultimate enemy that we want to gang up
> 10. We do not check if peaceful expansion is superior to war. We should,
> ideally, check if our rate of growth is faster than that of our chosen
> target. However, this is in practice rather hard to do, especially since
> our allies may be opting for war (where's the Security Council when you
> need it?).
This is a hard question, but very much worth thinking about.