bugFreeciv - Bugs: bug #24175, AIs inappropriately set tax to...

 
 
Show feedback again

bug #24175: AIs inappropriately set tax to 100% gold, stopping science (civ2civ3 ruleset)

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Mon Dec 14 01:09:59 2015  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: S2_6 r30966Operating System: GNU/Linux
Planned Release: 2.6.0, 3.0.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat Apr 2 09:13:35 2016, comment #15:

Note that the biggest change to the AI code in S2_6 compared to S2_5 is that 'effect evaluation' has been generalized to be used for wants other than building want (AI values also tech by the effects they provide directly, and government wants are also calculated a bit different way compared to old versions)

This things are certainly going to need some balancing before 2.6.0 is ready.

Marko Lindqvist <cazfi>
Project Administrator
Wed Mar 16 23:22:16 2016, comment #14:

...and S2_5 AI builds such buildings in both rulesets.
I think this not obviously related to civ2civ3 => bug #24526.

Jacob Nevins <jtn>
Project Administrator
Wed Mar 16 00:40:56 2016, comment #13:

> But please, check if AIs are building marketplaces in your games.

At no point in any of the three civ2civ3 autogames here (even the one with gold_upkeep_style=City) do I have a turn-end savegame where the AI was building Marketplace, Harbour, or Library. (I have savegames from every turn.)
(I haven't checked whether a player somehow nevertheless ended up with one of these buildings in a city, perhaps by changing production mid-turn, as that's fiddlier to grep for. It seems unlikely.)

...that also seems to be true of my old classic-ruleset autogame from December, though; apparently it's not civ2civ3-specific.

Jacob Nevins <jtn>
Project Administrator
Tue Mar 15 08:15:43 2016, comment #12:

>AI was not really coping with having gold upkeep for units at all

I agree. But please, check if AIs are building marketplaces in your games. I think there is an important issue there.

David Fernandez <bardo>
Mon Mar 14 20:45:42 2016, comment #11:

In comment #6 I wrote:

> My random guess is that it's to do with gold_upkeep_style,
> which is set differently in civ2civ3 than classic.
>
> ISTR starting to look through the AI code and finding something
> which supported this guess, but I got distracted and now can't
> remember what it was.

Actually, on reflection, I think I didn't find any evidence for gold_upkeep_style being the problem (although it appears to be contributing); rather, I think I concluded that the AI was not really coping with having gold upkeep for units at all. AIs that for whatever reason had found their way to a non-gold-upkeep government like Communism had got much further in the tech tree.

Jacob Nevins <jtn>
Project Administrator
Mon Mar 14 20:43:33 2016, comment #10:

> The obvious thing to do is to re-run the latter test but with the ruleset unmodified.


Done, attached. Research state:

Gunpowder
Gunpowder
Monarchy
Gunpowder
Gunpowder
Gunpowder
Gunpowder
Rocketry
Monotheism
Bridge Building
Metallurgy
Radio
Monarchy

(file #26992)

Jacob Nevins <jtn>
Project Administrator
Mon Mar 14 06:45:59 2016, comment #9:

I have tested some more AI games with classic and civ2civ3 rules (S2_6) and AIs have never built a marketplace, library or harbour.
I think there is some problem in the code that decides if those buildings are worth to build.

David Fernandez <bardo>
Mon Mar 14 00:47:16 2016, comment #8:

I think it might have helped? Not an entirely scientific test though, since I used different svn versions:

AI research at T5000 in the original savegame I attached (from S2_6 r30966):

Iron Working
Trade
University
Gunpowder
Invention
Gunpowder
The Republic
Construction
Feudalism
Medicine
Electricity
University
Ceremonial Burial

The savegame I've just attached (from newer S2_6 r32239, with gold_upkeep_style="City"):

Advanced Flight
Electricity
Feudalism
Navigation
Democracy
Democracy
Miniaturization
Feudalism
Refrigeration
Navigation
Miniaturization
Metallurgy
The Corporation
Navigation

I think some of this lot were stuck on their current research for a long time (thousands of turns), but I haven't analysed the savegames further.

The obvious thing to do is to re-run the latter test but with the ruleset unmodified.

(file #26986)

Jacob Nevins <jtn>
Project Administrator
Sun Mar 13 16:39:59 2016, comment #7:

I've just started a S2_6 autogame with civ2civ3 gold_upkeep_style changed back to "City" to test my hypothesis.

Jacob Nevins <jtn>
Project Administrator
Sun Mar 13 16:21:34 2016, comment #6:

My random guess is that it's to do with gold_upkeep_style, which is set differently in civ2civ3 than classic.

ISTR starting to look through the AI code and finding something which supported this guess, but I got distracted and now can't remember what it was.

Jacob Nevins <jtn>
Project Administrator
Sun Mar 13 05:57:18 2016, comment #5:

However, I have found other problems that could make it worse in 2.6 than previous versions. While playing civ2civ3, the AI in v2.6 seems unable to develop their cities properly, or to finish the tech tree, even when at peace.

1) For some reason, I have never seen the AI building a marketplace, a library, or a Harbour in my testing games.
I see many AI cities stuck building "coinage", when they could (and should) be building markets instead.

Again, I have not checked the code, but could it be that those cities have decided that they should build caravans to create trade routes, and since they are not allowed in civ2civ3, they fall back to coinage?

2) AI likes Tribal gobernment too much, maybe due to my latest change (bonus to veterancy), and this is not a good way to make money or science.

