How about these for improvements to the BTS AI economy?

SevenSpirits

Immortal?
Joined
Jul 7, 2007
Messages
512
In my games with BTS, I've been pretty disappointed by how bad the AI is at teching. It's so bad that even at Immortal, I beat the AI to Lib, and had a big tech lead. This should not happen, because I'm not that good. I want to be able to trade for good, new techs from the AI without having to play on freaking Deity.

This has already been hashed over in other threads, but it seems the AI's low tech rate is because of:
-Too much espionage spending.
-Expanding too quickly and underestimating maintainance costs.
-Underestimating unit upkeep costs.

So, I tried to tweak some AI parameters to fix this. I think the AI itself is pretty good, but the parameters are off, at least for the BTS level of handicaps.

Interestingly, with only a couple changes I've now found a version that actually seems harder for me. This is the first time I've ever not gotten Alphabet first, and the AI who got it (er, one of the two) had about 6 techs on me that I could see! I had none on him. This was an emperor game and I felt pretty challenged. In previous emperor games with BTS, I thought it was very easy. This time I was in last place scorewise when I stopped.

I actually haven't played much civ so I could just be making it harder for myself and not better in general - I don't know. But it sure seems better, especially for someone who doesn't war that much.

I've included a link to the dll (zipped up) for people who want to give it a try. Just put it in your Custom Assets folder. By the way, it's based off of solver's patch, so you won't lose those changes when you try this out.

Here are the changes (all just changes to how the AI values things):

-Reduced espionage importance to 2/3 of previous value, and then by one notch of the slider. Most of the time, this puts their slider at 0 or 10 depending on the personality. (I had noticed a huge correlation between the AIs espionage spending and how screwed they were in-game. The 20% guys fall way behind and get vassalized, and Zara Yaqob who is awesome spent nothing on me for ages.)
-Increased value of "research" commerce by 4/3. Might be too much? Note that this won't bankrupt it, the logic for how much to value gold is largely based on whether it has enough.
-Decreased value of expanding (i.e. building a settler) to 5/6 of current value. Note that since this value is then postively affected by a good economy, the result may not be fewer cities when combined with the above changes. It will definitely mean a slightly lower tolerance for a poor economy.
-Removed value increase for a tech being map-centering. This might throw off balance of Calendar, but come on... centering the map does nothing. Calendar is good because it gives you other things. This just annoyed me when I saw it, and I had to change it.
-Doubled the tradability/monopoly factor when choosing which techs to research. This means that the fewer fraction of civs have a tech, the more it values it. (It did this before, but now it counts twice as much.)
-AIs on friendly now almost never deny techs, and pleased AIs are less likely to do so. Instead, in those cases (mostly access to a wonder) they will value the tech much higher.
-Increased value of removing features (i.e. chopping forest and jungle)

http://students.washington.edu/scmm/CvGameCoreDLL.zip

I encourage you to try it out and let me know if you think it's an improvement and/or in what ways it weakened the AI. I'm also curious how it will combine with Agg AI.

Note: I thought about posting this in the Mod forum, but it's not a mod. It's intent is to much more like a patch, and the point of this thread is to discuss whether the changes it makes improve BTS gameplay, or which other changes should be made instead.
 
Agh...I want to, as the list of AI changes is larger than Solver's...but Solver's patch fixes a lot of bugs. Is it possible for you to make a version combined with his?
 
Actually, it IS combined with his. I made the changes off of his source files. :)

Edit: Also, to avoid any misunderstandings, this is not at the same level as Solver's patch. Everyone should be using his patch, whereas this is pretty experimental.
 
Keep in mind a couple things

1) The AI gets reduced maintenance prices, so expanding for it isn't a huge issue.

2) I noticed you increased the value of chopping forests. I am not sure I agree with this...the +1 hammers is nice, the health bonus is nice, and the stuff you can put on it later on (lumber mills and forest preserves) are nice. I guess it depends on how much the value was increased.

3) I like most of the changes.
 
