Author Topic: Thinker Mod v0.5  (Read 261 times)

0 Members and 1 Guest are viewing this topic.

Offline Induktio

Thinker Mod v0.5
« on: August 05, 2018, 05:07:50 PM »
  • Publish
  • Features:
    * New production AI for bases
    * Improved terraforming AI (lots of forests and boreholes, less farms and solar)
    * AI will deploy colony pods much sooner instead of wandering on the map
    * Customizable options for free formers and satellites for AI factions
    * Tech selection is more balanced and ensures AI will research terraforming-related techs
    * Player-run factions or core game mechanics are not affected

    Base production AI features:
    * Rewritten from scratch to allow bigger modifications
    * Builds military units based on the perceived threat from the other factions
    * When there are no threats, builds a lot of facilities and formers
    * Most importantly, tries to avoid running out of minerals because of unit overbuilding
    * Capable of producing and redesigning most kinds of military units (with the exception of missiles)
    * Can build satellites and pressure domes situationally

    To install:
    * Unzip files to game folder
    * Change configuration from thinker.ini
    * Start the game from terranx_mod.exe
    * You will see "Thinker" in the game version menu when it is started correctly

    I've tested this mainly with the original 7 factions. Other factions should work too but there might be some issues with aquatic or alien factions. Multiplayer is untested. It is recommended to play this with the standard GOG version because some of the custom rules parsing for alphax.txt is not implemented yet. Currently tech_balance feature is meant for the standard tech tree. Game crashes shouldn't occur any more frequently than the normal game, according to my testing.

    AI behaviour not mentioned above (diplomacy, military unit movement etc) is not affected by the mod. Note that it is possible to test the old/new AIs side by side if you specify e.g. factions_enabled=4. In that case only the computer factions in the first 4 player slots will use the new AI.

    By default the former/satellite bonuses are set at 4 but even this might be a little excessive. Especially the satellites have quite a big impact on growth rates. It's possible to lower it from config. Former bonuses have much less impact on the gameplay because eventually the AI will build large numbers of them anyway.

    Version 0.5 download
    « Last Edit: August 13, 2018, 03:58:40 PM by Induktio »

    Online bvanevery

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #1 on: August 05, 2018, 06:04:01 PM »
  • Publish
  • I will test!  I'm in the middle of my own test game for my own mod right now, but I will get to it when I'm finished with that.

    I will say up front though, I'm not even slightly in favor of granting the AIs a bunch of free formers or free satellites.  There are lots of ways to give gratuitous resource bonuses to AIs.  That's not really improving AI play, that's doing the same old dumb AI play with more resources.  Lots of 4X TBS games go that route, and personally I think it stinks.  We already do this ourselves playing on Transcend.  I will go so far as to say, when I test your patch, I'm going to set your new bonuses to 0.  It takes a fair amount of time to play a test game and I'm not interested in this.  I want to know what improvements don't give the AIs any gratuitous bonuses.

    I'm mainly intersted in what terraform_ai and production_ai do.

    I'm thinking, factions_enabled means factions that are currently playing this particular game.  7 of them is all of them.  I misunderstood it earlier.

    I don't know what you did for tech_balance.  Is it going to work with a completely modded / gutted tech tree?  I've talked about how to change AI research priorities at the alphax.txt level, by changing the {power, tech, wealth, growth} settings for any given tech.  I realize you may not want to touch alphax.txt at all, for drop-in compatibility with mods that do.

    However, if your approach is to ignore the definitions provided by the mod, that's a problem, because you're changing the game rules in ways that the modder doesn't want.  Those {p, t, w, g} settings define when a tech can be researched, when a focus on Conquer, Discover, Build, or Explore does any good.  Changing those settings, changes whether something is a C#, D#, B#, or E# tech.  The color of the tech's icon changes appropriately.  So for instance, in my mod a lot of Explore techs are now Build techs, because IMO that more accurately reflects what the tech gives you.  Formers are first and foremost a Build technology in my opinion, for instance.  The problem with the unmodded game is the definitions with respect to the Spartans are draconian.  In the real world, they aren't going to discover how to make Formers for a long time.

     

    Offline Induktio

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #2 on: August 05, 2018, 07:30:04 PM »
  • Publish
  • Well, it's not like anybody forces you to play the biggest map sizes if you think testing takes too long. For that matter, player interaction is not even required for the AIs to play against themselves.

    I can clarify the tech_balance formula if anyone is interested in the details though. Normally when the AI calculates tech values either for research or trading, the main value is derived from the formula:

    Code: [Select]
    (Tech.AI_growth + c) * (Faction.AI_growth +1) +
    (Tech.AI_wealth + c) * (Faction.AI_wealth +1) +
    (Tech.AI_tech + c) * (Faction.AI_tech +1) +
    (Tech.AI_power + c) * (Faction.AI_power +1)

    In the original game, c constant doesn't exist which can be interpreted as c=0 here. Note that the formula is not the final value because lots of other modifiers are applied afterwards too. When tech_balance is activated it becomes c=1 for all techs except ones that are given special priority which have c=2. These techs are:

    Code: [Select]
    Ecology, Indust, IndEcon, InfNet, PlaNets, IndAuto, Biogen, Gene, EcoEng, EnvEcon
    So in addition to formers, that includes all the resource-lifting techs and the path to Industrial Automation.

    Online bvanevery

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #3 on: August 05, 2018, 08:06:49 PM »
  • Publish
  • Well, it's not like anybody forces you to play the biggest map sizes if you think testing takes too long.

    Smaller map sizes still take awhile to play, like 8+ hours, which is a lot of testing time committment.  At least, takes awhile to play full games.  Sometimes results or non-results become apparent in early game.  The real problem is that all of my sense of "reasonable progress and performance" is calibrated against larger maps, at least Huge size.  The Standard map is a trivial game IMO.  Anyone near you is gonna die.  So unless your AI completely reversed that, I wouldn't even learn anything about AI performance from a Standard sized map.

    Quote
    For that matter, player interaction is not even required for the AIs to play against themselves.

    It is required for knowing whether the AI performs reasonably against human expectation.  If 7 AIs play each other, none of the AIs are going to tell each other, "Hey, you suck!  You play really badly!"  They'll just keep whomping on each other until someone wins, or far more likely, until the system reaches a steady state of stalemate.

    Quote
    the main value is derived from the formula:

    Ok, helpful to know that.  A linear combination ("dot product") of tech definition and faction interest.  Although I'm surprised at the faction +1 offset.  It implies that maybe I could give a faction a -1 interest in something, creating a net sum of 0 and completely discarding a tech category as interesting.  I'm not seeing a good reason to do that in the real world, so I'll refrain from experimenting there.

    Quote
    Note that the formula is not the final value because lots of other modifiers are applied afterwards too.

    I wonder what those are, or if I'd even want to know.

    Quote
    When tech_balance is activated it becomes c=1 for all techs except ones that are given special priority which have c=2.

    You're basically vetoing anything that was defined as category = zero weight.  For instance all techs that were not Discover techs, you've now made mildly Discover techs, with a value of 1.  You are hugely changing the game rules here.  I will go so far as to say your approach is fundamentally incompatible with my mod.  I just did 3 months of full time work to cleanly separate Explore, Discover, Build, and Conquer implications from each other, to the degree that they should be logically separated.  You're throwing this out the window and saying the player can research basically anything, just because you want Formers to happen properly for the Spartans.  Definitely an overreach.  When I test, I'm afraid I'll have to turn this feature off and refuse to help you with working on it.  I can only suggest / implore that you find another way to address problems.

    Quote
    These techs are: Ecology, Indust, IndEcon, InfNet, PlaNets, IndAuto, Biogen, Gene, EcoEng, EnvEcon

    Which don't even mean the same things in my mod as in the original game.  I have huge differences in what those things are purposed for.  Your approach is basically not compatible with any substantial alphax.txt mod.

    If you want to change the meaning of what these particular techs do, please just ship your own alphax.txt.  Document why you're doing so, and what changes you made.  If you're solving issues that other modders have already solved in other ways, they can just throw out your alphax.txt and use their solutions.

    Alternately, if your intent is only to affect the original rules, you could detect the original rules somehow, and only activate your changes if they're in effect.  I still don't think this is a good idea for reasons of original design intent, transparency, and maintenance, but at least you wouldn't be messing other modders up.

    Please consider the merits or demerits of the following formulation instead:

    Code: [Select]
    c * (
    Tech.AI_growth * (Faction.AI_growth +1) +
    Tech.AI_wealth * (Faction.AI_wealth +1) +
    Tech.AI_tech * (Faction.AI_tech +1) +
    Tech.AI_power * (Faction.AI_power +1)
    )

    This respects the categories that a modder has assigned, i.e. something is not a Discover tech.  You could make a tech more apparently valuable or researchable, but only in the terms it's already defined as.  This may not solve the Spartan Former problem as that faction only cares about Discover and Conquer.  I'm not sure what the weights would add up to, under this system I propose.  But perhaps this less invasive approach will help you with other things you think are problems.  I just really can't have you overriding the 0s I deliberately put all over the place.
    « Last Edit: August 05, 2018, 09:42:54 PM by bvanevery »

    Offline Induktio

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #4 on: August 06, 2018, 10:08:08 AM »
  • Publish
  • Quote
    You're basically vetoing anything that was defined as category = zero weight.  For instance all techs that were not Discover techs, you've now made mildly Discover techs, with a value of 1.  You are hugely changing the game rules here.

    After thinking about this for a while, I must say these kind of statements cross into hyberbole. When considering AI behaviour, it must interpret the tech meta information somehow and make decisions based on it. Everybody can agree there's significant problems in how the base AI handles some research situations. Some kind of fix needs to be applied there - I just don't consider it to be changing game mechanics in the general sense, but it does change AI behaviour for sure.

    Then again, there's no reason to get stuck with one kind of solution. The formula you suggested also could have a large impact on which techs the AI chooses, it all depends on the relative weights of priority/non-priority techs. Absolute values are meaningless in the sense that the tech values are compared against each other. I double-checked the faction+1 weightings and they indeed exists in the base game. The other modifiers applied afterwards include dozens of conditional checks which are too numerous to recount here. Right now the balancing is meant for the standard tech tree because there's no custom rules parsing for most tech effects.

    Online bvanevery

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #5 on: August 06, 2018, 10:57:07 AM »
  • Publish
  • A zero is a zero is a zero.  You are cancelling the design choice of making something unavailable in an area of research focus.  The zeros are the barriers, the walls in the 4-track race course.  It is the terrain.  The zeros are in the original game for various reasons.  I've got completely different zeros in my mod for different reasons.

    c * (formula) is not the ideal way to deal with any of this.  I suggested it to try to get you thinking in a needed direction.  I hoped you would arrive at better realizations than that.

    Let me put objections another way.  You are hardwiring your interpretation of the tech tree into the binary.  It's not the original game.  It overrides anyone else's mod of the tech tree as well.  You're hardwiring things that generally speaking, people handle by changing alphax.txt.

    Offline Induktio

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #6 on: August 06, 2018, 11:56:48 AM »
  • Publish
  • I don't think you really mean it when suggesting I should rely on the features in some particular alphax.txt. That is not portable to other mods which might provide their own entirely different alphax.txt files. It's something to avoid if I'd want this patch to work with other mods.

    The thing is we need a more general solution than that. There needs to be some kind of readjustment of the research priorities or else the AI in many cases will suffer. Just leaving it as it is and expect it to work in the base game doesn't work. Now whether you want to describe which are acceptable designs is up to you. If there are multiple good choices for the user, that's what the configuration file is for.

    Online bvanevery

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #7 on: August 06, 2018, 04:13:59 PM »
  • Publish
  • What we need is a packaging system so that other people's mods can live in peace, switching alphax.txt as needed.  When you hardwire the tech tree data, you are not helping anyone but yourself.

    The result that is problematic, is when the product of faction research priorities and tech availability definition, results in zero or something "Spartan low" (I suspect zero), and the ablities granted are critical to faction growth at some point in the game.

    You made a list of techs you think are important enough to deal with in this way:  Ecology, Indust, IndEcon, InfNet, PlaNets, IndAuto, Biogen, Gene, EcoEng, EnvEcon.  The only one I agree with you on is Ecology.  It super duper hangs up the Spartans.  I could see you hardwiring an intervention about this one tech.  You would not change the way all {p, t, w, g} values are interpreted just for this one problem.

    If you want to be in the business of changing the weights on 10 techs, because you don't think it's set up for the AI to handle them all that well, you should be modding alphax.txt, same as anyone else.  I don't need you to change those other 9.  The original game doesn't need you to change those other 9.  I have more than a year's worth of AARs played with the original game.  Nowhere have I seen those other 9 be faction cripplers.  Factions have different research priorities because they're supposed to.  There isn't a one true tech path style for playing the game.

    Your approach of inserting +c, and having c=1 by default for every tech in the game, is wrong.  You have changed the meaning of every tech in the game, destroying separation of research category, for no reason.  Your default should be c=0, no change.  You should only be raising it for the techs you're interested in.  And that's still a different kind of wrong, as I just said.  Your adjustment to 10 techs is not needed.  Only 1 you listed is critical.

    « Last Edit: August 06, 2018, 04:51:04 PM by bvanevery »

    Offline Induktio

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #8 on: August 06, 2018, 10:59:48 PM »
  • Publish
  • Everyone is entitled to an opinion of course. But if you don't consider any changes acceptable, then the configuration options are available for a reason. The final behaviour is still an entirely undecided issue and requires consideration of some factors that have not been covered yet. Some of the weights might even depend on a particular situation, not just the techs. But until that is known more clearly, it's pointless to argue whether there should any changes at all.

    Online bvanevery

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #9 on: August 07, 2018, 12:48:00 AM »
  • Publish
  • But if you don't consider any changes acceptable,

    That's a strawman.  I've been pretty detailed about what's acceptable and what isn't.  I'm going to unsubscribe from your thread now.  I hope in a month or so, you've thought some of these maintenance, compatibility, and default behavior issues through.  I think right now you don't like my feedback, and your ego is getting in the way of what should be basic engineering judgment to Do The Right Thing.  Since on another thread you mentioned open sourcing your code, I have some hope that you have enough open source culture in your development DNA, that you will think about the community issues eventually.  Right now you seem very focused on problems immediately in front of you, and not whether your work or anyone else's work is going to last for another 20 years.

    Offline PvtHudson

    Re: Thinker AI Mod (Alien Crossfire)
    « Reply #10 on: August 07, 2018, 06:53:44 AM »
  • Publish
  • Hi Induktio, thank you for your work to make this old diamond of a game even shinier. I don't want to take sides in this, ugh, fruitful conversation with bvanevery - he's as quarrelsome as ever. Just note, that the problem of no-formers faction stagnation has simple solution, to remove tech prereq from Terraforming Unit "weapon" and Formers predesigned unit in alphax.txt. Also I doubt other techs from your list have universal value for all factions. Beelining to IndAuto is clearly undesirable, for example, for non-isolated momentum faction. Hope, other modifiers cover this case. Of all techs the only critical for faction survival, in my opinion, is Non-Linear Math, and even this only for non native-heavy factions. I'm certainly try your mod and report observations, if I'll notice something worth.

    Offline Induktio

    Re: Thinker Mod v0.5 (obsolete)
    « Reply #11 on: August 07, 2018, 09:17:17 PM »
  • Publish
  • Right now this thread has been derailed to the extent it obscures what this mod is even about, like for example the vast majority of the code deals with the base production and terraforming instead. Continuing about the tech values here is a side issue and that already has many changes planned. You're right about beelining to IndAuto, it does not benefit the AI much the way it currently works.

    In the future, a new thread will be created to discuss any updates. This thread might as well be locked.

     

    * User

    Welcome, Guest. Please login or register.
    Did you miss your activation email?


    Login with username, password and session length

    Select language:

    * Community poll

    SMAC v.4 SMAX v.2 (or previous versions)
    -=-
    14 (6%)
    XP Compatibility patch
    -=-
    8 (3%)
    Gog version for Windows
    -=-
    58 (25%)
    Scient (unofficial) patch
    -=-
    22 (9%)
    Kyrub's latest patch
    -=-
    14 (6%)
    Yitzi's latest patch
    -=-
    83 (36%)
    AC for Mac
    -=-
    2 (0%)
    AC for Linux
    -=-
    5 (2%)
    Gog version for Mac
    -=-
    9 (3%)
    No patch
    -=-
    11 (4%)
    Total Members Voted: 226
    AC2 Wiki Logo

    * Random quote

    I saw the alien phalanx coming toward us, and I calmed my mind as Kri'lan had taught me. And what I saw next to the phalanx was a shadow regiment, half-formed from the resonance around them. I cursed the aliens... with power like that, each one could fight as many, and I thanked Planet for sending us the betrayer.
    ~Prophet Cha Dawn 'The Betrayer and I'

    * Select your theme

    *

    Facebook Comments