David Fernandez <bardo>
Sun Mar 13 05:38:53 2016, comment #4:

I think it is related to bug #21640.

Unless the code was changed since then, the AI was designed to maximize gold tax rate when the state is "onwarfooting". Since "Hard" AI level allow them to set it to 100%, they stop science research while attacking.

I'm not sure why this is not a problem with default rules, but I suppose the AI is less prone to enter "onwarfooting" state with those rules.

My guess why it is worse in civ2civ3 is:
-default number of AIs is 12 instead of 5, so there are more wars.
-default map is continental, so it is easier to start an attack.
-it is easier to defend (harder to conquest a city), and harder to move in enemy territory, so attacks require much more time.
-there are several governments without Senate that AI likes to use, while many AIs in classic ruleset can not start a war due to Republic/Democracy limitation.

It is just a guess, because I still do not know how to get AI code info/logs while running a game, sorry.

David Fernandez <bardo>
Thu Mar 10 10:50:23 2016, comment #3:

I was going to play my first game with S2_6 and I noticed the same problem about AI stuck with 100% gold.
I'll keep testing to see if I can find why it is more problematic in civ2civ3 than other rulesets.

However, I remember that everytime that I tested civ2civ3 in a new freeciv version, they appeared similar AI issues (AI unable to end the tech tree), that forced me to adjust the rules, mainly those related to upkeep costs and government effects.

I'll check your savegame to see what government is used by each AI.

David Fernandez <bardo>
Mon Dec 14 20:48:05 2015, comment #2:

In an autogame with classic ruleset and the same code, Hard AIs have had no trouble maintaining science output and reaching the end of the tech tree. So it's something about civ2civ3.

Jacob Nevins <jtn>
Project Administrator
Mon Dec 14 01:13:42 2015, comment #1:

Some of these AIs really don't need the money. Caesar has 26718 gold; Mauricius I, 47164; and so on. (Some probably do; the Danes have only 86 gold.)

Jacob Nevins <jtn>
Project Administrator
Mon Dec 14 01:09:59 2015, original submission:

Just ran a S2_6 autogame to T5000 with no definite conclusion.

All AIs have stopped research, and many have not yet achieved Gunpowder. Looks like science was only an occasional pursuit after around T150.

(There are probably other problems, since no AI has been eliminated in 5000 turns, even though there is a noticeable disparity in technology.)

Attached savegame from final turn. I still have all the others, for now.

I haven't run on S2_5, or with classic ruleset, to compare behaviour.

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #26992:  autogame-T5000-Y06575-auto.sav.bz2 added by jtn (126kB - application/x-bzip - S2_6 r32239 with unmodified civ2civ3 ruleset: autogame final save)
file #26986:  autogame-T5000-Y06575-auto.sav.bz2 added by jtn (128kB - application/x-bzip - S2_6 r32239 civ2civ3 with gold_upkeep_style="City": autogame final save)
file #25988:  autogame-T5000-Y06575-auto.sav.bz2 added by jtn (136kB - application/x-bzip - good grief)
file #25989:  autogame.serv added by jtn (247B - application/octet-stream - good grief)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by bardo (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Mar 14 20:43:33 2016jtnAttached File-=>Added autogame-T5000-Y06575-auto.sav.bz2, #26992
    Mon Mar 14 00:47:15 2016jtnAttached File-=>Added autogame-T5000-Y06575-auto.sav.bz2, #26986
    Mon Dec 14 01:09:59 2015jtnAttached File-=>Added autogame-T5000-Y06575-auto.sav.bz2, #25988
      Attached File-=>Added autogame.serv, #25989
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup