待辦事項 #47776

AI still goes crazy with caravan

啟用日期: 2023-04-06 21:37 最後更新: 2023-04-18 04:39

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
4

細節

The patch from #42169 did not completely solve this issue.

Testing civ2civ3, I still see games where the AI start to build caravans or freights in most of their cities until there are hundreds of these units. When I modify the ruleset to limit the number of caravans per city, it appears the same problem, but this time with workers/engineers. I have seen AIs with 20 cities and 400 engineers still building more of them.

If useful, I can upload a savegame where most cities are building freights. If the ruleset is modified to forbid caravans/freights, and the same game is loaded, all those cities change the production to engineers. It looks like some kind of fallback, not something that the AI really desires.

Ticket History (3/18 Histories)

2023-04-06 21:37 Updated by: bard
  • New Ticket "AI still goes crazy with caravan" created
2023-04-06 21:40 Updated by: cazfi
評語

Reply To bard

If useful, I can upload a savegame where most cities are building freights.

Yes please, attach one here.

2023-04-07 13:36 Updated by: bard
評語

Once applied the patch from #42169, I have not been able to recreate this issue with default or classic rules. But it still happens often with my heavily modded version of civ2civ3. It might be related to the use (and maybe abuse) of "Traderoute" range effect.

I upload the modpack and a savegame where most nations have hundreds of freights. The player faction is building freights in half of their cities when it already have more than 100 freights, and only 2 remaining trade routes available.

If I edit the ruleset to limit the use of caravans/freights, all those cities change the production to engineers, and their number end being problematic too.

EDITED: I forgot to say I tested v3.0.6 + patch #42169

(Edited, 2023-04-07 13:41 Updated by: bard)
2023-04-08 01:34 Updated by: alain_bkr
評語

Which AI level is it ? I suspect this is linked with the problem.

I bet on cheating or experimental :-)

2023-04-09 23:35 Updated by: cazfi
評語

Reply To bard

If useful, I can upload a savegame where most cities are building freights. If the ruleset is modified to forbid caravans/freights, and the same game is loaded, all those cities change the production to engineers. It looks like some kind of fallback, not something that the AI really desires.

The Engineers are likely fallback when there's no longer Freights available to build. With Freights available, it wants them, though very weakly (0.1). I get lot of: "Freight, want 0.100000 as trade route (2)" as final build target.

So, maybe the right question is; "What it should be wanting more (than 0.1)?"

2023-04-10 00:52 Updated by: cazfi
評語

Reply To cazfi

So, maybe the right question is; "What it should be wanting more (than 0.1)?"

Quite often military units are not the answer due to additional gold upkeep and/or the fact that there would be no target for attackers. (not sure if these are separate, or only happening together; that one should not blow military budget for no reason)

2023-04-10 01:45 Updated by: cazfi
  • 里程碑 Update from (無) to 3.0.8 (closed)
  • 元件 Update from (無) to AI
評語

I think I found where below-one coinage want gets ignored. I guess this ticket is now about that bug, and further things to later tickets.

2023-04-10 02:33 Updated by: cazfi
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
2023-04-10 21:55 Updated by: bard
評語

Reply To alain_bkr

Which AI level is it ? I suspect this is linked with the problem. I bet on cheating or experimental :-)

Yep, I uploaded a savegame where all AIs are allied, with no wars, and cheating bonuses, that I also think makes it easier to recreate the issue.

Reply To cazfi

Reply To cazfi

So, maybe the right question is; "What it should be wanting more (than 0.1)?"

Quite often military units are not the answer due to additional gold upkeep and/or the fact that there would be no target for attackers. (not sure if these are separate, or only happening together; that one should not blow military budget for no reason)

In 3.0 I have noticed a nice improvement in the capability of the AI to build city improvements, to keep taxes for science higher than gold, and to avoid bankruptcy due to military upkeep. I have seen AIs capable to develop their cities and finish the tech tree even while being at a war. But for some reason, my games against the AI in 3.0 are less challenging than those with 2.6.

I'd say the AI is less agressive against the human player at the start of the game, while they use resources to develop their cities and research techs, but when some AI is finally able to create a powerful empire with high production, high income, and even future techs, it looks like they do not know what to do then: they do not use to build the space ship (even when I have tried to edit the ruleset to reduce the requirements), and they do not seem to build offensive units to try to conquer enemy cities.

I guess it might be a problem of my custom civ2civ3 rules more than the AI itself, but now that I finally see some AIs rising a powerful civilization, it is sad to see them stuck with most cities building uneeded units, or coinage, and huge resources spent to build future techs. I'm not sure how to edit the ruleset to encourage the AI to try to win the game by conquest or space victory.

2023-04-10 22:07 Updated by: bard
評語

Reply To cazfi

I think I found where below-one coinage want gets ignored. I guess this ticket is now about that bug, and further things to later tickets.

Great, I'll test it. If the AI builds coinage rather than unneeded units I think it would be an improvement.

However, a human player never builds coinage, I think when the AI uses it, it is a symptom of resources being wasted, but as you say, that is for later tickets.

2023-04-10 23:47 Updated by: alain_bkr
評語

wrt caravans and AI behavior : I played a game where one of the AI had many caravans, (50 or 100) after having set up traderoutes. They stayed without moving for a few dozen turns, and suddenly AI call them back home when changing its govt to fundamentalism, and make war to me :-). In less than ten turns they had disappeared.

Also i did some test with AI alone , no human, no barbarians

set aifill=1
set  barbarians disabled
On 1k map, 1000 turns it is often very fast (sometimes very slow, i'll try to find out why/where). This is where i noticed that caravans are for high IQ AI ;-) I also noticed interesting things (like oscillations more tech , then less, then more ...), and terrain modification strategy with 2 hurds of ingeneers/workers in vertical line (north/south) starting from one side and going to the other side. AI has a sometimes a coherent strategy , even if it is not the best. it easier to see than to describe, i'll try to send some mapimg in a few days.

2023-04-11 14:19 Updated by: cazfi
評語

Reply To bard

Reply To cazfi

I think I found where below-one coinage want gets ignored. I guess this ticket is now about that bug, and further things to later tickets.

Great, I'll test it. If the AI builds coinage rather than unneeded units I think it would be an improvement.

Also, though the bug was found by debugging coinage behavior, it was more general rounding error that was found -> likely has an effect on other AI building choices.

2023-04-13 21:35 Updated by: bard
評語

Reply To cazfi

Also, though the bug was found by debugging coinage behavior, it was more general rounding error that was found -> likely has an effect on other AI building choices.

I confirm this patch fixes the issue about AI building too many caravans in my games.

I have tested some auto-games with 3.0.7 + these 2 "coinage" patches, and the AI finally seems to be able to play my custom ruleset, at least almost as well as default rules.

2023-04-18 04:39 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入