Better economic AI (V. 0.5)

I don't know but with this modmod my game runs incredibly slow in multiplayer. Any idea what could be the reason?
 
No idea, I haven't tested it in multiplayer. Does every player have the mod?

You could try using a standard PythonCallbackdefines.xml to disable the stuff I did for civics/worker builds as those functions aren't used by base FFH2 and could be a possible reason.
 
Post a savegame and I can take a look at it. It guess though that it is nothing directly related to this mod
 
A series of saves from an immortal game, pangaea with no acheron.

Turn 100:



Turn 204 (I remembered to take a save at this point just as the turn 200 autosave got pruned):



Turn 250:



Posting the saves from past this point would be pointless as it's when my dwarven druid backed rampage across the continent started, starting with the biggest dogs in the yard.

Nice tech rate by the AI. I never did manage to overtake Beeri's pace until I started beating the . .. .. .. . out of him (not pictured in this series), and while his capital was solid it wasn't super awesome. I never felt as threatened by the AI's military in the early goings as I did in Skyre's mod or even standard FfH, though. Charadon did his thing and rushed me, but his offense was a constant trickle of puny stacks, not the ~15 turns of complete inaction followed by a huge overpowering army that I'm used to. The AI military picked up later in the game (aside from the fact that Beeri wasn't abusing blasting workshops like he should.)

I dig the Malakim AI's old school, BtS-style specialist economy. Never knew it could be that effective.
 

Attachments

  • Kandros Fir AD-0100.CivBeyondSwordSave
    172.1 KB · Views: 77
  • Kandros Fir AD-0204.CivBeyondSwordSave
    330.7 KB · Views: 123
  • Kandros Fir AD-0250.CivBeyondSwordSave
    387.6 KB · Views: 106
Thanks for the report Monkeyfinger and congrats on winning. The AI probably wasn't that much of a threat early on, because it had more economic buildings to build and therefore less troops. Would it make the game better in your opinion if I gave the Doviello and the Clan of Embers a techpath more focused on early aggression?

The Luchuirp AI in your game is strange. They apparently built their sculptor's studio only in very few select cities (and consequently did not build blasting workshops either). I have never seen this in my noble AI autoplay games. Needs some investigation. But their golems are crazily expensive and do not benefit from experience, so maybe the AI was just playing cleverly ;).

Anyway if you want a bigger challenge try the Allstars AI lineup:

Beeri Bawl of Luchuirp.
Varn Gosam of Malakim.
Kandros Fir of Khazad.
Perpentach of the Balseraphs.
Rhoanna of the Hippus.
Flauros of the Calabim.
Sheelba of the Clan of Embers.
Hannah the Irin of the Lanun.

Those are the AIs that seem to get handled best.
 
Would it make the game better in your opinion if I gave the Doviello and the Clan of Embers a techpath more focused on early aggression?

I don't know. Like I said, it was a tactical blunder that made Charadon so non threatening, not a strategic one. Fiddling with his tech path probably wouldn't change that.... and also, it might have been a fluke. Maybe he still is dangerous most of the time, and I simply got lucky.
 
One question:

It was brought up in my thread that the AI wasn't researching Cartography. The game in question was being played on a standard size map and most of the AIs weren't reaching the number of cities (6) required for the 'forced' Cartography beeline.

I've wondered about the beelines based on city numbers before. What map size were they designed for? They work great on huge maps, but there's a big difference in the number of cities you can fit in on smaller maps.
 
I did the beelines to cartography with standard maps or higher in mind due to the observation that the AI manages not to crash its economy on smaller maps and therefore doesn't need access to city states. However there probably is a more elegant way to code the beeline, by calculating potential foreign trade/ city upkeep.

As for it working with 3.19, given the bugs currently present in the 3.19 version I haven't updated yet, but if cvgameutils.py has the same structure the mod should work. You could give it a try and if you don't get python errors on startup it should be compatible.
 