Keep in mind a couple things

1) The AI gets reduced maintenance prices, so expanding for it isn't a huge issue.

Yes, but not very much in BTS. For example, on Emperor the AI pays more civic upkeep than a human on Noble (85 vs 80). Just based on experience, I've seen them expand to the point where their research is so slow they are screwed.

2) I noticed you increased the value of chopping forests. I am not sure I agree with this...the +1 hammers is nice, the health bonus is nice, and the stuff you can put on it later on (lumber mills and forest preserves) are nice. I guess it depends on how much the value was increased.
I agree to an extent, however, I've noticed that often the BTS capital location chooser gives you a location that is almost all forests. I see AIs not chopping hardly any of them, and screwing themselves because they don't have any improved tiles to work. However, I will keep your point in mind - I'm actually not sure how much I increased it by. ;)
 
I've played couple games out into the medieval, and the AI is certainly not doing any worse. I mean, it's hard to see if it's better because every game is different. But in my last game, on noble, several AI's had better techs than me (9 AI's on a standard size big and small map), and I had a goldmine in each of my 2 first cities. That's saying something, considering the AI and me are equal in what it takes to research stuff on noble afaik. A couple AI's were low on score and tech of course, but that was due to being hammered by their neighbours. Aggressive AI on. Opening the map in WB I see cities are for the most part nicely developed, cottages aplenty. Still a few forests left adjacent to capitols though, which is bad strategically.

Though I have had similar games without any changes, so can't say if there is any noticeable change. But, as I said at first, at least these changes doesn't seem to change anything for the worse.
 
Hmm. My take on that changelist is that it will weaken the AI overall. The AI espionage spending has already been decreased significantly by the unofficial patch... further reducing it will make the AI unable to ever execute its big mission strategy, I would presume.

Making the AI less likely to deny techs is a pure form of making tech-whoring easier, nothing more. It's a really bad change that has the potential to screw balance up. That's extremely sensitive code.

Can't speak for the Settler tweak, it's one of those things that need to be tested. Still, if you want to change AI's tolerance for a poor economy, I'd rather begin at the financial trouble function, as that's what the AI factors into lots of decisions anyway.
 
This has already been hashed over in other threads, but it seems the AI's low tech rate is because of:
-Too much espionage spending.
-Expanding too quickly and underestimating maintainance costs.
-Underestimating unit upkeep costs.

While I agree with all these, I just want to add 1 more that has become more and more apparent in my most recent games.

The AI may well expand quickly after a certain point (it actually seems a bit slower out of the gate) but it is totally inept at providing any terrain infrastructure.

In my most recent game (Monarch, Marathon, Huge, Big&Small), I was boxed in by several aggressive AI's, so I bided my time to build up.... but I was pulling so far ahead in tech that I went into the WB to have a look. The AI's all held vast swathes of land and it was all totally undeveloped - I think I saw on average 1 cottage per AI even though some of them had 12 cities plus... and courthouses were a LONG way off! There were a few more farms, but mostly it was just resources that were claimed... even then they were mostly military ones.

Most cities weren't even attached to the trade network.... and the AIs seemed to have about 2 or 3 workers each.

They simply crippled themselves by overexpanding and not supporting that by developing any form of economy.

Suggested Solution: Get the AI to build workers earlier and more frequently.
 
I played with this some more and it seems like of all the changes I made, the only thing that really made a difference was the -10% on the espionage slider. But that one change made a big difference. I can only hope AI espionage spending gets decreased extra in the next patch.
 
I played with this some more and it seems like of all the changes I made, the only thing that really made a difference was the -10% on the espionage slider. But that one change made a big difference. I can only hope AI espionage spending gets decreased extra in the next patch.

This depends I usually don't put my espionage slider up till I get to around mid-game. And you know what happens, look on the espionage screen and my 10% just starts to shoot way off the map. What this means is that regardless of how much AI is spending on espionage, it's just not enough compared to my 10% from mid-game onwards because that's been funded by so many cottages that I've built and a huge economy.

So by mid-game I start to see everything AI is doing and starts to make things easier for me because now I can control when I found liberalism and what I use that tech for. I know what AI is up to, what they have and don't have.

I think getting it to spend less could be dangerous especially with the espionage functions. You could cause city revolts, poison wells etc... At least now you know that they will keep up their espionage spending.

I still think that it's the military that hurts AI the most. Make it spend less on military and make it impossible for the human to have big armies (more unit costs). That way the game becomes less about stacks of dooms.
 
Yeah, I'm not sure what it thinks it's doing with its military sometimes.In my experimentation, I watched an entire game with just AIs. Justinian was doing very well, and was ahead in score and producing the most science by a bit. Then around rifling and onward, he built so many units that his research rate dropped by at least half. He had 500 military units. They did nothing until the end of the game, when his immediate neighbor won a cultural victory. Maybe having Aggressive AI would have at least made him do something with the units?

I noticed another weird thing too: Gandhi, 9 turns away from a cultural victory, suddenly switched back to research for 7 turns to grab some random tech. Huh?

By the way, I leave my espionage slider at zero the entire game and I still get research visibility against Emperor opponents by Liberalism (though not Immortal ones). It's because I'm ahead on research, and thus get stuff like courthouses faster. At just about the right time, I overtake them in espionage. Meanwhile, the AI's 10% espionage early on does almost nothing: For example, if they are producing 9 commerce, and have the slider at 20%, that is 1.8 espionage and 7.2 research. Both of these get rounded down and they basically just made all their techs take 128% as long to research, just to get one espionage point, which goes against one opponent. That opponent probably isn't me, because the AIs like to spy more on people they have a deficit against. They never have a deficit against me early, so they blow it on each other and just create an arms race that does nothing.
 
Are you sure you based it off of solvers latest version of the unofficial patch? Because in my game my corporations were affected by inflation.

I checked to make sure that the dll you linked in the first post was used.

Anyway in my game(agg ai/no tech trading/no vassal states/emperor) the best AI was researching biology by 1917, which is not too bad I guess.
 
Turinturambar, actually I accidentally based it off the second most recent version of Solver's patch. However, that still has the inflation thing fixed, so I'm not sure what's up. The main thing it's missing is the AI "big espionage mission" strategy.

After uploading that one, however, I've been basing any new experiments off of the most recent one, and that's what my most recent comments are based on. I'd upload that, but I haven't noticed much difference and my internet here is painfully slow.
 
The biggest factor in improving the AI economy would be to improve the AI worker code. I tried to suggest this in another post, but it seems no one got the point.

Basically, use a very simple algorithm for improvements.

Making the AI less likely to deny techs is a pure form of making tech-whoring easier, nothing more. It's a really bad change that has the potential to screw balance up. That's extremely sensitive code.

For once I disagree with Solver. Trading techs is ALWAYS good. Why? It benefits yourself and only one competitor. Overall, an advantage for you. Humans always trade as much as they possibly can (with very few exceptions), a smart AI would trade alot more.
 
Stop it from spamming military units.

Again, building new units it not the problem. Keeping around (and spending $ upgrading) obsolete units is.

As far as I know the AI never disbands units. I think it needs to, oldest/weakest units first of course.
 
For once I disagree with Solver. Trading techs is ALWAYS good. Why? It benefits yourself and only one competitor. Overall, an advantage for you. Humans always trade as much as they possibly can (with very few exceptions), a smart AI would trade alot more.
I agree. However, it is a bit more complicated than you say. Let's say it's a 7-player game.

If you play with no tech brokering, it's a complete no-brainer. If you do an even trade, you and one other player get +X. You gain on every other player, and lose nothing.

You can even trade at a 4:1 disadvantage, and if you trade once with everyone you gained 6 and they each gained 4. Again, you gained on everyone.

If you do NOT have no tech brokering on, however, it is more difficult to calculate the advantages. The easiest case is if you have a tech that someone else has too. The supply is so overloaded, because you can both give it to people at no cost to yourself, that it loses enormously in value. The correct move is always to trade it to as many people as possible before your rival does, so you get at least some benefit.

If you have a monopoly tech, things are different. Say each player has a monopoly tech that is worth +1, as well as some gold. If you swap monopoly techs with player B, you are both temporarily at +1, but then you immediately find yourself in a race to trade both those techs to everyone else for change. The end result is that everyone else is +1 on both of you, except that they gave you a little money. So it's not clear that trading a monopoly tech is worth it.

Interestingly, if you are separated from another continent, trading becomes better because you will at least be gaining on the other continent. For example, if you are on a continent with 3 people and there are 4 on the other one, and you do the above swap-monopoly-techs-and-then-panic, then you and player B are +1, the third person on your island is +2, and the other continent is all +0. On average, you gained +.5 on your opponents plus some change, so it was worth it. Also, it puts your continent - which are the people who will be giving you techs - further ahead, thus benefiting you further.

Anyway, how would a group of real humans deal with this? Well, they would probably put in place a system that works like a less potent version of no tech brokering. This could be an honor system, where if you trade someone's tech away they get pissed off at you, or maybe some kind of agreement to not trade it away for 10 turns.

So how would you change the AI to trade more intelligently? Well, first of all, they need to be more willing to trade stuff, because it really is in their best interest. Second, you either need to have no tech brokering, or a limited (only lasting 10 turns, say) ban on brokering, or just change the AI so it a) Gets negative diplomacy modifiers against people who trade "its" techs away, b) Avoids trading monopoly techs to people who have done so in the past, and c) Is reluctant to trade away other peoples' techs for these reasons.

