1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Version 0.37 Discussion Thread

Discussion in 'Civ4 - Better AI' started by jdog5000, Sep 5, 2008.

  1. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    You can always get the latest stable release here at CFC or sourceforge. Development versions can also be checked out from sourceforge.

    Version 0.37 fixes a bunch of small things found by the community with BTS and the unofficial patch. It also includes new debug tools, the python components for AIAutoPlay and ChangePlayer from the Revolution mod.

    Better BTS AI v0.37 Changelog
    _________________________
    Spoiler :

    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
    - Fixed bug causing player ID to be used in place of actual attitude when checking for denials in bonus, civic, and religion trading
    - Fixed bug in paradrop code causing AI to avoid paradropping onto terrain bonuses under certain circumstances
    - Fixed bug in AI denial of switching civics when in Emancipation
    - Fixed bug introduced in unofficial patch causing immunity to collateral damage
    - Fixed bug with espionage mission to spread culture to an enemy city
    - Fixed bug causing combat promotions to be counted twice for aircraft

    War strategy AI
    - Modified how closeness is used for determining who to attack, different settings for regular and Aggressive AI
    - Created new function CvTeamAI::AI_calculateBonusWarValue so AI will consider declaring war for resources, weighted towards resources AI doesn't have and plots that are more easily captured
    - Modified city attack targetting by terrain bonuses to consider how important bonus is to AI

    City AI
    - AI will now more likely fill empty transports when enagaged in transcontinental war, making reinforcements and second waves on invasions more likely
    - When doing invasions, AI will now be more likely to have cities with free air experience fill vacancies on carriers
    - When doing invasions, AI will now have cities with high production or free sea experience more often fill needs for aircraft carriers
    - When doing invasions, if AI has at least 50% of its possible missile capacity it will no longer always build missiles

    Espionage AI
    - Blocked out places for future changes

    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
    - Increased city danger threshold so enemy ships do not runaway so easily
    - Damaged ships will stay in city unless city is highly threatened

    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
    - Increased city danger threshold so enemy aircraft do not retreat so easily
    - Attack planes in endangered cities will now more likely to airstrike attackers
    - Improved code for defense planes in endangered cities so they stay to defend longer and either airstrike or patrol
    - Improved efficiency of danger threshold check for ships and planes
    - Improved code for moving planes to offensive or defensive bases to take city threat into account
    - AI bombers will no longer consider basing in undefended forts even if the fort is unthreatened
    - AI bombers will now consider moving to a city with two defenders (down from requiring 3), change made because of added threat logic and should allow AI to now use almost all of its cities as airbases
    - Fixed bug introduced in Unofficial Patch 0.19 causing bombers to skip their turns whenever an interceptor was around

    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

    Combat Mechanics
    - Blocked out location for potential changes to air combat

    Debug
    - Added SDK and adapted python code from AIAutoPlay mod to faciliate testing
    - Modified debug mode output to show relevant information for these developments
    - Added string to lower right flag help text showing Better BTS AI version number currently running
    - Added SDK and adapted python code from ChangePlayer mod to facilitate testing

    Better BTS AI also includes Solver & Dresden's unofficial 3.17 patch version 0.19.1.


    The main open questions are the same as before:

    - how to change AI espionage point spending so it is more proactive

    - how to change combat mechanics for air battles to make combat experience more important in establishing air superiority

    - investigating issues with AP/UN voting
     
  2. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    just a little question: CIV4BonusInfos.xml why is this file in this mod? there are no changes to the original file from warlords.
     
  3. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    It is unnecessary, I'll remove it for future versions ... I added it when doing resource driven war before finding a better way.
     
  4. Jaybe

    Jaybe civus fanaticus Supporter

    Joined:
    Sep 24, 2001
    Messages:
    2,559
    Gender:
    Male
    Location:
    Las Vegas, Nevada
    I did a visual comparison of the changelogs for v0.36 and v0.37 but could not find any difference. Should there have been any, or were the changes only in how things were accomplished?
     
  5. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    Better BTS AI also includes now Solver & Dresden's unofficial 3.17 patch version 0.19.1.
     
  6. Rodwell

    Rodwell Chieftain

    Joined:
    Sep 3, 2008
    Messages:
    20
    Very nice work.

    Any chance Worker AI will be looked at? Even a very "basic rule" worker AI could perform much better than the current one.
     
  7. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    There were also a couple improvements to how things were accomplished and one or two places where an existing fix needed to be applied in another place. 0.37 is a small update.
     
  8. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    Were there any changes made to ICBM behavior? I did not see any ICBM in my last ~4 games. All AI players were building tactical nukes only.

    Is the map size affecting the nuclear weapon building behavior? Is the AI THAT clever? ;-)
     
  9. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Nothing has been directly changed with ICBMs.
     
  10. Portus

    Portus Warlord

    Joined:
    May 17, 2005
    Messages:
    121
    Hi, i dont play alot, but made a game just now with this mod (islands) and see that another civ was not expand, in fact because of barbarian galley always loose the work boat improvement and stupidly insist in build only work boat...i never see this before could be something with the mode...
     
  11. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Barbarian galleys tend to hang around more and blockade with this mod instead of always moving, this might be part of the problem. Also for 3.17 barb ships were greatly expanded making this much more of an issue.

    Clearly the AI needs to check safety better when building/moving work boats.

    Can you post a save where this is going on?
     
  12. Yakk

    Yakk Cheftan

    Joined:
    Mar 6, 2006
    Messages:
    1,288
    I think that the barbarian boat fix has made barbarian boats too common.

    Some ideas:
    1> Have barbarian boats lose 10% health every turn at sea.
    -- This means that someone with Galleys can attack and sink barbarian boats reliably -- much like can be done for most of the game on land, with a modest investment in troops.

    -- As it stands, it is a seriously large project to fight off barbarians boats under the current model until you get triremes -- and even then, an nearby set of uncolonized islands means you'll have a huge stream of boats, and you have to start off destroying the entire backlog of pirates from the start of the game.

    -- Existing boats despawn after a time period, taking their raiders with them, and causing new ones to spawn.

    2> Populate each boat with a single raider, so fewer boats spawn (ie, each boat is 2 units, not 1).
     
  13. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    Yeah, the barb boat thing is pretty bad. You get them as early as archers, and they just keep coming. If you have a coastal start you are pretty much forced to beeline metal casting.
     
  14. Jaybe

    Jaybe civus fanaticus Supporter

    Joined:
    Sep 24, 2001
    Messages:
    2,559
    Gender:
    Male
    Location:
    Las Vegas, Nevada
    What I did to encourage naval capability in the early game (and defend against barb naval) was to HALVE THE COST of galleys & triremes.
    Note that this is with huge/marathon/2-hemisphere games.
     
  15. Portus

    Portus Warlord

    Joined:
    May 17, 2005
    Messages:
    121
    Because is a AI decision(dont change the build pacth) if it is reasonable, i m thinking in 2 solutions
    give the escort ability to work boats(at least have a galley defending) or make the barbarian ship a trireme(so AI should have trireme too)
     

    Attached Files:

  16. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    trireme vs trireme

    galley vs galley


    where is the difference? :p
     
  17. Yakk

    Yakk Cheftan

    Joined:
    Mar 6, 2006
    Messages:
    1,288
    Trireme just delays the pirate-copolypse.

    I want sea raiders. But a player should, with modest investment, be able to hold off the sea raiders, much like they can hold off barbarians.

    The sea raiders move quicker, and the swarm at whoever is still in the sea (barbarian boats detect your workboats seemingly from the other side of the continent). The local spawn of sea raiders is usually enough to defeat someone's early-game navy (and it shows up before you can really afford to build one), resulting in any navy that is built for a long time being swarmed.

    Even if you use "defender's advantage" (of a mere 10%), you end up having to fall back to cities and heal up, and barbarian boats respawn faster than you can kill them with a reasonable navy size.

    It is only the mixture of triremes and more coast being colonized that the barbarians start falling back, and during that entire time building a fishing boat is economically stupid, as you cannot hold it.

    Meanwhile, there is no actual raiding from the sea, just waves of empty boats and random blockades that interrupt non-road based trade routes.

    Hence:
    Halve the number of boats spawned, by having them spawn with a raider in each boat.

    Reduce both the range and danger of individual boats, by having them lose 10% of their max HP every turn.

    This presumes that barbarian boats know to drop off raiders in civilized territory. But with this, you will have barbarian boats that have limited range from the uncontrolled barbarian coasts and islands, that can be defended against (because your galleys will tend to be stronger), that auto-sink themselves (so they can respawn elsewhere), and if you fail to defend your coasts, you get sea-raiders.
     
  18. Portus

    Portus Warlord

    Joined:
    May 17, 2005
    Messages:
    121
    Yes Cybah, but AvsB is not the main point ... in that case the AI dont build nothing more but work boats, so if the workboats only move if they have a galley escort them is a possibility... or if barbs ship are triremes, give time to AI civs to develop and expand...other solutions could be better ...
     
  19. Ninja2

    Ninja2 Great Engineer

    Joined:
    Nov 17, 2005
    Messages:
    1,142
    Location:
    Denmarkia
    One simple solution would be to create a unique unit, a Barbarian Galley, and give it strength 1. Then only this unit would spawn for the barbs, and not the normal strength 2 galley.
     
  20. oedali

    oedali King

    Joined:
    Apr 6, 2007
    Messages:
    894
    Gender:
    Male
    Location:
    Washington, DC
    I agree that the barbarian galley spawn is a little too much now and comes way too early. It should be delayed and the galley spawning chance should be halved or reduced to 75%

    Other than this, I love Better AI! Keep up the good work
     

Share This Page