Version 0.80 discussion thread

jdog5000

Revolutionary
Joined
Nov 25, 2003
Messages
2,601
Location
California
(You can always get the latest stable release from the download thread or sourceforge. Development versions and updated source code can also be checked out from sourceforge.)


This release feels like a big milestone in this project :cool: Between fixes in the UP and this version of BBAI, the AI's tech research rate is much improved, particularly in the late game. There undoubtedly more which can and will be done, but I think most of you will notice the change :p

Beyond the economy fixes, here are a few other highlights:

- AI now switches to Nationhood when facing a difficult enemy, and uses drafting both for defense and occasionally for an offensive rush
- Capitulation was tweaked from both sides, outright conquest is now a bit more common
- Began adding victory strategies to the AI (have little effect so far)

Next, there are two aspects of research rate I want to talk about more at length. The short version is that research rates have been rebalanced since the AI is now teching faster. The details are in spoiler tags below because they describe the inner workings of somewhat hidden research rate modifiers which exist in Civ4 and have been adjusted in this mod.
Spoiler :

Known prerequisite adjustment

In Civ4 you get a 20% research rate bonus (ie, an extra beaker for every 5 you produce) for every OR prerequisite tech you know. Most of the techs in the tree have 1 OR prerequisite, some have 2, and there are only a few with none (starting techs, Astronomy, Flight).

As an example, the two OR prereqs for Civil Service are Code of Laws and Feudalism. You have to know one of these two to be able to research Civil Service. If you only know Code of Laws, you get 20% bonus for researching Civil Service. If you only know Feudalism, again you get a 20% bonus. If you know both, then you get a 40% bonus.

Now, the bonus for knowing both Feudalism and Code of Laws makes sense ... it should be easier to make the leap to Civil Service with both of those concepts already understood. However, the bonus for knowing only one of the OR prereqs is a little weirder, why should you get a +20% bonus just for having unlocked the tech? This means that after the starting techs, you're getting at least a 20% bonus all the time, except on Astronomy and Flight. It's like some kind of bizarre "SALE: 20% off Tech-Tree Wide!!!" that no one ever told you about.

Anyway, this known OR prereq bonus was how I decided to scale down tech rates. In BBAI 0.80, you get a 10% bonus for knowing one OR prereq and then +20% for each additional prereq you know. In effect, almost all techs are 10% more expensive.

Several XML variables have been exposed to control tech rate:

TECH_COST_FIRST_KNOWN_PREREQ_MODIFIER - Bonus for first known OR prereq, currently 10%.

TECH_COST_KNOWN_PREREQ_MODIFIER - Bonus for subsequent known OR prereqs, remains at 20%.

TECH_COST_MODIFIER - Allows scaling of research rate modifier for all techs, so -5 would slow everything down by 5%. Set to 0.

In the test I've run, this seems to produce about the same tech rate as vanilla BTS (with tech trading on) ... it's still maybe 5% faster than I'd personally want most of the time, but about in line with what most expect I think.


Spoiler :

Tech diffusion

In Civ4, you receive a 30%/n bonus to research rate for every civ you've met which already knows the tech you're researching, where n is the number of civs alive in the game.

In BBAI 0.80, the formula is more complex, but here are the important points:
- Diplomatic status matters, so open borders make tech diffuse much more quickly.
- There is no longer a normalization by number of civs alive in the game, instead the added bonus for each additional civ who already knows the tech gets smaller and smaller.
This second change was made for two reasons: 1) Tech now diffuses the same early on a 2-player island on a big map as it does on a Duel map. 2) If one player pulls ahead of the pack, there's a stronger bonus to pull along the other players.

In addition, a tech welfare program was added to help out civs who fall far behind. Civs who are behind by several techs in the mid game or later now get a percentage boost based on how far behind they are. This was added to help keep smaller civs and others which can't keep up in research at least technologically relevant, so your tanks should see fewer archers and longbowman now :mischief:

Several variables for controlling these features have been added to GlobalDefinesAlt.xml.
 
- AI cities now more likely to build gold instead of research, since generally get more research from pushing up research slider

Is this based on the quotient of the average research bonus/average gold bonus (measured civilisation wide)?

About research cost.

With the improved tile management and improved city management, I would expect the AI to research at about the same speed in the ancient and classical era. But once the benefits of this better management become apparent in the later ages, the AI will start to research faster compared to the vanilla BTS AI. So if the same balance is sought, then I would expect that the later techs need an increase in cost while the starting technologies can remain at a similar cost.

I've never viewed the research bonuses due to known technologies as a problem. I guess, the developers experimented with the technology values until the research speed was about right for most players and the AI with the hidden 20% bonus. If the bonus hadn't been there, then the research values would have ended up lower (for vanilla civ4). The bonus is a bit hidden and this makes guessing the right values a bit harder for a modder and makes the game a bit harder to understand for a starting player. So there are some negative consequences to such a game design.

Manipulating these values can help set up a better research speed for the improved AI, but I think that a more manual adjustment to middle to late game technologies would work better.