By the way, the way it is now is a HUGE advantage to the human, because the human can do all these trades without fear of the AI selling them to everyone else for a pittance.
 
The biggest factor in improving the AI economy would be to improve the AI worker code. I tried to suggest this in another post, but it seems no one got the point.

Basically, use a very simple algorithm for improvements.



For once I disagree with Solver. Trading techs is ALWAYS good. Why? It benefits yourself and only one competitor. Overall, an advantage for you. Humans always trade as much as they possibly can (with very few exceptions), a smart AI would trade alot more.

This is not necessarily true. Tech trading is good in terms of everyone getting techs but may not be smart strategically. If I am the only one with rifling, I don't trade it away. Why? Because I know when I do all the AIs will have it a few turns later because now that both me and him have it he will devalue it a bit more and trade it away for other techs he wants. While I always trade a ton of techs, I can understand why it is smart to have the AI try to hold onto techs it has a monopoly on.
 
Solver said:
Making the AI less likely to deny techs is a pure form of making tech-whoring easier, nothing more. It's a really bad change that has the potential to screw balance up. That's extremely sensitive code.

Sorry Solver, but this simply isn't true. Refusing to trade a tech purely because you have a monopoly on it (as the AI currently does) is plain stupid. The classic way for humans to keep pace at the high levels is to beeline or lightbulb a monopoly tech, and then trade it to half a dozen AIs for 3 or 4 cheaper and more widespread techs and a load of gold. While any individual trade doesn't look that great, trading it to all civs at the same time gves the human player way more than enough profit to counterbalance any AI gain, and minimises AI trade ability.

Yes, there are occasions when it is undesirable to trade a monopoly tech, but they are quite rare, and they are not purely because it is a monopoly tech. Trading away a tech on a wonder you're building is not advisable, and the AI (sort of) understands that. It's not so good on spotting the handful of crucial military techs that should not be traded (Rifling, Combustion, Assembly line). However it consistently refuses to trade junker tech like Medicine or Nationalism/Liberalism/Constitution, or the Economics/Corporation branch simply because it has a monopoly on them, even when there are favourable tech trades on the board.

It is very noticeable that the few AI who do trade tech properly (can anyone say Mansa Musa?) are consistently leagues ahead in any tech race.
 
Top Bottom