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

BBAI speed tweaks vs. CAR mod [merging]

Discussion in 'Civ4 - Better AI' started by embryodead, Oct 12, 2010.

  1. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Hello,
    I'm trying to merge at least parts of BBAI with RFC, which is rather challenging on its own, and it's further complicated by the fact that I previously merged the CAR mod in. Some questions that I have, to whoever is familiar with BBAI code:
    - the danger value caching from CAR made its way into BBAI but it seems vastly expanded - will I get noticeable speed improvement by dropping the CAR system and switching to BBAI's system?
    - CAR's caching of attitude values was discussed at some point apparently, but didn't make it in, just out of curiousity, why?
    TIA,
    e.
     
  2. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Deep recall, but as I remember it seemed there were circumstances where CAR's changes would cause (small) changes in AI behavior. What's in BBAI does not. I never got around to looking at version 0.3 of CAR or whatever the latest is.

    If you're very interested in efficiency, one big improvement came from the Lead from Behind mod ... IIRC, it was changing some checks in a very frequently called function from checking if (# of enemy units) > 0 to a new function checking if there was any enemy unit.

    That's probably the most important speed up for games with lots of units.
     
  3. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Thanks! :) Then I'll just scrap all CAR changes except attitude cache.
     

Share This Page