As for it working with 3.19, given the bugs currently present in the 3.19 version I haven't updated yet, but if cvgameutils.py has the same structure the mod should work. You could give it a try and if you don't get python errors on startup it should be compatible.

I checked the dates on CvGameUtils.py and PythonCallBackDefines.xml as soon as I downloaded .41b, and neither had been updated. Since I'd really hate to go back to the default AI, I unzipped the files from post #1 and it's been working fine.
 
So I need some feedback for the soon to be released next version:

1) I think about removing the boni for the AI on noble difficulty and reducing them on the higher levels, most noticeably the upgrade bonus (currently the noble AI can upgrade units at 1/4th the cost and gets a discount on buildings). Would such a change be appreciated, or should all game parameters stay the same as in regular FFH?

2) I have written some code that lets the AI pursue the four towers of magic. However it somewhat slows down the performance of the game and the AI is still incapable of building all four due to not knowing how to use metamagic. So is this marginal improvement worth the performance hit?

3) I am thinking about modifying the leaderheads.xml file to give the AIs somewhat smarter personalities (like better unitbuildprobs/less flavorweights and smarter war/trade thresholds) but again this would modify the game and not be a strict AI improvement?
 
1) I think about removing the boni for the AI on noble difficulty and reducing them on the higher levels, most noticeably the upgrade bonus (currently the noble AI can upgrade units at 1/4th the cost and gets a discount on buildings). Would such a change be appreciated, or should all game parameters stay the same as in regular FFH?

Kill their noble bonuses and make those parameters scale with difficulty like so many others (so for instance AI unit upgrade cost would be 115% on warlord, 85% on prince, 70% on monarch, etc.) That's all you should do there.

2) I have written some code that lets the AI pursue the four towers of magic. However it somewhat slows down the performance of the game and the AI is still incapable of building all four due to not knowing how to use metamagic. So is this marginal improvement worth the performance hit?

Does it slow the game down all the time, even if the end result of the check is "don't bother with the towers"?

If yes, keep it on the shelf. A situational improvement that hurts all games = bad.

If no, let them go for towers if they have a lot of land + some vassals. In this case, also be sure to have em make their vassals fork over their mana as soon as the agreement is signed.

3) I am thinking about modifying the leaderheads.xml file to give the AIs somewhat smarter personalities (like better unitbuildprobs/less flavorweights and smarter war/trade thresholds) but again this would modify the game and not be a strict AI improvement?

Meh... this has its drawbacks and advantages and I can't decide which I care more about. I'll just refuse to touch this issue with a 50 foot pole.
 
So I need some feedback for the soon to be released next version:

1) I think about removing the boni for the AI on noble difficulty and reducing them on the higher levels, most noticeably the upgrade bonus (currently the noble AI can upgrade units at 1/4th the cost and gets a discount on buildings). Would such a change be appreciated, or should all game parameters stay the same as in regular FFH?
I think this is a good idea - as the AI learns to play the game better it should use more of the same rules as the human does.

Removing all boni at Noble is probably a little optimistic though! Start by raising upgrade cost to 60% of normal and decrease by 5% or 10% per difficulty level perhaps.

2) I have written some code that lets the AI pursue the four towers of magic. However it somewhat slows down the performance of the game and the AI is still incapable of building all four due to not knowing how to use metamagic. So is this marginal improvement worth the performance hit?

Not worth it. When its a working feature with a point, then possibly.

3) I am thinking about modifying the leaderheads.xml file to give the AIs somewhat smarter personalities (like better unitbuildprobs/less flavorweights and smarter war/trade thresholds) but again this would modify the game and not be a strict AI improvement?

I think this is a good idea as I'm getting a little tired of Rhoanna gobbling up all the minor Good civilizations who are being administered by incompetents.
 
So I need some feedback for the soon to be released next version:

1) I think about removing the boni for the AI on noble difficulty and reducing them on the higher levels, most noticeably the upgrade bonus (currently the noble AI can upgrade units at 1/4th the cost and gets a discount on buildings). Would such a change be appreciated, or should all game parameters stay the same as in regular FFH?

