[BTS] v0.21 Discussion thread

jdog5000

Revolutionary
Joined
Nov 25, 2003
Messages
2,601
Location
California
Discussion thread for all things related to v 0.21 (which you can get here, at least until the next release).

The most important changes over 0.2 are to ship and plane retreat from threatened cities/forts. The idea is that if the fort/city is lost, the ships and planes are destroyed without a fight so they should get out of the city when there's any real threat. The biggest outstanding question is whether the threat level is right ... losing the units for nothing is bad, but if ships leave to easily they might be hunted down at sea.

Better BTS AI v0.21 Changelog
_________

Bugfix
- Fixed bug in player closeness calculations causing the AI to be blind to its actual proximity to other players
- Fixed bug with needed defenders where the AI would choose to defend a recently captured holy city less than a normal city

War strategy AI
- Modified how closeness is used for determining who to attack, different settings for regular and Aggressive AI

Naval AI
- Modified bombard behavior. Priority remains on supporting player's ground troops, if none then consider supporting other troops with common enemy and spreading out stacks to increase reach of blockade.
- Modified and expanded Solver's changes to retreat from city/fort AI to be more specialized for various unit AI types, only move if there's a real threat

Air AI
- Modified and expanded Solver's changes to retreat from city/fort AI to be more specialized for various unit AI types, only move if there's a real threat

Barbarian AI
- Barb ships will now often blockade cities for a few turns before moving on if they have no nearby targets
- Barb ships trapped by ice or around 1-tile islands are now removed so more can spawn

General AI
- Modified city closeness calculations to use population from both cities, not just pop of the other city
- Created functions for determining when cities share the same water area (lake, ocean)
- Partial implementation of a new A* solver for determining closeness, does not yet affect calculations

Debug
- Added AIAutoPlay mod
- Modified debug mode output to show relevant information for these developments

Better BTS AI also includes Solver's unofficial 3.17 patch version 0.19.
 
All I have to say is: It's VERY cool seeing the AI dominate its own borders and expand at the expense of weak neighbors.

..until you find out that Mali somehow managed to rid itself of an entire continent worth of enemies and is now gigantic and has nukes while your longbowmen and galleons are still exploring.
 
Why would there be any reason at all for healthy ships (non-transports) to remain at port? Shouldn't it be so the AI never docks its ships, unless they're damaged?
 
Ships at sea are much more vulnerable to attacks out of the blue than ships in port, both attacks from other ships plus air attacks. Transports also need to be based in ports to pick up troops and launch naval invasions as the AI is currently written ... the escorts assigned to the transports will stay with them in ports as well. This accounts for most of the naval units the AI has sitting in ports during war.
 
Hi I've played almost a complete game using the 0.21 Better AI up to 1990.

I used the earth map from techtonics and mixed Leaders/Civ.

I started in North America with 3 civs and 1 other Civ in S.America.

Basically Suielman of the Mongolians has almost vasselised every one in the old world.

I particularly like the fact that he has repeatedly declared war on Targets he has a chance of defeating (ie people near by) rather than anyone in the new world even if his relations with us are worse. He even declared war on the germans 3/4 times. Often they capitulate then breakfree, but he'd soon be back to he's now completely taken their land.

I managed to get a toe hold in the old word in China and vasselise Julius Ceasar. After Suileman + vassels defeated the last Civ inbetween us, he has now declared war on me and my vassels, although he has a massive army I now have nukes so it will be interesting to see how it goes.

I could post a save if needed.

The main thing is that the AI didnt bother wasting its time with long range over the sea wars it couldnt win.

PS it was on Monarch
 
Hi guys. I don't know whether this is the right place, but Roland Johansen recommended in his post in this thread to inform you about these 2 rather dubious issues/bugs regarding AI-AI and AI-human relations during certain trades.

Interesting work you are doing here. BTW, since you are attempting to improve navy intelligence, what do you think about the Sea Patrol function ;) (we have a huge debate in the BTS forum).
 
Hey Guys,

I've continued playing the game I mentioned above. Im not too sure if the AI is using its planes at all havent noticed them bombing me.

Could be to do with the new plane retreat code ?

Also the AI could do with priortising fission a bit more because I've had nukes for about 50 years and no one else has. I think if they get nuked the AI should beeline straight for fission if possible.
 
