Author Topic: SMACX Thinker Mod  (Read 10132 times)

0 Members and 1 Guest are viewing this topic.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #270 on: March 21, 2019, 09:32:13 PM »
  • Publish
  • Unspent energy is indeed a huge opportunity cost. Now with the increased AI productivity, the reserves can even reach hilariously high levels (many thousands). Without rushing the only major way for the AI to spend them was usually mind controlling bases. Up until now, I kind of wanted to see how far we can push this AI with organic growth, but credit rushing should be added at this point. Probably I'll still make it an opt-out configuration option.

    So looks like the consensus is that it should be mostly used on new bases. That sounds good and probably we should make rushing recycling tanks a priority too. To a very significant degree, it seems to help the AI overcome some early nutrient/mineral obstacles. Later in the game the AI should probably maintain some reserves so that it can occasionally mind control some bases, but I wouldn't save too much credits for that. Hopefully the formulas here are correct though: http://alphacentauri2.info/wiki/Hurry

    Offline T-hawk

    Re: SMACX Thinker Mod
    « Reply #271 on: March 22, 2019, 02:21:18 AM »
  • Publish
  • Those formulas are correct, yes.  (Would you end up reimplementing them, rather than calling the existing hurry function for the AIs?)

    There's also the question of whether to partial-rush the item, just enough to complete it with the base's mineral production this turn.  That's generally more efficient since those last few minerals have no effect until completion of the next build item.  It is vulnerable to the base's mineral production changing somehow before the next turn, either from the faction's own terraforming or swapping tiles, or from an opponent doing something.

    Offline dino

    Re: SMACX Thinker Mod
    « Reply #272 on: March 22, 2019, 08:24:15 AM »
  • Publish
  • It's most efficient most of the time, but:

    * If you don't rush in full psych facility in a rioting base, it won't get built.
    * In mid/late game I am often capable of rushing, units, satellites, or essential stuff in a fresh small base for many turns in a row, thanks to overflowing, but limiting overflow to 10 in most cases is beneficial. Exception being serial rushing of units in late game, when the more overflow, the cheaper next unit rush.
    * If you have a doctor in a base without psych % bonus facilities and you rush colony pod in full, you can put this doctor to work and colony pod will be built without riot.
    * It's often the case in a fresh base, that next production item will also qualify for rushing, so overflow will allow this one turn earlier.
    * Fungus pop, enemy, or border change may delay essential unit rush in a threatened base ( if purposefully rushing units in threatened base can be implemented ).
    * In a small base, that for whatever reason ends up with 1, or 0 minerals output, partial rushing up to first 10 minerals, of recycling tanks, crawler, or a unit in a threatened base , to finish the rush next turn is something that surprisingly often happens to me.

    So there are many intricate ways, in which it can be optimised, as the most essential I'd choose:
    1) In early game rush just enough to finish, with exception being, always rush in full psych facilities, colony pods. In mid game, always overflow 10 minerals.
    2) Partially rush up to 10 minerals crawler/recycling tanks if the base has less than 2 minerals output. Overflow up to 10 minerals in bases with less than 2 minerals output even in early game.
    « Last Edit: March 23, 2019, 08:04:29 AM by dino »

    Offline dino

    Re: SMACX Thinker Mod
    « Reply #273 on: March 23, 2019, 11:34:58 AM »
  • Publish
  • I'd also implement SP rushing with crawlers, since it should be easy to do:

    1) If there is SP in production, multiply probability of crawler production in other bases.
    2) When crawler is built, give it percentage chance proportional to multiplier from point 1) to go to nearest base with SP in production and add to it.
    This way usual crawler deployment will be statistically unaffected by SP crawlers.

    Benefits:
    Resources accumulated for SP will provide return faster. AIs will start and abandon less SP, less resources wasted.
    If at some point thinker will be so good, that we will want to play with increased cost_factor, it will be necessary for AI to compete with player for SPs this way.

    ***
    I've made one observations regarding diplomacy AI and avoiding conflict.
    If AI has vendetta with someone we have pact with ( sometimes treaty is enough ), it can go into a state where every contact is either instant vendetta, or demand to betray our ally and vendetta if we refuse.
    Issue is when AI is in this state, it usually refuses to make contact with us and vendetta happens only if our units meet at the border, so it's easy to avoid.
    Sometimes AI refuses to make treaty with us on early meeting and refuse any contact later, it's often in a simillar state then.

    So my idea is:
    If our military score used to make faction ranking is 2x smaller then ai and it has only truce with us, or has vendetta with our ally, force contact every 3-4 turns.
    It should result in either vendetta, or barrage of demands for free money and tech. It potentially could make running first 100 turns with just 3 scouts, either costly, or stright up impossible.
    I would make it opt in feature, since unaware player wouldn't know how to make them go away.

    That said, I proposed it only because it should be possible to implement without disassembling inner workings of diplomacy code.
    Otherwise, I think improvements to combat AI are much more important at this stage, and this code seems to be already worked on by you.
    So, I'll start sharing my ideas for combat AI improvements, once thinker build with money (and crawler?), rushing is out.
    I also put on hold playing the game, since money rushing update is imo huge game changer and I want to spend more time with it once it's out, instead of current build.
    « Last Edit: March 23, 2019, 06:55:02 PM by dino »

    Offline Induktio

    Re: SMACX Thinker Mod
    « Reply #274 on: March 23, 2019, 05:45:35 PM »
  • Publish
  • Those formulas are correct, yes.  (Would you end up reimplementing them, rather than calling the existing hurry function for the AIs?)

    There's also the question of whether to partial-rush the item, just enough to complete it with the base's mineral production this turn. 

    Looks like in the game binary unit hurry cost is calculated in this form M*M/20 + 2*M. Because the code uses integers, it becomes obvious one cannot first calculate M/20 without massive rounding errors. The other thing that wasn't mentioned is that some factions have HURRY cost modifier. Only some custom factions seem to have it and it is just a simple linear multiplier.

    This kind of stuff is usually mixed with the GUI code or coupled with some other logic, so one cannot easily reuse these functions. Production rushing is basically just incrementing accumulated minerals and decrementing energy reserves, so that part is easy to do.

    At this point I don't see much additional benefit in implementing partial rushing. Production carries over up to 10 minerals and usually these items are rushed in bases producing less than that. Currently the code is set to never rush until 10 minerals are accumulated, and always do a full rush when deciding to do any. There might be some situations when a partial rush first might be needed though. Sometimes the bases might get stuck in a drone riot loop if the default doctor allocation doesn't work correctly. It seems to cause significant problems when the allocation doesn't anticipate drone riots at all.
    « Last Edit: March 23, 2019, 06:00:47 PM by Induktio »

    Offline Induktio

    Re: SMACX Thinker Mod
    « Reply #275 on: March 26, 2019, 06:52:56 PM »
  • Publish
  • Looks like it's time for a new build. Version 20190326 is now available from downloads. Changes include:

    * New parameter: hurry_items allows AI to use energy reserves to hurry production
    * Major adjustments to faction_placement to improve starting locations
    * Faction placement now creates two extra nutrient resources for each land-based faction
    * Fix spawning issues on Map of Planet
    * Fix sea colony pods sometimes freezing in place
    * Fix sea bases sometimes not building enough transports
    * Rebalancing of social_ai priorities

    From testing, it looks like hurry_items will improve AIs to a moderate degree but it seems the effect will not be very large. If you sometimes spot from inflitration an AI base where the mineral box is exactly full, that usually means production was rushed. Other than that, it will not give players any other indication rushing was used. Most of the time it tends to do small rushes which cost less than 40 credits so the reserves can still keep accumulating. This update will not include any changes to diplomacy, the variables there are not really mapped so it would be difficult to make any changes.

    These are the items the AI is currently allowed to rush when the situational conditions for hurrying are met: recycling tanks, pressure dome, drone control buildings, creches, perimeter defense, aerospace complex, formers, and (only rarely) combat units.


    Offline dino

    Re: SMACX Thinker Mod
    « Reply #276 on: March 26, 2019, 07:52:52 PM »
  • Publish
  • Two nutrient resources shouldn't be hidden under faction placement. User should be aware of it and it should be a separate opt in setting imo. Maybe take 0,1,2 values as a number of nutrients.

    I'd be interested in having it as an ai only buff if possible. Buffs that help early, but are irrelevant midgame are potentially good, since early game is a period when player outperfom ai the most.
    In a current form when I also get this, I feel ambivalent, if I had an option to choose, I'd pick zero, or one nutrient, makes early game predictable.

    Offline Induktio

    Re: SMACX Thinker Mod
    « Reply #277 on: March 26, 2019, 08:27:16 PM »
  • Publish
  • Sure, it's possible to make the bonuses an AI-only option and/or be adjustable in number with config settings for each. Generally I would avoid placing any more stuff in the config than we have to, so users wont get lost in the details. Is this necessarily the best way to give another AI-only buff? I'm not sure yet, but it might be changed before the next release.

    Offline dino

    Re: SMACX Thinker Mod
    « Reply #278 on: March 27, 2019, 08:12:25 AM »
  • Publish
  • I wonder if nutrient + monolith wouldn't be more useful, monolith would bump production, energy and improve early units. Guaranteed 2 energy would help hive get early tech in time.

    To not bloat config with new variable, I'd skip making it adjustable in number and suggest faction_placement:
    0 - vanilla placement
    1 - new placement
    2 - new placement + resources
    3 - new placement + resources only for ai
    « Last Edit: March 27, 2019, 12:25:52 PM by dino »

    Online bvanevery

    • Emperor of the Tanks
    • Librarian
    • *
    • Posts: 3210
    • €210
    • View Inventory
    • Send /Gift
    • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
    • Planning for the next 20 years of SMACX.
    • AC Text modder Author of at least one AAR
      • View Profile
      • Awards
    Re: SMACX Thinker Mod
    « Reply #279 on: March 28, 2019, 01:20:27 AM »
  • Publish
  • Two nutrient resources shouldn't be hidden under faction placement. User should be aware of it and it should be a separate opt in setting imo. Maybe take 0,1,2 values as a number of nutrients.

    Although I agree that being able to turn it off is a desirable feature, I'm actually going to uncharacteristically side with Induktio's decision here.  I think he should actually retain his "two nutrient" idea as the default, unless and until he decides from play testing, that it's not a good idea for some reason and he should do otherwise.

    Why?

    I started a thread about possibly giving all factions 4 Colonists to start with.  I have noticed that the stock AI and Thinker AI (that I've tested) make bad decisions about early colonization.  When one of those decisions is delaying your 2nd colony pod's settlement for 13 years, you end up with a stillborn AI empire that loses the game.  It's quite noticeable.  I've seen what's most likely the effect of this in quite a number of test games, and recently I demonstrated the cause of this in one of my Thinker test games.

    A similar problem is blithely walking across fungus with a colony pod.  For a non-PLANET faction, at a minimum it delays settlement due to the inevitable movement delays when walking across fungus.  At a maximum, it gets the colonist killed.  None of this is good for AI spreading at the beginning of the game.  It makes for stark differences in faction performance down the road.

    Changes which stabilize the initial environment for factions, are to the good.  A nutrient is a way of stabilizing, it ensures that the faction start position isn't hopeless.  These AIs are too dumb to get from 1 city to 2 cities to 4 cities reliably.  Random stuff happens that can throw the whole game for some faction.  My "4 colonists" idea is about trying to skip this tiny initial portion of the game.  You could still move 4 colonists badly and get them killed, and I'm sure Induktio's AI code will continue to improve and make this important part of the game safer for colonists.  But until he's got some solution that's bulletproof, verified by extensive testing by many players, giving a couple free nutrients sounds like a good idea to me.

    I mean, I pop my local pods trying to get those nutrients anyways.  So that I can settle on or near them, depending on whether they are Flat or Rolling.  Why not give the AI the same sense that I've got, in a less intelligent way?

    Online bvanevery

    • Emperor of the Tanks
    • Librarian
    • *
    • Posts: 3210
    • €210
    • View Inventory
    • Send /Gift
    • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
    • Planning for the next 20 years of SMACX.
    • AC Text modder Author of at least one AAR
      • View Profile
      • Awards
    Re: SMACX Thinker Mod
    « Reply #280 on: March 28, 2019, 01:36:03 AM »
  • Publish
  • To not bloat config with new variable,

    I say that's a non-goal.  This is 2019.  .ini files can afford the storage space, CPUs can afford the processing time.  All that really matters is intentions are clear to the player.  I don't see why the placement of factions, should be compounded with what resources are given at the placement site.  I'd just make another variable for that.  I think linguistically named variables, are clearer than sequences of magic numbers with comments describing the magic numbers.  Probably less error prone too.

    Offline Induktio

    Re: SMACX Thinker Mod
    « Reply #281 on: March 28, 2019, 02:37:56 PM »
  • Publish
  • Generally the early colonization part with Thinker works pretty well, but there are some specific map layouts or situations where the colony pods get stuck on some bottleneck area or keep forgetting their move orders. That's maybe the only significant bug in the current version that I can think of. There are probably some ways it can be fixed before the next release but we'll see.

    With the starting bonuses I think it should be a nutrient+forest because then the forest can start spreading and improve the area even more. I agree it should be a configuration option because it makes sense to make it an AI-only bonus by default (but adjustable from config).

    Online bvanevery

    • Emperor of the Tanks
    • Librarian
    • *
    • Posts: 3210
    • €210
    • View Inventory
    • Send /Gift
    • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
    • Planning for the next 20 years of SMACX.
    • AC Text modder Author of at least one AAR
      • View Profile
      • Awards
    Re: SMACX Thinker Mod
    « Reply #282 on: March 28, 2019, 03:28:48 PM »
  • Publish
  • With the starting bonuses I think it should be a nutrient+forest because then the forest can start spreading and improve the area even more.

    It solves a gamist problem, but from a narrative and simulationist standpoint it's not a good idea.  The drama of planting your own trees on new virgin land is violated.  There is no reason that trees should just magically appear on Planet without your action.  One might even argue that from a gamist standpoint, some player might not want trees, if for instance they are PLANET friendly and like moving on fungus.  Or if a player wants trees, they might want to choose very carefully where they put them for tactical reasons.

    You have a problem with the 2 nutrient bonuses.  The Caretakers and Usurpers don't get them, presumably because they are placed later on the map in an ad hoc manner.  I expect the Cult of Planet to suffer from the same problem.  Any of these factions are put at a disadvantage compared to the factions that get the free nutrients.  In the Pirate test game I just started, the Caretakers are crippled by a bad start.

    The Pirates also don't get the 2 nutrient bonus.  It just isn't a problem because they have lots of food anyways.

    Offline dino

    Re: SMACX Thinker Mod
    « Reply #283 on: March 28, 2019, 03:47:25 PM »
  • Publish
  • Forest + nutrient: 321 indeed a perfect tile for a starting base.

    I've currently returned to playing crossfire with original 7 and a mod that makes alien branch of tech tree optional and unavailable when there is no aliens in the game.
    Can't decide between this and smac mod.

    Three notices from playing no expansion mode:
    1) It still plays crossfire opening movie instead of original, Ytzi version of no expansion mode had it covered.
    2) Could smac mod use smac interface graphics ? It could read smac versions renamed to smax from ac_mod folder, like it does with txt files.
    console_A.pcx
    console_x_a.pcx
    console_x2_a.pcx
    console2_A.pcx
    iface_down_A.pcx
    iface_down2_A.pcx
    iface_up_A.pcx
    iface_up2_A.pcx
    xopeninga.pcx
    xopeningb.pcx
    3) Potential user of SMAC mod will still want changes in alphax.txt, like worldbuilder and global warming.
        Wouldn't it be simplier to just include the smac mod with adjustments in thinker releases ?

    Offline dino

    Re: SMACX Thinker Mod
    « Reply #284 on: March 29, 2019, 09:18:15 AM »
  • Publish
  • When searching for a solution for a Spartan visual glitch I had. I've ended up reimplementing my mods from scratch and forgot about tech research weight I had.
    So I've got vanilla weights and relied only in what you gave in tech_balance=1 and it was a disaster compared to my previous games.

    +2 to weights is not enough, many essential techs still have less weight than the ones related to ai focuses.

    I play with tech stagnation, dense rainfall, low erosive forces.
    In my previous games in 2170s most bases worked only improved terrain and half of the factions started to deploy crawlers and build boreholes.
    With vanilla weights + tech_balance=1 in 2160s half of the factions didn't start to terraform at all, no boreholes in development, no crawlers, but Deidre is an industrial powerhouse obviously.

    I had it well though out, so there was a bit of variance between factions, but I forgot the exact changes, but it was roughly something like this:
    Centauri Ecology,              4, 4, 5, 6,
    Biogenetics,                      4, 5, 4, 4,
    Industrial Base,                4, 3, 5, 3,
    Information Networks,      3, 5, 3, 3,
    Planetary Networks,         3, 5, 4, 3,
    Social Psych,                     2, 3, 5, 4,
    Applied Physics,                5, 3, 2, 3,
    Nonlinear Mathematics,    6, 4, 3, 4,
    Ethical Calculus,                3, 4, 5, 5,
    Industrial Economics,        3, 3, 5, 4,
    Industrial Automation,       4, 4, 6, 5,
    Gene Splicing,                    3, 4, 6, 5,
    Environmental Economics, 3, 3, 6, 5,
    Ecological Engineering,      4, 4, 6, 5,

    It gets them complete economy and basic defenses with 4-2 units. From there I left them to play with vanilla weights.
    « Last Edit: March 29, 2019, 02:01:21 PM by dino »

     

    * 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)
    -=-
    16 (6%)
    XP Compatibility patch
    -=-
    8 (3%)
    Gog version for Windows
    -=-
    66 (27%)
    Scient (unofficial) patch
    -=-
    24 (10%)
    Kyrub's latest patch
    -=-
    14 (5%)
    Yitzi's latest patch
    -=-
    83 (34%)
    AC for Mac
    -=-
    2 (0%)
    AC for Linux
    -=-
    5 (2%)
    Gog version for Mac
    -=-
    10 (4%)
    No patch
    -=-
    11 (4%)
    Total Members Voted: 239
    AC2 Wiki Logo

    * Random quote

    Mary had a little lamb
    Little lamb little lamb
    Mary had a little lamb
    Whose fleece was white as snow.
    ~Assassins' Redoubt, final transmission

    * Select your theme

    *

    Facebook Comments