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

Manipulating AI Tech Research

Discussion in 'Civ3 - Creation & Customization' started by Ozymandias, May 11, 2020.

  1. Ozymandias

    Ozymandias I saw the Great Library burn.

    Joined:
    Nov 5, 2001
    Messages:
    9,369
    Gender:
    Male
    Location:
    The lone and level sands
    I've often wanted to manipulate the AI's choice in what Tech to research next, and (plainly) "Flavors" don't do the trick. A simple example which I'm working with in Terra Fantasia is to "lure" each of the four equivalents of flavors down certain paths.

    Anyone here who's done some modding (is there anyone who hasn't?) has already - partially correctly - surmised that this involves using Techs not required for Era advancement.

    What I've worked out covers both that method, as well as forcing certain Civs to research certain Techs in a specific order. To be clear, this is probably most useful when a Tech tree branches (let's keep it simple, for explanation) into a choice of 2 different Techs, with each of those leading to another, single Tech. You'll also see how this can be used in more complex fashions, but here are the basics.

    Long ago, a fellow called Alexman derived the point value which the AI assigns to each attribute for a Tech, and then goes with the highest number.

    Here's the list:
    • SS Component: 261/turns
    • Government: 259/turns
    • Conscription: 259/turns
    • Mobilization: 259/turns
    • Defender (no resource): 198
    • Attacker (no resource): 134
    • No trade: 149/turns
    • Defender (resource reqd): 70
    • Naval Transport: 34
    • Resource (lux, strat, bonus): 16
    • Double Worker Speed: 8
    • Allows Diplomats: 8
    • MPPs: 8
    • ROPs: 8
    • Alliances: 8
    • Embargoes: 8
    • Trade Over Ocean: 8
    • Attacker (resource reqd): 6
    • Wonder: 6
    • Irrigation: 4
    • No Disease: 4
    • Trade Over Sea: 4
    • Bridges: 2
    • Double Wealth: 2
    • Map Trades: 2
    • Communications Trade: 2
    • Small Wonder: 2
    • Specialist: 2
    • Unit (no A/D/NT): 2
    • Improvement: 2
    • Other tech: 1
    • Recycling: 1
    • Prec. Bombing: 1
    • Worker Job: 1
    • Bonus Tech: 0
    • Reveal Map: 0
    • Sacrifices: 0
    • Empty Tech Cost: 256/turns
    • Optional: divide by 1.5
    - And, no, I have no idea at all, what the last "Optional" point means. Aside from getting getting into complex math with small numbers, two significant methods jump out:
    1. Give the Civ a Defender unit, which requires a resource, and which only it can build - 70 Points. Make up a Resource - "Unobtaineum" - and stick it someplace on the map which is utterly inaccessible.
    2. Enable the "Space Race" victory condition - and make certain that there's one, or more, less parts available than to actually be able to build the ship. (As the Player would never build any of those parts, the game would never be interrupted by any spaceship building graphics.) Yes, this gives the Player an obvious advantage, but it can be quite minor, especially if, e.g., those Space Ship parts cost (again, for example's sake) 10 build points.
    Plainly, there are many other possible options here, but I'm hoping that this is a good start.
     
    Last edited: May 12, 2020
    md4 and Civinator like this.
  2. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    6,374
    Gender:
    Male
    Ozzy, that´s an interesting post. Alexman (Alex Mantzaris) later beame the lead designer of the Civ IV expansion 'Beyond the Sword'. Do you still have a link to his post?
     
  3. Ozymandias

    Ozymandias I saw the Great Library burn.

    Joined:
    Nov 5, 2001
    Messages:
    9,369
    Gender:
    Male
    Location:
    The lone and level sands
  4. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    6,374
    Gender:
    Male
    Ozzy, thank you very much! Even the ruins of the Great Library hold some interesting surprises. :)

    I think optional techs are techs, that are not required for era advancement.
     
  5. tjs282

    tjs282 Socially isolated since 1975

    Joined:
    May 19, 2009
    Messages:
    2,900
    Gender:
    Male
    Location:
    ...just here for the job/ handouts/ woman
    Yes, I was going to post this.
    As I understood Alexman's thread (when I read it, a long time time ago), the value that the AI assigns to any given tech that it can research next, is still basically just a weighting-factor for a pRNG dice-roll: the tech with the highest score is most likely to be chosen as the next target, but that's not a given.

    i.e. just like :spear: can happen occasionally during combat, (I believe) the AI will still sometimes go for a lower-value tech, e.g. you'll very occasionally see AI-Civs (and not just SCI-Civs) getting Steam — or even Medicine — before Nationalism during the early Industrial era in the epic-game.

    AFAIK, Flavours can add weight to a tech's value, but once it knows the ones with its favourite Flavour(s), the AI will still research techs with its less-favoured Flavour(s).
     
  6. Ozymandias

    Ozymandias I saw the Great Library burn.

    Joined:
    Nov 5, 2001
    Messages:
    9,369
    Gender:
    Male
    Location:
    The lone and level sands
    In Post 24 of the thread, Alexman acknowledges the RNG: "Of course even with the random factor, techs with higher value were chosen more often, given enough tests." I'd take that a step further. Imagine 2 Civs, "A" & "B", each given a choice between 2 Techs, "1" & "2" -
    • Tech 1 offers an "imaginary" Defender, which is only available to Civ A and requires a Resource to build: 70 build points. It also allows a new Improvement to be built: 2 build points.
      • The Value of Tech 1 to Civ A is 72 points.
      • The Value of Tech 1 to Civ B is 2 points.
    • Similarly, Tech 2 offers an real Defender, which is only available to Civ B and likewise requires a Resource to build: 70 build points. It also allows a different, new Improvement to be built: 2 build points.
      • The Value of Tech 2 to Civ A is 2 points.
      • The Value of Tech 2 to Civ B is 72 points.
    Do we really think a RNG will have any discernible effect over a 70 point spread?

    (BTW 2 clarifications after re-reading the the thread. First: the real point value for each item listed takes into account the number of turns that it takes to research those technologies; see Post 12. Second, yes: "Optional" does refer to a Tech which is not required for Era advancement.)
    Sadly - No. Here is the heart of combat in the game: the chances of a Unit's AF vs. another Unit's DF, in one round of combat:

    Civ3 Combat Results Table.jpg

    As yo can see, an AF of "1" vs. a DF of 54 (the highest value Defender in the game, with all possible modifiers) is (for me, anyway) an appalling 2%. (I've forgotten where the tables came from, so I've re-upped the complete package, in the "Civ3 - Tutorials, Reference, & GuidesCiv3 - Tutorials, Reference, & Guides" section.)

    Apologies again for not recalling where this particular number comes from, but I'm 99% certain that the effect of a Flavor is 5%.
     
  7. Virote_Considon

    Virote_Considon The Great Dictator

    Joined:
    Jul 7, 2004
    Messages:
    9,341
    Location:
    Skaville UK Reputation: 1
    Perhaps this dusty old thread, started by a very wise man, shall refresh everyone's memory on flavours?
     

Share This Page