Since I have been using this mod, I sometimes get a message "Unit Cnt True" displayed in the message window. Is this intentional? I cannot duplicate the event though, seems to happen randomly (not very often).

Best Regards,
Martin / Ace
 
Hi guys. I don't know whether this is the right place, but Roland Johansen recommended in his post in this thread to inform you about these 2 rather dubious issues/bugs regarding AI-AI and AI-human relations during certain trades.

Interesting work you are doing here. BTW, since you are attempting to improve navy intelligence, what do you think about the Sea Patrol function ;) (we have a huge debate in the BTS forum).
Thanks for bringing the trade bug to our attention, that definitely needs to be addressed immediately.

I don't know much about the sea patrol function, I'll read some more.
Hey Guys,

I've continued playing the game I mentioned above. Im not too sure if the AI is using its planes at all havent noticed them bombing me.

Could be to do with the new plane retreat code ?

Also the AI could do with priortising fission a bit more because I've had nukes for about 50 years and no one else has. I think if they get nuked the AI should beeline straight for fission if possible.
The retreat code only applies when there's some danger of the AI losing the cities the planes are based in, so that's not the culprit ... there's still more to figure out in terms of how the rest of the air AI works though.
Since I have been using this mod, I sometimes get a message "Unit Cnt True" displayed in the message window. Is this intentional? I cannot duplicate the event though, seems to happen randomly (not very often).

Best Regards,
Martin / Ace

Haven't seen that yet, but I'll keep my eyes open.
 
(For those of you wondering what we're talking about, in the BTS SDK there are two functions called AI_getAttitude in CvPlayerAI, one which gets the attitude type towards another player and one which gets the attitude type that corresponds to the integer attitude value. However, for some somewhat complicated reasons, there are circumstances where the programmer thinks there calling one but actually calling the other. In this circumstance, calling AI_getAttitude for player 0 (the human in single player) instead always returns CAUTIOUS since it interprets the 0 as the attitude value. Everything compiles just fine and seems to work unless you're very attentive ... major props to DanF5771 for having the perseverance to locate the problem!)

So I renamed the static AttitudeTypes AI_getAttitude(int iAttitudeVal) function to AI_getAttitudeTypeForVal and found only a couple places which needed to use this new function. There were then 3 places which complained about no longer having access to AI_getAttitude ...

CvPlayerAI::AI_bonusTrade
CvPlayerAI::AI_civicTrade
CvPlayerAI::AI_religionTrade

In all three circumstances it really affected trading, both with the human player (who the AI was in effect always CAUTIOUS towards) and in AI-AI trades ... in large games, player 10 and later would have a very easy time trading since others would effectively always be FRIENDLY towards them in terms of trading these three things.

For those of you keeping score at home, I fixed the compiler complaints by using:

Code:
GET_PLAYER(getID()).AI_getAttitude(ePlayer)

instead of just AI_getAttitude(ePlayer) ... this bypasses the issue of having the this CvPlayerAI pointer being const and looking up the non-const AI_getAttitude by getting a new non-const reference to CvPlayerAI. Fun fun fun ...
 
I'm glad to hear that you're seriously squashing this bug. :)

This means that now after the game has been on the market for years, we're finally getting the diplomacy to work as it should have from the start. How weird is that! Think of all the AI-AI deals that have never been realized in all those millions of games because of this bug. :crazyeye:
 
Great Project here! Im looking forward for the upcoming version.
It's actually UNBELIEVABLE that the trade bug hasn't been fixed before.

Are You going to include the unofficial patch by solver?
Please don't if the drill2-makes-units-immune-to-coll.damage-bug isn't fixed.
It makes the game unplayable in my opinion.
 
Yes and no ... I'm now an administrator for the Better AI sourceforge repository but TortoiseSVN has been causing my computer to bluescreen. Haven't been able to figure out WTF is going on with that yet ... I hope to figure that out over the next week when I finally get some real free time.
 
Sorry for the airhead question, but if I download this better AI from the link provided at the top has it been updated yet to include the trade bug fix?

Many thanks
 
Sorry for the airhead question, but if I download this better AI from the link provided at the top has it been updated yet to include the trade bug fix?

Many thanks

Yeah, the link is for the latest version of BBAI which is now 0.3 and includes the trade bug fix.
 
Top Bottom