Related to this discussion is the scaling of research speeds across map sizes. In my opinion, this balance was not created well. The game just has a flat multiplier for tech cost for larger maps. This causes a very different research experience for larger maps. At the start of the game, you can't really research any faster on a huge map than a standard map since in both situations there's just a capital or a capital plus a few cities. There is a slightly lower city maintenance on larger maps and you can continue to build cities once the normal map size map is filled, but this takes a while to make a research difference. Late in the game, civilisations on a huge map will have a lot more well developed cities resulting in maybe 3 times as much research power than a normal map (for the average civilisation). Because the research multiplier for map sizes is a flat value, this means that research on a huge map will be slower at the start of the game, the same in the middle of the game and lightning fast at the end of the game (for the average civilisation).
 
Tech diffusion

In Civ4, you receive a 30%/n bonus to research rate for every civ you've met which already knows the tech you're researching, where n is the number of civs alive in the game.

In BBAI 0.80, the formula is more complex, but here are the important points:

In addition, a tech welfare program was added to help out civs who fall far behind.

I don't like all that much, to be honest. That sounds like a gameplay change.
 
That's in this release.

As others have said, this looks to be an epic release for BBAI. Can't wait until Revolutions gets updated and this trickles down into all the big mods. BBAI is definitely keeping the game interesting for a huge amount of the civvers.

Is it? Can you quote the release notes referring to it?
 
- Fixed major cause of cycling between cottages and workshops in CvCityAI::AI_bestPlotBuild. AI now consistently values cottages as average between cottage and town, removing asymmetry that led to cycling.

From here
 
Great! I didn't see that :blush: . Thanks.

P.S.
Wow, after reading the entire changelog this release is REALLY impressive! hats off to you Jdogg ;)

I second that emotion.:D
 
I don't like all that much, to be honest. That sounds like a gameplay change.

I'm not 100% certain but it sounds like he included XML options to completely disable the features. I've taken a similar approach with PIG mod, introducing some new gameplay features but actually leaving most of them disabled by default. I leave it to the player to decide if he/she wants to turn them on or off.

Still, gameplay changes might make merging more time consuming, but that's a fairly minor niggle.

Overall, I think this is a great Better AI release, but then every Better AI release is good in my books! :lol:
 
I've tried to merge the BTS 1000ad scenario with the better AI + 48 civs, but when I test it, I always get the defeat message when I enter the game. I have checked a hundred times that I have 48 team and player slots, and that the barbarian cities and units are owned by number 48. To eliminate possible typos, I've done the XML editing twice, really boring I must say.

Could need some help here!
 
TECH_COST_MODIFIER - Allows scaling of research rate modifier for all techs, so -5 would slow everything down by 5%. Set to 0.

So essentially we can change the tech cost to our needs?
Would 10 increase the cost by 10% all through?
If so, that is a really great addition, as marathon games (1500 turns) should be more than long enough for me, except I usually finish the tech tree by 1000-1100 or so, and so want to increase tech costs.
 
Are there any plans to further reduce some of the handicaps (noble) as the AI get's better?
 
However, the bonus for knowing only one of the OR prereqs is a little weirder, why should you get a +20% bonus just for having unlocked the tech? This means that after the starting techs, you're getting at least a 20% bonus all the time, except on Astronomy and Flight. It's like some kind of bizarre "SALE: 20% off Tech-Tree Wide!!!" that no one ever told you about.

Anyway, this known OR prereq bonus was how I decided to scale down tech rates. In BBAI 0.80, you get a 10% bonus for knowing one OR prereq and then +20% for each additional prereq you know. In effect, almost all techs are 10% more expensive.

I totally buy your arguments for taking away the 20% bonus. But, why do you reduce it to 10%, instead of taking it away completely? It still is weird and makes no sense.
 
Under CvPlayerAI::AI_getSpaceVictoryStage(), you ask yourself if there is a better way to determine if a spaceship victory is valid. How about checking if the victory requires you to build a project or buildingclass?
 
Are there any plans to further reduce some of the handicaps (noble) as the AI get's better?

That will be done by popular demand ... if people feel it's needed, it'll happen.

I totally buy your arguments for taking away the 20% bonus. But, why do you reduce it to 10%, instead of taking it away completely? It still is weird and makes no sense.

Well, the problem is that the general rate of research was set up to have a certain pace. The AI is faster at tech now, but not 20% faster. As Roland pointed out earlier, it's also not a flat rate ... the AI's tech rate is improved mainly from the Renaissance on. Going down to 10% put space victories at about the right time on average in my tests, so that's why it's there.

I'm thinking of changing this mechanic so tech costs scale by era ... +0% for Ancient, +3% for Classic, +6% for Medieval, ... +15% for modern. Something like that.

Under CvPlayerAI::AI_getSpaceVictoryStage(), you ask yourself if there is a better way to determine if a spaceship victory is valid. How about checking if the victory requires you to build a project or buildingclass?

Yeah, but with the way things are setup that requires a loop over projects as the victory doesn't know what projects it requires ... this isn't bad, but delay turns alone works at least for the default victory types and most of the mod ones I've heard of (religion, mastery, etc).
 
I'm thinking of changing this mechanic so tech costs scale by era ... +0% for Ancient, +3% for Classic, +6% for Medieval, ... +15% for modern. Something like that.

That sounds interesting. As the AI city management has improved in a few ways, this will probably scale early to late game research speeds the right way. If these values are accessible in the XML-files, then I can also change the tech rate of the huge maps the way I like without changing the tech cost of every single technology.
 
Top Bottom