[AI] Some tactical goals severely need amending

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Ignatus
Posts: 18
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

[AI] Some tactical goals severely need amending

Postby Ignatus » Sat Dec 23, 2017 1:26 pm

I played a pair of single games in Experimental and Classical rulesets to high turns, and have seen AIs' common pitiful faults which make the game uninteresting if you have survived enough to become a rich developed democracy, even with few military units.
1. Firstly, why they haven't yet attacked my badly defended island? Their AI_love to me was well below anything long ago. Once I have incited half of their cities one after the another and, after rapture growing them, won by culture without declaring war or being declared of war in the whole game; peace is good but such rascals as me should be punished. Since I have studied from the function dai_war_desire in ai/default/diplomacy.c, the AI is not at all afraid of being massively incited and, even worse, doesn't want another player's treasury which he gets with the cities. And his AI_love can't effectively go to the negative scale even if the player is allied with his enemies and practises unfriendly actions one after the another (maybe it's not so bad strategy, but this could be used for a simplest machine learning of the fact "this guy is our problem"). Also, the function still requires at least amendings in calculating coastal city defence against ships (the walls have bonus 3x, while the coastal defence has bonus 2x if at all present) and skipping non-military techs.
2. The AI starves his strategic cities with working great wonders! For sending a Rifleman in a boat to a suicidal mission! (Before I have chance to incite this city! :evil: ). This happens often while migration is on and high (thus cities near the capital fall down to size 1 aven with several wonders), but great number of AI-founded cities are starved anyhow. Maybe we should instruct the AI to dismount small unperspective cities on Colonists instead of just starving and to join them to cities with high bonuses (well, I haven't used this strategyon myself, but at least I don't let wonders so stupidly perish).

User avatar
dunnoob
Elite
Posts: 326
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: [AI] Some tactical goals severely need amending

Postby dunnoob » Fri Dec 29, 2017 2:57 am

Ignatus wrote:won by culture
Interesting, so far that didn't work for me, something in my ruleset must be wrong. You're talking about 2.6.0-beta1, or don't you?
Ignatus wrote:Since I have studied from the function dai_war_desire in ai/default/diplomacy.c
When I looked at that I did not grok it at all, and my conclusion was that the aggressive trait doesn't do anything for normal values, reported in HRM#692491 (My suggested patch to simplify the code won't fix the issue, and Cazfi anyway didn't like it.)
Ignatus wrote:AI_love can't effectively go to the negative scale even if the player is allied with his enemies and practises unfriendly actions one after the another
My enemies sometimes are genocidal, and I think that's the worst AI love state. Incidents have an effect on the AI attitude. However, former allies are stuck in armistice even if they are genocidal, and 15 turns is far too long when I started a space ship (I only do that if the game is boring and near my endturn=600 limit.)

IMO the AIs must be able to go to war if they are genocidal. Additionally 7.9 years (7 turns) is far too fast for a spaceship, 30 years (turns) for 25% of the speed of light could be better. Anyway, you can report AI oddities as bug. Admittedly I haven't done that (yet) for the genocidal vs. space ship case.
Ignatus wrote:The AI starves his strategic cities with working great wonders
Maybe tweak city_min_dist (IIRC I use 3 or whatever the minimum +1 is) and the migration chance: I use 66% domestic, else 22%, works for me, because I don't care if it also works for AIs :twisted: )

While at it, also not yet reported, I think city_min_dist should be city_min_dist_sq for a finer granularity with rectangular topologies (doesn't matter for hex), and the claimed terrain per city size could also profit from a finer radius_sq granularity (at the moment I have 2, that's too much, but 1 isn't enough to claim "my" island in time, unless the initial value is huge, as in classic.)

Ignatus
Posts: 18
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: [AI] Some tactical goals severely need amending

Postby Ignatus » Sat Dec 30, 2017 9:51 pm

dunnoob wrote:
Ignatus wrote:won by culture
Interesting, so far that didn't work for me, something in my ruleset must be wrong. You're talking about 2.6.0-beta1, or don't you?
Yes (the forescreen says beta1+). Culture victory is by default on in the Experimental ruleset.

dunnoob wrote:
Ignatus wrote:AI_love can't effectively go to the negative scale even if the player is allied with his enemies and practises unfriendly actions one after the another
My enemies sometimes are genocidal, and I think that's the worst AI love state. Incidents have an effect on the AI attitude. However, former allies are stuck in armistice even if they are genocidal, and 15 turns is far too long when I started a space ship (I only do that if the game is boring and near my endturn=600 limit.)
In one of the games I wrote about (sorry, have lost the savegames), the Koreans were never allies to my Sweden and were genocidal to me long before I have incited anything. The three remaining civilizations were in war with Koreans probably short since they first had met; two of them were my allies (well, even the third one remained in his last city until the gam ended). When I started my "peaceful" expansion, Koreans controlled most of the world, their capital was sized over 50. My 8 cities were all but one coastal, and there were very little units in them, and Koreans had Marines and loads of Cruisers. Any human player would destroy me in ten turns at maximum but the AI hesitated until the end.

dunnoob wrote:
Ignatus wrote:The AI starves his strategic cities with working great wonders
Maybe tweak city_min_dist (IIRC I use 3 or whatever the minimum +1 is) and the migration chance: I use 66% domestic, else 22%, works for me, because I don't care if it also works for AIs :twisted: )
[/quote]The cities with wonders just can't lose their last citizen by migration; the problem is, since I can see from loads of ruins in AI territories, common for any small cities. The AI shold be smart enough to disband a unit if the next turn the city will be lost due to inability to produce enough shields/gold and luxury to support the unit and food to support itself, and the unit disappears anyway.