jdog5000
Revolutionary
(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.)
There's actually quite a bit of new stuff in this release and some have big implications:
- War strategy: The AI will now sometimes start plans for a second (or more) war if it's got a huge advantage in its current conflict. This will have a significant effect, reducing the predictability of war cycles for warmonger AIs. In addition, the AI will now break out of wars of distraction ... if nothing happens in a war and the AI isn't planning anything, it will make peace so it can get on to something useful.
- Spy AI: This has been majorly retooled. You will notice. The AI will now steal your treasury and more intelligently use poison and unhappiness. Also, the AI is now able to use espionage on offense in war to remove city defenses in front of its incoming stacks. It's pretty awesome when it happens.
- AI customization: As requested, a few "magic numbers" in the SDK have been exposed to XML. Right now it's a few ratios to control how the AI decides to attack/bombard cities. Request more if you have something in particular in mind, and let me know what values you try and what effect it has.
- AI logging: This is mainly for modders and myself, but BBAI can now log AI actions for post-analysis. It requires adding the compiler option LOG_AI at compile time.
Enjoy!
New in Better BTS AI 0.82
Merged in UP 1.3
Added files BetterBTSAI.h and BetterBTSAI.cpp
Small change (in many places) to code comment format to prepare for Doxygen documentation
Reorganized GlobalDefinesAlt.xml
Bugfix
- Fixed bug in AI valuation of techs which enable their favorite religion
City AI
- AI now will not build workers in pop 1 capital at start of game
- Higher production/population cities will fill more of worker need
- Inland cities will now produce settlers to support colonization of other continents/islands
- AI now considers value of mine/lumbermill + railroad when picking tile improvements whether railroad is in place or not
Diplomacy AI
- AI less likely to vote for/propose votes for peace if it's in an early/evenly matched war
- AI vote for/proposing votes for city exchange now based on teams, not players
- Added AI logic so that it will more correctly consider whether to accept human players as vassals in mods that allow that
War Strategy AI
- AI will now consider starting additional wars if it has huge power advantage over current target
- AI will now end wars which have been going on for a while but there has been no fighting and it has no plans
- AI now considers current would-be-enemy power when switching WARPLAN from PREPARING_TOTAL to TOTAL
- When outgunned in an area, AI more readily adopts defensive strategy
- Fixed issue where AI would not declare war on capital area enemy because it didn't have large enough attack force in shared colony areas
War Tactics AI
- Exposed several magic numbers for when the AI decides to attack/bombard cities in GlobalDefinesAlt.xml
- Fixed issue where attack city stacks would sometimes waste time by moving together to a staging city before merging
Espionage AI
- Unified decisions on what missions AI spies will run based on attitude and warplans
- On Aggressive AI, AI spies will now go after rivals civ is pleased towards
- Spies now move before other units (so revolt city can have an effect)
- Spies positioned in enemy cities will now cause revolts to lower defenses when attackers are in position
- Greatly reduced AI spies pillaging random improvements
- AI spies will now go after bonus tiles, very rarely target non-bonus improvements
- Spies now will move to and wait in cities which AI is targetting for conquest
- Added consideration to have spies pick different target cities/plots
- AI now will more likely steal enemy treasury if itself or enemy is in financial trouble
- AI will now consider using unhappiness mission in cities close to happy cap, not only those already over it
- Spies will now steal techs more often when AI is behind in tech, including stealing techs from friends when necessary
- Fixed issue blocking AI from using the steal treasury spy mission
- Poison city mission now valued based on producing food shortages, not just producing unhealthiness
Missionary AI
- AI will now build missionaries to push holy city religions when in free religion
- AI now gives higher weight to building non-state religion missionaries for any holy city religions is has, especially with a shrine
- Improved AI decisions on when to build missionaries
Tech AI
- Added new function AI_techValue, moved existing tech valuation code there
General AI
- AI now values gifted units much more highly, in line with other gifts
- Gifted obsolete or non-combat units are not valued as highly as current combat units
AI Logging
- Added logging system for easily tracking AI decision making (requires Release or Debug build)
CIV4GameInfoSchema
- New era tech cost modifier field no longer required, will be set to 0 for all era for mods that don't specify them instead of failing to load XML
There's actually quite a bit of new stuff in this release and some have big implications:
- War strategy: The AI will now sometimes start plans for a second (or more) war if it's got a huge advantage in its current conflict. This will have a significant effect, reducing the predictability of war cycles for warmonger AIs. In addition, the AI will now break out of wars of distraction ... if nothing happens in a war and the AI isn't planning anything, it will make peace so it can get on to something useful.
- Spy AI: This has been majorly retooled. You will notice. The AI will now steal your treasury and more intelligently use poison and unhappiness. Also, the AI is now able to use espionage on offense in war to remove city defenses in front of its incoming stacks. It's pretty awesome when it happens.
- AI customization: As requested, a few "magic numbers" in the SDK have been exposed to XML. Right now it's a few ratios to control how the AI decides to attack/bombard cities. Request more if you have something in particular in mind, and let me know what values you try and what effect it has.
- AI logging: This is mainly for modders and myself, but BBAI can now log AI actions for post-analysis. It requires adding the compiler option LOG_AI at compile time.
Enjoy!
New in Better BTS AI 0.82
Spoiler :
Merged in UP 1.3
Added files BetterBTSAI.h and BetterBTSAI.cpp
Small change (in many places) to code comment format to prepare for Doxygen documentation
Reorganized GlobalDefinesAlt.xml
Bugfix
- Fixed bug in AI valuation of techs which enable their favorite religion
City AI
- AI now will not build workers in pop 1 capital at start of game
- Higher production/population cities will fill more of worker need
- Inland cities will now produce settlers to support colonization of other continents/islands
- AI now considers value of mine/lumbermill + railroad when picking tile improvements whether railroad is in place or not
Diplomacy AI
- AI less likely to vote for/propose votes for peace if it's in an early/evenly matched war
- AI vote for/proposing votes for city exchange now based on teams, not players
- Added AI logic so that it will more correctly consider whether to accept human players as vassals in mods that allow that
War Strategy AI
- AI will now consider starting additional wars if it has huge power advantage over current target
- AI will now end wars which have been going on for a while but there has been no fighting and it has no plans
- AI now considers current would-be-enemy power when switching WARPLAN from PREPARING_TOTAL to TOTAL
- When outgunned in an area, AI more readily adopts defensive strategy
- Fixed issue where AI would not declare war on capital area enemy because it didn't have large enough attack force in shared colony areas
War Tactics AI
- Exposed several magic numbers for when the AI decides to attack/bombard cities in GlobalDefinesAlt.xml
- Fixed issue where attack city stacks would sometimes waste time by moving together to a staging city before merging
Espionage AI
- Unified decisions on what missions AI spies will run based on attitude and warplans
- On Aggressive AI, AI spies will now go after rivals civ is pleased towards
- Spies now move before other units (so revolt city can have an effect)
- Spies positioned in enemy cities will now cause revolts to lower defenses when attackers are in position
- Greatly reduced AI spies pillaging random improvements
- AI spies will now go after bonus tiles, very rarely target non-bonus improvements
- Spies now will move to and wait in cities which AI is targetting for conquest
- Added consideration to have spies pick different target cities/plots
- AI now will more likely steal enemy treasury if itself or enemy is in financial trouble
- AI will now consider using unhappiness mission in cities close to happy cap, not only those already over it
- Spies will now steal techs more often when AI is behind in tech, including stealing techs from friends when necessary
- Fixed issue blocking AI from using the steal treasury spy mission
- Poison city mission now valued based on producing food shortages, not just producing unhealthiness
Missionary AI
- AI will now build missionaries to push holy city religions when in free religion
- AI now gives higher weight to building non-state religion missionaries for any holy city religions is has, especially with a shrine
- Improved AI decisions on when to build missionaries
Tech AI
- Added new function AI_techValue, moved existing tech valuation code there
General AI
- AI now values gifted units much more highly, in line with other gifts
- Gifted obsolete or non-combat units are not valued as highly as current combat units
AI Logging
- Added logging system for easily tracking AI decision making (requires Release or Debug build)
CIV4GameInfoSchema
- New era tech cost modifier field no longer required, will be set to 0 for all era for mods that don't specify them instead of failing to load XML