Go for it, if you think the AI changes you made make these bonuses redundant and something the AI can handle without. Technically the AI shouldn't have any bonuses as the only difference between different difficulty levels is how smart they act

2) I have written some code that lets the AI pursue the four towers of magic. However it somewhat slows down the performance of the game and the AI is still incapable of building all four due to not knowing how to use metamagic. So is this marginal improvement worth the performance hit?

You could make it an in game option, or have a separate version/component of the mod just to test it out.

3) I am thinking about modifying the leaderheads.xml file to give the AIs somewhat smarter personalities (like better unitbuildprobs/less flavorweights and smarter war/trade thresholds) but again this would modify the game and not be a strict AI improvement?

since it sounds like only one file is being modified, why not distribute this file separately?
 
Thanks for the feedback.
1)I will go ahead and remove the noble boni to even the playing field and make the upgrade costs more gradual for higher difficulties. The noble AI performs about as well scorewise without the boni as the current (0.5) noble AI although tech rate obviously gets hurt by the AI spending more money to upgrade its troops, but they still regularly manage to get most of the tier4 techs by turn 400.

2) The canbuild function, which I use for this gets called a lot under all circumstances, so I will probably remove the collect the manas for the towers of magic code. It wasn't working particularly well anyway.

3) It would be a separate file (I intend to keep all modified files independant of each other, so you can pick and choose) . The main reason why I want to modify the file is reducing the flavors. Right now almost every AIs techpath is very deterministic, because the high flavor values generally dominate all other AI calculating factors. I have reduced the values by a factor of 2/5th and the AI seems to choose much more appropriate and diverse techs.
 
Am I too late?! Noooooooooooo! :( Well, here's my 2:commerce:!


1) The AI have bonuses on Noble?! No wonder they are kicking my butt.

I say: keep Noble an "even" difficulty -- no bonuses for me, no bonuses for them. And if it is like that currently while on Noble... well, dang. I'm worse than I thought.

2) If there's a noticeable performance hit, I think it's not worth it, then. Performance is important!

3) Smarter is always better.

--


Well, Turinturambar, what you've chosen to do seems good. :l
 
I'll add that if the AI ever gets some substantial military improvements they should lose some or all of their free EXP, but it's probably not time for that yet.
 
Agreed with Monkeyfinger. The day the free xp can be reasonably removed I'll celebrate with a small dance, it is the worst kind of boost.

Also, are you sure about the disciples-stuff? The spreadfactor in the xml seem to be the most important ehm factor determingn the spread of religions.
 
Began a game yesterday, and dropped down from emperor to monarch. The mod seems to work very well, I was outteched by an AI or two scorewise and the general tech/economic "pressure" so to speak felt very emperoresque :) I'll try and make more detailed comments as the game moves along.

In general I prefer mods that focus on a main area, and don't branch out with alot of smaller changes here and there. Many mods catch my eye during their early development when their focused, but as the main functionality gets stable their creators tend to sorta bloat them :/ Just my two c's, but I'd say keep it focused on the economics.

Great work, I'm extremely impressed!


On a side note, with all the sorta slimmer mods comming out lately, like this and Rystic's and so on, it would be interesting to hear the dev-teams take on them since they seem so popular (and many would like to see them in the main mod).

EDIT: The Lanun are really scary theese days...
 
Okay, played a bunch of games.

I like how the AIs found a bunch of religions now. They WILL beat you to founding them if you're not on your toes.

The problem is I only ever see them going for the "good" religions: Order, Empyrean, Leaves and Runes. Maybe the occasional Octopus Overlords. I have yet to see anyone go Ashen Veil or Esus.

This has the same end effect of the old AI that only went Runes or Leaves: civs all shift alignment until no one is evil anyone and everyone gets along. The stalemate breaking good vs evil apocalypse never happens.
 
Top Bottom