Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => The Theory of Everything => Topic started by: Induktio on August 20, 2018, 10:44:45 AM

Title: SMACX Thinker Mod
Post by: Induktio on August 20, 2018, 10:44:45 AM
Thinker (https://github.com/induktio/thinker) is an AI improvement patch for Alien Crossfire that greatly boosts the stock AIs while providing various gameplay improvements.

Summary of main features:

* New production AI for bases (more sensible and balanced production choices)
* Improved terraforming AI (lots of condenser-farms, boreholes and forests)
* Rewritten code for AI faction social engineering choices
* AI builds more crawlers and deploys them better
* AI will deploy colony pods much sooner instead of wandering on the map
* Unit auto design feature creates improved prototypes for the AIs
* Customizable options for free formers and satellites for AI factions
* Possible to select which landmarks are placed on random maps
* Faction placement balances random map starting locations
* Does not affect player-run factions or game mechanics
* Game binary includes Scient's patch v2.0

Installation:

* Extract the files to game folder
* Check the readme for release notes
* Change configuration from thinker.ini or use the defaults
* Bundled alphax.txt includes optional/recommended changes only
* Start the game from terranx_mod.exe
* Mod version/build date should now be visible in the game version menu

Downloads and more details: https://github.com/induktio/thinker

Latest features are provided by develop builds if the release date indicates it is the newest file.

Other possible mods to use with Thinker:
* Pracx graphics enhancement patch (https://github.com/DrazharLn/pracx)
* SMAC-in-SMAX mod (https://github.com/DrazharLn/smac-in-smax)
Title: Re: SMACX Thinker Mod
Post by: bvanevery on August 21, 2018, 03:46:20 AM
I think it's my appointed role to be the bearer of bad tidings...

You can't legally license the binaries you provided under the GPL, because you have no rights to the original game .exe.  Those rights belong either to GoG and/or Firaxis.  When people make .exe patches, they are merely hoping that the right holders never catch up with them.

The choice is also a bit nonsensical, as no source code exists for the game .exe anyways.

You are probably trying to protect your own source code somehow.  I'm not exactly sure how one properly finesses that, given that the endeavor probably violates the game's End User License Agreement.  I'm not up on what various jurisdictions allow for binary patching or reverse engineering, or what the consequences are for violating a EULA.

Modding the factions.txt and alphax.txt doesn't have this problem, because all of those files contain text from Firaxis giving people permission to change whatever they want in those files.  Ergo, I have never "licensed" my mod work.  I put a Copyright on it, on the off chance that somehow I have rights of authorship when creating a derivative work.  I don't know that I actually have any, I just put it in there anyways just in case.
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 21, 2018, 10:23:09 AM
You can't legally license the binaries you provided under the GPL, because you have no rights to the original game .exe.  Those rights belong either to GoG and/or Firaxis.

There's nothing controversial in the source code regarding Firaxis, simply because it does not contain copyrighted works by Firaxis. It does, however, contain the needed binary diff to reconstruct the patch exactly given the game binary in GOG installation. Other binaries compiled from the source are licensed under GPL. Furthermore, any players need to have the game installation provided by GOG to start the game.

All in all, even a 5 minute search of the web would have revealed how similar projects like OpenRA or OpenTTD, that even reversed whole game engines, manage their licensing. They've been doing fine under GPL for 10 years now, and that's the way it's going to stay.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on August 21, 2018, 03:39:24 PM
All in all, even a 5 minute search of the web would have revealed how similar projects like OpenRA or OpenTTD, that even reversed whole game engines, manage their licensing. They've been doing fine under GPL for 10 years now, and that's the way it's going to stay.

If they are distributing binaries with a GPL, that doesn't make their actions legal.  Distributing a patched original game binary, is also not the same legal circumstance as entirely reverse engineering your own implementation of a game.  I wonder how they wordsmithed their licensing, vs. what they cannot license?  I will check.

My suggestion is that you make some kind of plain and obvious statement in your distro, that you do not have any rights to GoG or Firaxis' work, and that the license only applies to your own code.  Otherwise, you are vulnerable to summary takedown notices.  Even with such a notice you may be vulnerable anyways, but at least you wouldn't look like you are willfully trying to pass the work off as your own, under a GPL license.

Takedowns can affect other .exe patches, i.e. Yitzi, Scient, Pracx, if GoG or Firaxis gets interested. Trying to make it look more kosher, is about more than just your own work.  Historically, nobody else has ever been claiming a license on anything.  They just have offered patches, and have not typically offered source code to go with the patches.
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 21, 2018, 07:36:01 PM
Takedowns can affect other .exe patches, i.e. Yitzi, Scient, Pracx, if GoG or Firaxis gets interested. Trying to make it look more kosher, is about more than just your own work.  Historically, nobody else has ever been claiming a license on anything.  They just have offered patches, and have not typically offered source code to go with the patches.

Well, duh. If the mod author does not specify a license for a work, it does not mean it's public domain. Quite the contrary. In most jurisdictions copyright is automatic for any applicable works and needs to be explicitly disclaimed by an author for the item to be in public domain. If Pracx authors didn't explicitly specify some kind of a license, it could not be combined with other programs (they seem to only provide a public domain clause in the forum thread).

Now, any kind of implication I would be claiming copyrighted Firaxis content as my own is not true. If people have an issue with the way licensing is presented, it's really easy to add the trademark clauses excluding any Firaxis content from the mod's licensing, which is what I'm probably going to do. Other than that, there's no real issue here.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on August 22, 2018, 06:06:23 AM
Now, any kind of implication I would be claiming copyrighted Firaxis content as my own is not true. If people have an issue with the way licensing is presented, it's really easy to add the trademark clauses excluding any Firaxis content from the mod's licensing, which is what I'm probably going to do. Other than that, there's no real issue here.

That is the sum total of what I'm suggesting.  It may protect you better in some circumstance, and it protects the community.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 08, 2018, 11:03:30 AM
Now to get back on topic, there's some new features that could get into the next release. It could be possible to incorporate some of the fixes from Scient's patch to this one.

I attached the descriptions from Scient's patch v2.0 (http://alphacentauri2.info/index.php?topic=14141.msg64080#msg64080) readme below and assigned numbers on them. Of the players who regularly play with that patch, which one of these fixes do you consider essential? These changes are more extensive than the ones in older v1.0 which is still linked in the sidebar for some reason.

(click to show/hide)
Title: Re: SMACX Thinker Mod
Post by: bvanevery on September 08, 2018, 06:43:34 PM
Now to get back on topic,

The licensing of your work was never off-topic.  I hope in the future you remember that just because someone objects to what you are doing, that doesn't make it off-topic, irrelevant, or out-of-bounds.  I don't have presently have anything else to say, because 1) I'm busy with my own modding stuff and haven't vetted your latest efforts, 2) what you just posted is somewhat long and requires effort to think about, and 3) claiming "not on topic" doesn't dispose me to thinking about it.  So for now I've spoken my peace about 3), hoping I don't have to again.  Similarly, if feedback goes in a direction you didn't like and didn't want it to, that doesn't automatically make it a "derail".


Title: Re: SMACX Thinker Mod
Post by: Induktio on September 08, 2018, 08:21:06 PM
To be fair I don't really have any interest in the sort of meta-level wrangling where somebody has to prove some kind of point on this forum. The mod's copyright disclaimer was updated, so there's that. So far there has not been much discussion of the mod's technical side in this thread and I also suspect lurkers are not interested in contributing in threads that look like arguments.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on September 08, 2018, 09:59:23 PM
There isn't any "meta" on my part.  Regarding copyright, it took me some time to get you to understand what was at stake.  You seemed to eventually get it, and my last message on the subject was pretty clear about all I thought you really needed to do.  I think you actually did it, although I haven't checked, but I'm willing to assume "case closed" on that one.

The previous issue with you ruining how the Explore, Discover, Build, Conquer weights work, is very important to any modder who knows how alphax.txt actually works and has done non-trivial tech tree modding.  It's not meta, it's critical.  I don't know what you're currently doing about that, and I feel like I have the burden of going over your sources with a fine toothed comb now to check.  Which is not a fun project, definitely something that I push farther and farther into the future.  I hope you've changed your tune on this issue in the interim.  There's nothing meta about it, it's just that your previous approach was a dealbreaker.  At the time, you didn't seem to appreciate the seriousness of ruining, say, 50% of the work I've done in my mod over 3+ person months.  Even releasing version 1.19 sometime next week, I am still working on those Explore, Discover, Build, Conquer weights.  They matter.  They're the difference between factions going up one side of the tech tree or the other, or being completely unable to go up it at all.

I understand and appreciate the problem of you getting a lack of feedback on technical details.  That's just the reality of working on a game as old as this, in a community that's had stronger participation as recently as 5 years ago.  I hope that when people come along with "knowledge" of the ins and outs, and have a reasoned basis for what they're trying to tell you about how things work, that you take it seriously.  The reality is, there aren't going to be a lot of experts coming your way to tell you X Y Z, so I hope you use what you actually get.

95% of stuff in my own mod, I've figured out myself.  The other 5% I've gotten from other people, has been very useful though.  Frankly, that's why there's about to be this substantial 1.19 release.  I thought I was done.

I will get around to responding to your technical details when I think it will be constructively received.

I might suggest, you have a chance of getting more response, if you try posting on a narrow issue.  In other words, like one uses a bug tracker.  Then people can say yes / no / maybe / here is the relevant resource.  I don't know that people will respond, I just think it increases your chances.  It definitely increases chances that I will respond, helpfully, for instance.  Like if you ask something and I happen to know the answer, then hey boom here's your answer.

Title: Re: SMACX Thinker Mod
Post by: Induktio on September 09, 2018, 01:11:01 AM
That's some quite big accusations you have going there despite my explicit request not to turn this thread into that sort of thing. I'm not requesting help specifically from you - probably never did, yet you seem to act like I was doing that. You're not accomplishing anything by continuing on that line, not to mention all the other accusations.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on September 09, 2018, 02:51:31 AM
I've been trying to explain the difference to you, with what you frame as "meta battles of the ego", and actual problems with your binary modding.

The licensing issue, I said I think you got that sorted, probably "case closed".  Me saying this, shouldn't be making you mad.

Ruining the Explore, Discover, Build, Conquer weights in a previous version of your patch, isn't an accusation, it's a fact.  I explained it all to you in great detail in the other thread.  I don't feel a need to do it here again.  In the time that has passed, I was hoping you'd figured out the factual consequences of changing zeros into non-zeros, in the weights.  If you can't / won't figure that sort of thing out, there's no point contributing any technical feedback to you about anything.  You'd just be an engineer who isn't that good and can't be worked with, on basic issues of protocols, stability, standards, maintenance, packaging, etc.  I'd like to think that's not you.  But, the world of Open Source does have a fair number of people who really don't care.  In a previous generation I think we called them code jocks or cowboys.  If it suits their personal careers, they will ruin a previous generation's work.  Breakin' eggs to make omlettes, early and often.

Any project I've ever been on, when I break stuff, and someone points it out to me that I broke it, I've fixed it.  I don't talk about accusations, I fix what I broke.

If you did fix it already, great!  Glad to hear it.  I'll need to verify it at some point, but it would be good to know.

If you didn't fix it... if you defend it... well, that is why I'm not keen to start responding to other technical questions.  The last one was pretty easy, from an engineering standpoint: zeros matter and you nuked them.  The fix for that wasn't hard either.  Just put back the zeros and be more conservative with the math you insert.  This is an easy thing.  If you don't see the easy things, or their serious consequences, why talk about any other stuff?

If you don't want help from anybody, then you don't need to be posting in a public forum.  Posting publicly for input, implies "help me".  Doesn't say how much help you're looking for, or on exactly what.  But you've definitely asked, "help me do some thinking about some issue I brought up," or you would not have posted that big list of stuff you just did.

If you don't want help from me, that's your choice.  You might get some feedback anyways, because it's a public forum.

But you'd get a lot more useful out of me personally if you actually gave an indication you understood the issues I've raised, as something beyond ego, meta, accusations, or topicality.
Title: Re: SMACX Thinker Mod
Post by: BU Admin on September 09, 2018, 03:40:04 AM
b, why are you looking to make this your problem?  Please let it drop.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on September 09, 2018, 06:14:24 AM
I will drop the Explore, Discover, Build, Conquer weights issue for now.  Having these work correctly is critical to my own modding work however, and Induktio's patch is designed to be used with other mods.

Binary patches vs. text mods have some general issues, not specific to Induktio's work.  Transparency of changes, encodings.  Yitzi's patch has a few problems with that, I think there are 3.  That's close to zero, which in hindsight is commendable, but not ideal.  Maintainability.  "Is it breaking something?" is a hard question to answer if you don't know the assembly code intimately, and the original author who had the knowledge has disappeared.  Even when they're available, it's a lot of work.  Packaging.  Yitzi for instance steps on alphax.txt, precipitating Yitzi-specific versions of other mods.  Some things I bring up to Induktio now, on the hope that he doesn't become "author of a super popular patch that disappears" several years from now.  There are some lessons of history to be learned here.

That's why I care.  I'm at the stage where someone else is now manually Yitzifying my mod.  Later it could be Induktifying my mod.  Easier if no one has to.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 09, 2018, 02:42:32 PM
I will drop the Explore, Discover, Build, Conquer weights issue for now.  Having these work correctly is critical to my own modding work however, and Induktio's patch is designed to be used with other mods.
Well, it's a good thing if we can get over this tech value issue for now. About the binary maintainability, this is still the patch that provides absolutely the most functionality using the minimal amount of binary patching, only a fraction of the other patches actually. Aside from a full open source fork, binary patches are not getting much more maintainable.

I intended to post this link earlier, and it is still valid to say some of the other comments have crossed the threshold for this: https://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt
Title: Re: SMACX Thinker Mod
Post by: bvanevery on September 09, 2018, 05:55:44 PM
I intended to post this link earlier, and it is still valid to say some of the other comments have crossed the threshold for this: https://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt

Since it's your thread, you're free to set the tone for how you want people to talk about things in any way you like.  Just be advised it has an effect.  I already commented about this in posts above.  Now we will see if someone wants to talk tech with you.  I am unsubscribing, and will wait a few more months to see where your project actually ends up.
Title: Re: SMACX Thinker Mod
Post by: BU Admin on September 09, 2018, 10:03:43 PM
;no
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 10, 2018, 03:15:35 PM
Okay. The development of this mod goes on anyway regardless of whatever antics we've had on this thread. It's not like anything has changed in that aspect.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on September 11, 2018, 10:39:08 AM
1,2,7,10,15,18,20,21,27(! - major obstacle),34,36,37,38,43,51.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 11, 2018, 03:25:59 PM
For clarity, here are the items from PvtHudson's list:
Quote
1.  [BUG] If a faction's cumulative PROBE value is greater than 3 (SE morale, covert ops center) it is possible to "mind control" their bases when they should be immune. If the University uses SE Knowledge putting PROBE value down to -4, it would act as if it were 0 erroneously increasing "mind control" costs. After patch, PROBE values greater than 3 will always be immune to regular probes and values less than -2 will be treated as if they were -2.
2.  [CRASH] It is possible usually on larger maps that scrambling air interceptors would cause the game to crash. Even when the game didn't crash incorrect altitude values were being used in checks. Both of these have been fixed.
7.  [BUG] Fixed a check that was ending the turn for certain air units (choppers/missiles/grav) when entering a base which had no adjacent enemy units. There is still a check which will end the unit's turn if when entering a base it has less then one turn remaining unless an enemy is adjacent to base.
10. [CRASH] When moving units near or at the poles, it is possible for y coord to exceed the map bounds and crash the game. Patch adds handling to prevent y coord from going over min/max.
15. [BUG][SMAX] Enhanced probes (Algorithmic Enhancement) are now able to mind control bases/units normally immune due to high SE morale as stated in SMAX manual. For units it's purely the morale SE value so >=3 acts as if it were 2 (cost doubled). For bases, the value is calculated from morale SE and any base facility modifiers (Covert Ops: +2, Genejack: -1). If final value is >=3, it acts as if it were 2.
18. [BUG][SMAX] Enhanced probes don't receive a penalty to survival probability when target faction has built Hunter-Seeker Algorithm. Instead, the success probability is erroneously given the penalty for a second time after it has already been displayed in UI. This could cause diminished success rate when it should have been higher. Patch corrects check so survival rather than success probability is modified.
20. [MISC] Disabled cpu check which serves no purpose other than preventing the game from starting on newer cpu's. Patch enables ForceOldVoxelAlgorithm=1 in code by default and suppresses annoying warning.
21. [BUG][SMAX] Sealurk units now do not get a penalty when moving onto Sea Fungus like Isle of Deep.
27. [BUG][SMAX] Fixed bug when AI successfully completes probe action of freeing a captured faction leader (FREEWILLY/FREEWHO) where it would reset a non-captured faction.  The problem was that AI would always try to free the very first faction (usually PC) regardless of whether they were elminated or not.  Fix now obtains all potential faction leaders to free and randomly picks one.
34. [BUG] Fixed logic in PB code to prevent ODP/Flechette defenses being called a 2nd time (with a chance for defenses to fail) even after PB had already been shot down.  Each faction has one chance to defend against incoming missile based on closest base or unit to PB blast.  However, there is secondary check to give the tile owner a chance to defend against PB even if they have no units or bases in this space.  This check didn't take into account whether or not PB had already been shot down.
36. [BUG] Fixed a bug that would display NERVEGAS message even when attack on base failed -> checking attacker health
37. [MOD] Add ability to set reactor (1-4) for #UNITS in alpha/x.txt (ex. "Colony Pod,..., 00000000000000000000000000,4" -> gives Colony Pods Singularity Engine).  To do so, just add comma after Abil with value of reactor you want for unit.  If no value is set, it defaults to "1" like original code.  For SMAX only, there are two exceptions for Battle Ogre MK2 and Battle Ogre MK3 where default isn't "1" but "2" and "3" respectively.  The Ogre default can still be overriden if you set a different reactor value in alpha/x.txt.
38. [BUG] Allowing colony pods to be added to bases with fungus on tile ; allowing sea/land pods to be added to existing sea/land bases ignoring building restriction
43. [BUG] Abandoning a base after building a colony pod no longer skips the base production of the next base.  This was caused by the upkeep function using incorrect base values after the abandoned base was destroyed.  Fixed so acts like #STARVE.
51. [BUG] Additional check to initial tile when build aquifer rather that tiles around it

Scient's patch was built on a slightly different version of the game binary than the GOG version, so in the case one tried to import all of the patches, there's some chance it might cause new glitches. Over some of the changes, it could be said people have learned how to play around the bugs over the years, so changing them is not strictly necessary. At minimum, I think the crash bug fixes 2. and 10. should be included maybe in addition to 27. also. Probe bug fixes could be quite important too. If people have save games where bugs 2/10/27 can be triggered easily, that would be useful.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 14, 2018, 04:25:23 PM
After some investigating it seems Scient's patches can be imported almost verbatim to the GOG version. There are some interdependencies in the code, so it would not be simple to take out any single fixes out of the whole patch, though. Importing all the fixes is pretty simple and can be done for at least v1.0. Here are the changes that would be imported from Scient's v1.0 patch:

(click to show/hide)

A total of 21 fixes is less than the 51 in v2.0 but many of those extra changes are a little bit on the modding side in contrast to simple bugfixes. I already have a savegame for the interceptor scrambling bug but can anyone remember where to find savegames where these bugs trigger?

[CRASH] When moving units near or at the poles, it is possible for y coord to exceed the map bounds and crash the game.
[BUG][SMAX] Fixed bug when AI successfully completes probe action of freeing a captured faction leader (FREEWILLY/FREEWHO) where it would reset a non-captured faction.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on September 15, 2018, 09:33:00 AM
Attached a save to reproduce "AI frees wrong captured leader" bug. Just press End turn and you will be "freed". Made on configuration described in http://alphacentauri2.info/index.php?topic=21007.0 (http://alphacentauri2.info/index.php?topic=21007.0) though.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 15, 2018, 04:00:14 PM
Yeah, that is a really funny bug when it occurs in the game. It is also reproducible in the base game without any mods. After I applied the patch, I can confirm the AI now frees Peacekeepers instead of the player. It seems the AI will not always perform the same probe action though.

I could probably consider creating a separate development build of Thinker if people want to try these changes before they get into the actual release. There's been quite a lot of stuff added to the code since the last release (v0.6).
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 19, 2018, 08:45:22 PM
I now updated the downloads page (https://github.com/induktio/thinker) to also include develop builds of the mod. They are versioned by the build date rather than a normal version number and contain all the recent changes from the repo. Also Scient patch v1.0 is included in the mod from now on.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 27, 2018, 12:46:00 AM
Scient did good work on their patch and their fixes aren't controversial. I don't really see why you don't just use their latest patch or Yitzi's as your starting point. Maybe that's been covered in another thread.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 27, 2018, 01:05:47 PM
Scient did good work on their patch and their fixes aren't controversial. I don't really see why you don't just use their latest patch or Yitzi's as your starting point. Maybe that's been covered in another thread.

Well, occasionally somebody has requested "include some patches" without going to specifics. The issue is just binary patching is not very maintainable and the behaviour is not configurable. Particularly Yitzi's patch diverges from vanilla game behaviour on multiple aspects. Maybe it would be easier to look at this if you could describe the features that people want from those other patch versions?

On other news, I included a screenshot of a test game to see how the AI builds its empires in the current version. Turn is 145 and this is the moment when Gaia actually first reached 1000 labs output per turn. This test was done using version Thinker-dev-20180924 (it's in the downloads page). Next version after this will also see another big improvement because it will contain a patch that makes the governors choose borehole tiles more often.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on September 28, 2018, 09:32:34 AM
OMG, then what will Yang look like!
Title: Re: SMACX Thinker Mod
Post by: Geo on September 28, 2018, 10:20:18 PM
OMG, then what will Yang look like!

Boreholes I have known...
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 29, 2018, 02:50:05 AM
Scient did good work on their patch and their fixes aren't controversial. I don't really see why you don't just use their latest patch or Yitzi's as your starting point. Maybe that's been covered in another thread.

Well, occasionally somebody has requested "include some patches" without going to specifics. The issue is just binary patching is not very maintainable and the behaviour is not configurable. Particularly Yitzi's patch diverges from vanilla game behaviour on multiple aspects. Maybe it would be easier to look at this if you could describe the features that people want from those other patch versions?

Vanilla SMACX has a bunch of bugs, some of them game breaking, many of them confusing. Everything listed in Scient's patches is worth including IMO because they're almost all bug fixes and where they're not they're small and unobtrusive fixes (and I have checked the entire list :) )

The only controversial change I can find in the changelog is: "Fungal Missiles would spawn MW in ocean tiles -> fix by spawning IoD instead and adding in one Sealurk instead of Fungal Tower.", and the only controversial bit about that is what to do instead of spawning a fungal tower (which looks awful and dies at the end of the turn if on water). The remaining non-fix changes are backwards compatible and small.

I don't entirely understand your point about maintainability, either. Scient and other members of the community spent a lot of time discovering and fixing bugs and then testing the fixes. These bug fixes don't really need onward maintenance. The sites of the fixes are also annotated by scient, so if you're going to be hacking on some code nearby you can be aware of it. Tell IDA about it, even.

Similarly for configurability: bug fixes don't need configuration switches.

The only way these fixes could hurt maintainability are if they 1) confuse your reverse engineering tools too much; 2) break the boundaries of functions you want to hijack (unlikely). Including these fixes is likely to improve maintainability by removing bugs from the code base and so reducing bug reports etc.

Scient and others on the bugfixing team did good work over many years on SMACX. It seems pretty daft to me not to build on that work.

I attach scient's v2 patch files here for ease of access.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 29, 2018, 02:52:46 AM
Also Gaians shouldn't be building loads of roads and boreholes ;)
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 29, 2018, 12:25:10 PM
The only way these fixes could hurt maintainability are if they 1) confuse your reverse engineering tools too much; 2) break the boundaries of functions you want to hijack (unlikely). Including these fixes is likely to improve maintainability by removing bugs from the code base and so reducing bug reports etc.

Scient and others on the bugfixing team did good work over many years on SMACX. It seems pretty daft to me not to build on that work.

Yes, I've seen what those changes are in v2, and maybe you consider them important changes but you can't expect to have the opinions heard if you don't comment which patch should be included. There's a big difference in patch size when it comes to v1 and v2. The first has 1300 bytes of changes while the second has over 3100 bytes. Even this website offers the v1.0 patch in the sidebar. Maybe it should be updated, but dunno. We might look into that later.

I do take an issue here about saying that I would not be building on Scient's work. There's probably very little chance I would have undertook this project if it was not for the reverse engineered databases Scient had provided. Maybe you notice this if you look at the header files. Figuring out what all those variables do would have been way too time consuming to do without any help. Even then I had to fill in some gaps continuously because some features needed to added.

***

Looks like I cannot overstate the importance of that borehole worker allocation patch. In some cases it can increase AI research output by as much as 50% because so many of those boreholes are left unused until the population is high. I actually continued the game in the screenshot after some changes and in only 10 short turns Gaia would deploy satellites, build cloning vats, and balloon the labs output to way over 2000 per turn. It would probably transcend around turn 180 but it is kinda bottlenecked by the mineral cost of the Ascent project when it has "only" 50 minerals in the top base.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 30, 2018, 05:54:14 PM
> maintainability

Why not load your code as a dll and only modify the stuff you want to? We can hack the .exe to load a common loader dll that will then load all mod dlls in the directory (perhaps identified in a text file?).

That's roughly how PRACX works and would allow us to make these binary changes more easily composable and means you don't need to include anyone else's work in your project if you don't want to. It also means you don't need to distribute the updated terran binaries, just your dll, the loader dll and a script to patch terran.exe to use the loader.

I can help you build this if you don't know how.

> comment which patch should be included

I've been through the list of changes a few times recently and I think all of scient v1 and v2 should be included. I think they're all important and together make the game more predictable/understandable and a lot less buggy.

> Even this website offers the v1.0 patch in the sidebar

It probably should be updated, but v2 wasn't released in a big way because it was included in Yitzi's patch.

> building on that work

The IDA db is very useful (and I hope you upload your local copy if you've made improvements :)), but there was a wider bug-fixing effort that catalogued, tested and fixed bugs. These bugs are real and do make a significant difference to how the game is played and the general quality of the game, IMO.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 30, 2018, 07:20:50 PM
Why not load your code as a dll and only modify the stuff you want to? We can hack the .exe to load a common loader dll that will then load all mod dlls in the directory (perhaps identified in a text file?).

That's roughly how PRACX works and would allow us to make these binary changes more easily composable and means you don't need to include anyone else's work in your project if you don't want to. It also means you don't need to distribute the updated terran binaries, just your dll, the loader dll and a script to patch terran.exe to use the loader.

I'm not sure what do you exactly mean by the first part because the code is already executed in the dll. Binary patching is only used to insert dll function calls to certain important places. That was the idea of this project, to avoid binary patching as much as possible. Basically all the variable locations that I reversed are present in the header files. Borehole patch is almost the only thing that changes the logic without calling a dll function.

Maybe it could be made more composable by some loader utilities but it's a potentially error-prone step for users if they patch an incompatible file, and dynamic patching brings some complexity too. The issue is just you commented about this thing so late in the release cycle, next mod version has already been delayed quite a lot. I'm in the process of finalizing changes to the build queue algorithms and other stuff can probably wait for later. Depending on how balanced the different factors are, it could be released very soon.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 01, 2018, 10:48:54 PM
Looks like the new version is almost ready in most aspects, at least I shouldn't be adding any more features. The problem is a glitch with the AI psych management. Often the bases grow so fast that the psych buildings can't keep up. When a drone riot happens, the governor usually deploys enough doctors to suppress it. On the next turn it tends to always deploy the workers back, resulting in a perpetual drone riot.

Some bases seem to get stuck into that loop, so it does not seem viable to rely on the AI to switch enough workers to doctors. Unless that behaviour is somehow changed. It would really need some kind of a fix or else those bases would just keep wasting production. Despite that, the AIs still tend produce huge amounts of stuff, like stacks of 30 needlejets etc.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on October 03, 2018, 05:58:55 AM
I was proposing:

1. A simple binary patch is made to terran.exe that causes it to load a dll. This is the only change made to the smacx binary on disk
2. This dll provides functions that will edit SMAC's memory at runtime and perhaps a higher level hooks interface
2. Other patches (PRACX, thinker, scient v2, yitzi) are implemented as dlls that call those functions

Rationale:

1. Patches are described more clearly and in a format that encourages inline documentation
2. Patches are easier to combine for users and developers
3. Conflicts can be identified
4. Patches are easier to remove

---

I'm not suggesting you delay your release. This is just an idea.
Title: Re: SMACX Thinker Mod
Post by: dino on October 03, 2018, 11:49:35 AM
Hey @Inductio

Why you didn't choose Ytzi's patch as a base for your work ?
There are some serious bugs fixed there not included in Scient's patch and quiet a few modding features that can improve game balance and increase challenge.
Don't remember... does popboom with golden age works with this patch ? It's the only way to boom with morgan/hive.
Also I use only +GROWTH for PLANNED, to require golden age for every faction to boom before eudaumonia/clonning vats, to make booming more difficult.

Being able to customize factions ai with weights in the tech tree is important, so all AIs don't play exactly the same.
Do I understand correctly that tech_balance=0 value in thinker.ini gives me original formula and let me set all the weights myself ?

After you give them more minerals to work with terraforming and other means.
You could create some kind of support to production percentage treshold after which, they are forbidden from building more units.
The treshold could be based on formula that would take into account ai-fight value and threat/diplomacy status.

In simillar fasion you could hardcode it to keep at least one former per base  ( or develop some formula to determine how many ).
So AI can rebuild lost formers at any stage of the game and doesn't have to depend having many formers build early, when it didn't had much stuff to pick.
Same with crawlers.

I've just installed the game for the first time this year, only to try your work.
Thank you very much and I look forward to further developments.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 03, 2018, 05:06:10 PM
> Why you didn't choose Ytzi's patch as a base for your work ?
> There are some serious bugs fixed there not included in Scient's patch and quiet a few modding features that can improve game balance and increase challenge.

It's just hard to see what those important bugfixes might be in Yitzi's patch. Mostly it deals with modding ecodamage, some variables in alphax.txt that provide new features instead of bugfixes. There's so many changes in the binary level that it's not very interesting to go through to see what they do.

> Don't remember... does popboom with golden age works with this patch ? It's the only way to boom with morgan/hive.

Pop booming with golden age should be working with this patch.

> Do I understand correctly that tech_balance=0 value in thinker.ini gives me original formula and let me set all the weights myself ?

It will take into account the weights regardless of which setting is selected here. Tech balance just prioritizes crawler/former/resource cap lifting techs so the AIs can hopefully reach them sooner.

> You could create some kind of support to production percentage treshold after which, they are forbidden from building more units.
> The treshold could be based on formula that would take into account ai-fight value and threat/diplomacy status.
> In simillar fasion you could hardcode it to keep at least one former per base  ( or develop some formula to determine how many ).

It's currently limited to 2 formers and 3 crawlers per base if the population is at least 6. There's a soft limit scaled on map size after which it stops producing new colony pods but sometimes it might go over it. I have not implemented any cap on military units yet. At least if players run into the global unit cap in real games, that kind of a limit might be coded in pretty easily. In the next version ai-fight values will have some impact on how many military units it produces.


Title: Re: SMACX Thinker Mod
Post by: bvanevery on October 03, 2018, 06:50:50 PM
[delurks]

> Why you didn't choose Ytzi's patch as a base for your work ?
It's just hard to see what those important bugfixes might be in Yitzi's patch.

Tell me about it.  And it'll be a problem for every .exe modder who ever tries his/her/its hand, until some kind of standard way of interfacing and describing binary patches is devised.  5 years from now, if a modder is tired of their project and has moved on with their life, nobody else is going to be willing to maintain their code.  This has serious peril of "starting from scratch" problem over and over again, until finally nobody cares enough about SMAC anymore.  It's also a big deal if an .exe modder turns out to have made a serious game breaking bug that they didn't catch during their own development.  Effort of fixing a "showstopper" after the original modder is gone is prohibitive, it simply won't happen.  At least in Yitzi's case, he mainly had a bent about fixing bugs, so he was less likely to create them.  Still not impossible in his case though.

[lurks]
Title: Re: SMACX Thinker Mod
Post by: dino on October 03, 2018, 07:47:46 PM
It's just hard to see what those important bugfixes might be in Yitzi's patch.

You are right, I've looked through Ytzi patch readme and there are no really critical bug fixes, I've attributed to him some stuff fixed earlier, my memory failed me.
But few are useful, maybe you could look into incorporating few selected  fixes/features into your patch instead.

Simple mods I find really nice to have and hopefully would be easy to do:
Only units in enemy territory cause drones - you can explore unclaimed terrain, or defend pact brother territory without pacifism drones.
Option for condenser to not provide extra nutrients, only rainfall, condensers are too good and this change makes ICS a bit less viable.
Supply crawler penalty - I like 1 point penalty, so I don't have to fight my OCD and use crawlers only on tiles yelding more than two, improve challenge and reduces mikro.
Modable "planet pearls"- I like to reduce it, worm farming in fungus or popbooms feels like a cheat and reduces economy balance. They should just be a threat, not a welcome income source.
Option to choose landmarks to be used by map generator, including Nessus Canyon.
Option to disable expansion features like spawning ogres, fungal towers, spore launchers:
ai deals with them poorly, while greatly reduces amount of wandering worms in early game which are actual threat to human player, allows the original SMAC on terranx.exe mod, with alphax.txt edits.

Important bugfixes:
Capturing a base from, or by, a faction with a free facility ability will now work properly.
AI units will no longer rehome to other factions' bases.
Ending the turn where an air unit in the air has movement left will no longer cause all other air units to regenerate all fuel and prevent the turn number from progressing.
The AI evaluation of the worth of psi no longer behaves erratically or causes crashes when psi-combat-relevant projects have been built.

Minor bugfixes ( probably not worth the effort ):
Artillery will no longer "intercept" other artillery from the same faction, or one with a truce or better. (As of patch 3.2, native-owned spore launchers will also not attack each other.)
Drones will no longer revolt to their former owner if that faction has been eradicated.
Techs that are supposed to give free maintenance to particular facilities will now do so.
The bonus comm frequency and REVOLT abilities now work properly.
Fungal pops on the shore now properly have a chance of overflowing into nearby sea spaces.
When the AI frees a captured faction leader, it will now do so properly, and not have a substantial chance of "freeing" a faction that is still in the game.

@bvanevery
Induktio does dll injections and released source code of his mod, what else is he supposed to do. If he'll ever abandon it, it'll be easy to pickup by someone else.
He made his ai tech weights optional as you requested. You sir camplain too much.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 03, 2018, 09:24:16 PM
Okay, it took a while but decided now to release version 0.7 to the downloads (https://github.com/induktio/thinker).  :)

Most important changes:

* Land-based former code rewritten
* Formers will attempt to raise land bridges to nearby islands
* Crawler code improved to choose better tiles
* Prototype picker values fast units and useful special abilities more
* Design_units configuration option added. Produces improved probe teams and AAA garrisons.
* AI produces now planet busters. Amount depends on the UN charter status and aggressiveness settings.
* AI prioritizes secret projects that match their interests
* AI builds secret projects now in their top third mineral output bases
* Tech requirements now fully moddable in alphax.txt
* Governors of all factions will use more borehole tiles
* Scient patch v1.0 added

With the auto design units feature it would be good to know what kind of special units the AI is lacking/should produce. It's now possible to specify all the proper tech requirements/special abilities in ANY combination and have the AI build the units too. Also, if you have some kind of a complex problem, send the save game to me so that it's possible to properly debug it.

> Option to choose landmarks to be used by map generator, including Nessus Canyon.
> Option to disable expansion features like spawning ogres, fungal towers, spore launchers:

Actually I've been thinking about implementing some of that stuff. I'm not too keen on changing most game mechanics but these would be interesting to have, not sure if it will get added though.
Title: Re: SMACX Thinker Mod
Post by: dino on October 04, 2018, 09:12:23 AM
I will have time to extensively test your mod on the weekend. Now I'll throw some ideas i had over time about improwing ai, but no knowledge to implement them:

The major winning strategy for a player, is to do nothing but spawn crawlers in the early game, cover most of the territory with crawlers on forest.
After lifting restrictions and growing bases, use all the excess crawlers to hurry projects, use huge mineral output to build huge army and destroy ai neighbors.
It's almost fail proof strategy to dominate power chart within first 100 turns on transcend.

You are allowed to do this only because as long you have noble integrity rating, ai will never attack you if you keep giving in to their demands, until you are ready to destroy them.
It's wrong, military deterrent should be absolutely necessary condition of peace when dealing with agressive factions, like in real life cold war.

So far, you've concentrated mostly on isolated builder efficiency. It's time to improve their diplomacy game performance against human player.
If a player have poor integrity rating, ai often give demands and then attack anyway.
My idea is to give ai modifier to how they perceive human player integrity, based on relative military power, social choices and agessiveness.

You can design specifics of the formula as you see fit, but you should want to roughly achieve a state when:
If ai has >2x military power of human and ai_fight=1, it will always attack the player even if he give in to all their demands.
If ai has >2x military power of human, ai_fight=0 and the player is an ideological enemy ( social choices ), it will attack the player even if he give in to their demands.
If ai_fight=-1 it shouldn't be affected by this modification.
AI factions shouldn't be affected by this perceived integrity penalty either, since they start enough wars as it is.

Human player will be forced to back their diplomacy with at least half the force AIs have to be able maintain peace with bribes.
Being forced to mix more military units with crawlers, colony pods, formers and facilities will slow human builder early development speed at least 2x times.

If player starts isolated it's fine, because he can't trade/steal techs early and naval invasion require more time and resources to execute, so AIs have more time to catch up.

***

Regarding units and support I had this rough idea that ai shouldn't eat more than 70% production with military support:
 -10%,0,+10% depending on ai_fight,
+10% when enemy units present within own territory,
+ 0-20% depending on military power compared to other factions,

You can design your own formula, but AI's should have some minerals left for base facilities, crawlers, probe teams, formers production, etc.

***

Does your ai rebuilds lost formers in mid and late game? Vanilla ai builds some in early game, but rarely builds them later.
Thats why the mods to give them early additional super formers so it can do tons of terraforming in advance, before it'll loose them were used.
With a function to always maintain certain number of them, it won't be necessary to give ai that many formers, or super former ability early.

***

Option to disable expansion features - I'd seriously consider this.
I know of people, who dislike most of expansion features, factions and tech tree changes enough, to refuse using Ytzi's patch until he made the original SMAC mod possible.

Title: Re: SMACX Thinker Mod
Post by: Induktio on October 04, 2018, 07:06:42 PM
Phew, that's a lot of stuff there.

> The major winning strategy for a player, is to do nothing but spawn crawlers in the early game, cover most of the territory with crawlers on forest.
> After lifting restrictions and growing bases, use all the excess crawlers to hurry projects, use huge mineral output to build huge army and destroy ai neighbors.
> It's almost fail proof strategy to dominate power chart within first 100 turns on transcend.

Human players can always use crawler upgrading/rushing tricks and gain an advantage, sure. The AI doesn't rush production currently, so that also favors humans quite a lot. Other big factor is also pop booming. The AI doesn't understand how to do it, but maybe these are mechanics that can be modded away or maybe players can just refrain from using them too much.

> You are allowed to do this only because as long you have noble integrity rating, ai will never attack you if you keep giving in to their demands, until you are ready to destroy them.
> It's wrong, military deterrent should be absolutely necessary condition of peace when dealing with agressive factions, like in real life cold war.
> If a player have poor integrity rating, ai often give demands and then attack anyway.

Are you positive the AI refrains from attacking every time if you cave in with noble rating or is there some other factor influencing this? I have some idea where the diplomatic variables are stored so it could be pretty simple to just change them to cause more diplomatic friction.

> You can design specifics of the formula as you see fit, but you should want to roughly achieve a state when:
> If ai has >2x military power of human and ai_fight=1, it will always attack the player even if he give in to all their demands.
> If ai has >2x military power of human, ai_fight=0 and the player is an ideological enemy ( social choices ), it will attack the player even if he give in to their demands.
> If ai_fight=-1 it shouldn't be affected by this modification.
> AI factions shouldn't be affected by this perceived integrity penalty either, since they start enough wars as it is.

Something like that could be implemented. AI factions are currently so aggressive against each other it could be good to reduce their early wars so their development doesn't suffer so much. Against humans they probably declare very easily too unless that diplomatic exploit you described is working.

Anyway, there are 3 main areas this mod doesn't touch currently: 1) diplomacy 2) social engineering 3) combat unit movement. Infrastructure is fully in place to modify #3 and I'm actually considering some changes on how the AI could use its combat units. Ideas are welcome there too.

> Regarding units and support I had this rough idea that ai shouldn't eat more than 70% production with military support:
> You can design your own formula, but AI's should have some minerals left for base facilities, crawlers, probe teams, formers production, etc.

The formula was changed many times but currently it basically keeps half of the minerals in reserve before switching off combat unit production.

> Does your ai rebuilds lost formers in mid and late game? Vanilla ai builds some in early game, but rarely builds them later.
> Thats why the mods to give them early additional super formers so it can do tons of terraforming in advance, before it'll loose them were used.

With this mod you could see AIs with 50 formers + 50 crawlers so I'm not sure if that super former ability would even be needed. It should still build them if possible.
Title: Re: SMACX Thinker Mod
Post by: dino on October 04, 2018, 09:33:13 PM
I should probably first test your mod extensively before commenting, you seem to already addressed formers and production better than I thought.
I have not enough time at the moment, but I was too excited that someone is working on it finally and couldn't hold off, sorry.

As for diplomacy yes, with modded AI buffs it can be in possition to easily destroy my crawler parks and bases when I am in a building up phase.
But as long as I keep noble integrity and give them whatever they want, they won't attack and giving them tech and money is not an issue, they'll trade them elsewhere anyway.
If they hate you because you're leading power chart they'll attack eventually, but early game when I'm weak, I don't recall a situation when it didn't work.
Maybe with intense rivalry it wouldn't work, but I never play with this option. I like to try maintain some stable treaties with one, or two factions in my games.

So, my proposition is, if the human player is determined to be an easy prey and the AI is aggresive, or erratic but human is their ideological enemy, it should just attack.
This way player won't be able to safely build up, with just one defender per base to fend off worms, supporting unused military deterrent is a huge strain on economy.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 05, 2018, 09:39:04 AM
Interesting reading about endowing AI with right amount of aggression: https://steamcommunity.com/app/287580/discussions/0/1620599015872353241/
It's about SMAC-like 4x TBS Pandora: First Contact, which currently possess one of the best AIs in the field. For example, the need to back your development up with a standing army is already a must there.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 05, 2018, 06:42:20 PM
> If they hate you because you're leading power chart they'll attack eventually, but early game when I'm weak, I don't recall a situation when it didn't work.
> Maybe with intense rivalry it wouldn't work, but I never play with this option. I like to try maintain some stable treaties with one, or two factions in my games.

In early game I think it's usually that dialogue where they demand you two techs in a row. Refusing will almost certainly cause them to declare. Intense rivalry affects quite a lot of things in diplomacy, haven't checked if it has any effect here. Probably it harms the AIs more because they already have too much wars.

> Interesting reading about endowing AI with right amount of aggression: https://steamcommunity.com/app/287580/discussions/0/1620599015872353241/

Yeah, I've heard about that project. Not sure if he ever published any source code or described the algorithms in detail. It's closed source anyway?
Title: Re: SMACX Thinker Mod
Post by: dino on October 06, 2018, 11:11:57 AM
Maybe just switching to "intense rivalry" diplomacy code path against human player, when conditions described in previous posts are met could be possible.
There was an effort on this forum to identify all instances of the code affected by this option.
Title: Re: SMACX Thinker Mod
Post by: k3v on October 08, 2018, 11:31:57 AM
Long time smac/x community lurker here.

Mod sounded great so played a game for the first time in 2 years.

Transcended 2231 with zak, pretty sloppy play.

Sven built 60 bases lol (counted), only had 110 science at the end though. Almost lost governor vote because of the pop.

4 ais had really bad small island starts (even on 30-50% land) and couldnt get going till foil/former raise land, which was then seen to great effect.

Aki had 850 science at the end, compared to ais rarely getting higher then 150. Aki actually got knowledge before me, pretty impressive. I force sell tech to ais for money but they dont use it properly in a builder sense.

Is it possible to force the ai to build tree farms and tech structures first if they have the tech? Only yang built a few tree farms and no one built research hospitals or higher at all. I feel that would really help their builder game, as they just stall with 1 food per tile for ages.

Avoiding war is obviously quite easy, only built like 5 military units all game, sven just ignored me all game and i payed him off half price once. Ais fought each other as well (alot of foil probe team taking bases), i was further away. Sven is actually the most annoying even pre patch as he plops down bases intrusively close with high chance of unavoidable conversations typically resulting in vendetta.

Either way great mod, i can imagine how difficult it is to do anything with this game, so always great to see people trying.

I know it will be hard to have the ai compete with the optimal fast transcend strategy but it would be cool to see whats possible. (fm+wealth->forest->crawlers->get all good sps->restrictions->tree farm->pop boom->all tech boosters->energy park->drop colony/transport on remaining pods for aa's->gg).

A game where the ai's have better land, 6 aliens might be an interesting challenge. This mod with all 14 factions on one map would be interesting, base spam leads to closer proximity and fireworks.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 08, 2018, 02:51:13 PM
Yeah, I've heard about that project. Not sure if he ever published any source code or described the algorithms in detail. It's closed source anyway?
Yeah, it's closed source. The game is property of Slitherine/Matrix Games, they just allowed one volunteer developer exclusive access to codebase. Probably, sources won't make SMACers any good anyway, completely another game, much simpler withal. But AI intricacies were discussed on that forum in pretty hefty detail, including antagonism between ruthless "play-to-win" and honorable "role-playing" AI designs, which is relevant for SMAC. Most surprising pitfall for that AI developer was the amount of ire some players poured down on (non-cheating!) AI when they started to lose badly to said AI.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 08, 2018, 08:24:46 PM
> Transcended 2231 with zak, pretty sloppy play.
> Sven built 60 bases lol (counted), only had 110 science at the end though. Almost lost governor vote because of the pop.
> 4 ais had really bad small island starts (even on 30-50% land) and couldnt get going till foil/former raise land, which was then seen to great effect.
> Aki had 850 science at the end, compared to ais rarely getting higher then 150. Aki actually got knowledge before me, pretty impressive. I force sell tech to ais for money but they dont use it properly in a builder sense.

Interesting test results right there! :)

May I ask what kind of mapsize/world configuration did you play on? Any other custom rules active? Do you have examples where they could use the builder techs better?

> Is it possible to force the ai to build tree farms and tech structures first if they have the tech? Only yang built a few tree farms and no one built research hospitals or higher at all. I feel that would really help their builder game, as they just stall with 1 food per tile for ages.

Tree farms are quite high on the build order, just before hab complexes. If they didn't build them, it probably means a) they didn't have the tech, or b) military build up overruled other priorities. Research hospitals should be built too, but they are much later on the build order, with specific conditions. Unless you post save games or screenshots, can't analyze it in more detail.

> Avoiding war is obviously quite easy, only built like 5 military units all game, sven just ignored me all game and i payed him off half price once. Ais fought each other as well (alot of foil probe team taking bases), i was further away. Sven is actually the most annoying even pre patch as he plops down bases intrusively close with high chance of unavoidable conversations typically resulting in vendetta.

So it seems the diplomacy mod for credible military deterrent is much needed in this game. Have to look into it more.

It must be mentioned the single biggest factor deciding the AI growth is still the size of their starting landmass. They do build transports and (later) attempt to raise land bridges, but if they start on a small island, they can probably never recover from the turn disadvantage. High erosion/bigger continents helps them the most because then they can expand easiest and fit more boreholes on the flat terrain.

Here's one WorldBuilder configuration for alphax.txt that produces bigger continents, less small islands and more rivers:

(click to show/hide)
Title: Re: SMACX Thinker Mod
Post by: k3v on October 09, 2018, 09:43:42 AM
I attached my saves. It was a huge map. Default rules with look first. Plenty of bad decisions, for example i forgot PEG was a thing and build a few energy banks before it. I dont build boreholes at all because I dont think their actually worth it even with WP. They take too long, are dirty minerals which you cant use without eco damage risk, and just delay your crawler sps/popboom. But thats another discussion. I go for hybrid farms asap and sea energy park. My beeline was all over the place because I still cant decide whats best. I got clean reactor super late this game, I went like hybrid farm->SC->ToE->Fusion.

For comparison my fastest transcend with stockpile bug fixed (not here) and air drop bug fixed is 2210 with zak, huge transcend (yitzi patch 3+ years ago). Unpatched I did a air drop hopping bug game in 219x not optimised for fun.

From empath guild onward, im force selling tech for money. Its a *bug/feature* that if you ask for money and offer tech the ai will always buy for at least 25 until they get impatient and end the call (even putting them negative energy, but that rarely happens). So the Ai's have my tech from EG onwards unless they just ignore me or i cant sell enough to them.

The only reason to not do it is if the ai was actually a threat lol. The goal is fastest transcend using everything available. I want them to have the best bases for more commerce/chance that they research tech off the beeline to get later. I switch SE before talking to ai's keep them happier, how else can you run fm+weath and have treaties/pacts with anyone except morgan lol.

Lal, yang, aki and cult all started close so maybe the war took over their build orders but I would force treefarms/tech buildings over everything. the base spam means ais end up closer together creating potential for fireworks, but even morgan didnt build anything and he was isolated at the bottom. I should check my old saves to see what the ai builds back then in other games.

But its like, do you want the ai's to roleplay their ideologies, or do you want them to play optimised builder.

I should try the map settings, I played 35 turns of a new game and mogan started on a tiny island and lost his transport foil to worms so hes screwed on one base lol.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 09, 2018, 11:54:08 PM
> I attached my saves. It was a huge map. Default rules with look first. Plenty of bad decisions, for example i forgot PEG was a thing and build a few energy banks before it.

Looks like for most of the game, Morgan was tied in the labs output with Aki-Zeta. Near the end Morgan had almost 700. Some of the starting locations are pretty horrid considering there's so much land on the other continents. If the AIs are near each other but neither can conquer anything due to islands, that usually slows them down pretty badly. Sometimes I've been considering redoing the faction placement algorithm, but not sure if there's any simple solution. Pirates are quite weird when they plop down so many bases, but they still underperform due to the inability to transition to land. They have not received any improvements for that, though.

> I dont build boreholes at all because I dont think their actually worth it even with WP. They take too long, are dirty minerals which you cant use without eco damage risk, and just delay your crawler sps/popboom. But thats another discussion. I go for hybrid farms asap and sea energy park.

I just don't get the problem with the clean minerals. It's very easy to manage if you wait for the first fungal pop before deploying the tree farms. Without the first fungal pop, one would miss the clean mineral cap increase. Hybrid forests are pretty expensive at 240 minerals considering they basically bring in just a couple of extra nutrients, so the AI doesn't build them either.

> From empath guild onward, im force selling tech for money. Its a *bug/feature* that if you ask for money and offer tech the ai will always buy for at least 25 until they get impatient and end the call (even putting them negative energy, but that rarely happens).
> I switch SE before talking to ai's keep them happier, how else can you run fm+weath and have treaties/pacts with anyone except morgan lol.

Yeah, these could be considered diplomacy exploits. Scient's patch doesn't seem to address any of these either, at least not mentioned in the v2.0 changelogs. I will probably soon check if the patch update to v2.0 works anyway. There's also a couple of improvements coming in the way these patches are inserted, so some patch features could be selected at runtime.
Title: Re: SMACX Thinker Mod
Post by: k3v on October 10, 2018, 11:57:15 AM
I dont want to derail the thread into fast transcend strats, but I love talking about it. Ive kinda retired from it though, 221x was my goal on a yitzi patch version. Any faster I think you need better "luck" or reloading map spawns/pods/aas/better ai combinations. I'd love to see others trying to see what they can come up with.

Heres a picture of mine which compared borehole vs no borehole strat. Right was the 2210 game.
(click to show/hide)

Boreholes take 16 turns with WP (if the terrain allows, longer if you need to lower and you have to get WP first or EE tech), in that time you could build 8 forests. Early on you want squares for crawlers and PTS boom, so you might have 1 borehole, and no other squares. Then by working that borehole, you cant use other forest squares because eco damage. And you cant sustain 3 pop at PTS (the biggest early booster), and you wont have food to get to size 16. Need condesors which is more former time and eco damage, and no energy.

To have the former power to build it all fast you need clean reactor and a former army which slows down other techs/preparing pop boom etc. Of course boreholes are usable, I dont think their worth it to go fast.

In this sloppy 2231 game, I couldve build borehole later post boom which is what Ive done before, but I actually forgot about it, but I dont think it mattered. I never had a former army anyway (late clean reactor, overbuilt crawlers), also I never had time to build more orbital farms, so bases barely had 32 food, and had land to build new bases. I stayed in wealth vs knowledge and had money I couldnt use etc.

The thing is, development of this patch might result in passive fast transcend being impossible so the times will definitely go up.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 10, 2018, 01:37:46 PM
Sometimes I've been considering redoing the faction placement algorithm, but not sure if there's any simple solution.
Standard faction placement algorithm is truly horrible, if you aren't up for a rush challenge. In my games it routinely places 3-4 factions in the vicinity of each other on large random map. I've heard a tell-tale that if you start a game, then save map, then start a new game from that map, then faction placement suddenly becomes sane. Didn't checked it myself, though.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 10, 2018, 06:37:42 PM
After updating all the relevant patches, a new version is available in the downloads (https://github.com/induktio/thinker). Develop build 20181010 has these changes:

- Scient patch v2.0 added (see details.md)
- Ability to select which landmarks are placed on random maps (see thinker.ini)
- Nessus Canyon included also

To make sure this new patching method works on all machines, post here any problems you might find.

@k3v You might interested in T-Hawk's speedruns (http://www.realmsbeyond.net/forums/showthread.php?tid=9288) if you haven't seen them already. He plays vanilla SMAC only though.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 13, 2018, 06:48:36 PM
New testing version 20181013 is now available from the downloads.

This time it adds a new option called "faction_placement" which aims to improve on the original starting location algorithm. It tries to average out the distances to other factions so that many factions should not start in close proximity to each other any more. The distances look pretty consistent especially on huge maps.

Other new option is "load_expansion" which can be disabled to turn off any expansion related features. Note that the tech tree will not adjust the dependencies without modding, so any techs or items depending on expansion-only techs will be unavailable, including some victory conditions.
Title: Re: SMACX Thinker Mod
Post by: dino on October 13, 2018, 10:21:34 PM
How deos load_expansion work ? Does it use alpha.txt, or you have to mod alphax.txt to get functional game ?

I've got used to playing smax with original seven, especially since I've figured a way to cut aliens tech out of the game if there are no aliens, without having to replace alphax.txt each time I alternate alen/no alien playthrough. Few new expansion facilities are ok, the only thing that bothers me is getting an ogre in a pod, it's too strong. I'll have to keep my autism in check and stop bothering you with mundane stuff like that in the future ;)
Title: Re: SMACX Thinker Mod
Post by: Buster's Uncle on October 13, 2018, 10:26:05 PM
This is no place to bother keeping your autism too far in check; we're basically a whole community of autists...
Title: Re: SMACX Thinker Mod
Post by: dino on October 14, 2018, 01:41:56 PM
It seems that load_expansion = 0 still uses alphax.txt, but ignores entries introduced by the expansion.
So copying over tech tree from alpha.txt, or otherwise editing it, is required to get functional SMAC game without holes in the techtree.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 15, 2018, 10:15:40 AM
Some partial test results. Large random map, transcend difficulty.
SP movies don't show for some reason, even with movies folder inside game folder.
AIs fare markedly better than in kyrub's version.
Gaians got Weather Paradigm and spiked no less than half of Monsoon Jungle tiles with condensers. I thought adjacent condensers are forbidden, not sure about that? This led to max size bases where half pop are doctors. When I took one of these, it had 2-digit eco-damage despite meager minerals.
All AIs do heavy foresting, even Antimind, who previously relied mostly on fungus. The algorithm doesn't consider faction's fungus production?
Minor nuisance: at mid-game AIs twice scared me with 'Start building SP' message and then presumably switching to other production in the same turn.
Looking forward to future versions of this mod, great work!
Title: Re: SMACX Thinker Mod
Post by: dino on October 15, 2018, 10:44:38 AM
Adjecent condensers are allowed, it's not a glitch.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 15, 2018, 06:14:38 PM
> SP movies don't show for some reason, even with movies folder inside game folder.

Hmm, sounds strange. Do they show up normally if you open the save without the mod active?

> Gaians got Weather Paradigm and spiked no less than half of Monsoon Jungle tiles with condensers. I thought adjacent condensers are forbidden, not sure about that? This led to max size bases where half pop are doctors. When I took one of these, it had 2-digit eco-damage despite meager minerals.

Well, one could check this example (http://www.realmsbeyond.net/forums/showthread.php?tid=8755&page=6) of good old ICS. Probably the former code should be tweaked to prefer more forests on jungle tiles. Happiness management is a continuing problem because of various reasons. At this point I'm considering making some kind of NODRONE ability an optional boost.

> All AIs do heavy foresting, even Antimind, who previously relied mostly on fungus. The algorithm doesn't consider faction's fungus production?

Currently it tries to do its best to get rid of fungus. It would need some kind of a way to decide when using fungus is beneficial by considering the current techs and faction bonuses. This could be useful to implement but usually it's only relevant in the end game. What kind of stats does this Antimind faction have?

> Minor nuisance: at mid-game AIs twice scared me with 'Start building SP' message and then presumably switching to other production in the same turn.

Sometimes it tends to happen when there's few minerals accumulated. Maybe it could use some kind of a fix.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 16, 2018, 09:52:55 AM
> Gaians got Weather Paradigm and spiked no less than half of Monsoon Jungle tiles with condensers. I thought adjacent condensers are forbidden, not sure about that? This led to max size bases where half pop are doctors. When I took one of these, it had 2-digit eco-damage despite meager minerals.

Well, one could check this example (http://www.realmsbeyond.net/forums/showthread.php?tid=8755&page=6) of good old ICS. Probably the former code should be tweaked to prefer more forests on jungle tiles. Happiness management is a continuing problem because of various reasons. At this point I'm considering making some kind of NODRONE ability an optional boost.

> All AIs do heavy foresting, even Antimind, who previously relied mostly on fungus. The algorithm doesn't consider faction's fungus production?

Currently it tries to do its best to get rid of fungus. It would need some kind of a way to decide when using fungus is beneficial by considering the current techs and faction bonuses. This could be useful to implement but usually it's only relevant in the end game. What kind of stats does this Antimind faction have?


The Antimind is a classic NetworkNode faction:
TECH, Ecology, SOCIAL, ++++PLANET, SOCIAL, ---INDUSTRY, SOCIAL, --GROWTH, FUNGNUTRIENT, 2, FUNGENERGY, 2, IMMUNITY, PLANET, FREEABIL, 18, TERRAFORM, 0, MINDCONTROL, 0, FANATIC, 0, WORMPOLICE, 0, PSI, 50, POPULATION, -2, TECHSHARE, 3, ALIEN, 0
Economics, Green, PLANET,
Economics, Free Market, nil,

Currently they benefit from crawlers on forests, but in other regards forests are detrimental to them: all bases are size 3-5, while normally they should be all 8-9 at this stage, and almost no captured natives, that should constitute backbone of their army at this stage (I play with abundant native life on). With such INDUSTRY, they can't afford Tree Farms and Hybrid Forests. In kyrub's they work as energy-rich worm rusher with minimal terraforming and almost no facilities, providing sharp gameplay difference. Ideally they should buy most things, using farm/solar rolling tiles before Industrial Automation for all mineral needs and crawler on rocky tiles after that.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 16, 2018, 04:11:47 PM
The Antimind is a classic NetworkNode faction:
TECH, Ecology, SOCIAL, ++++PLANET, SOCIAL, ---INDUSTRY, SOCIAL, --GROWTH, FUNGNUTRIENT, 2, FUNGENERGY, 2, IMMUNITY, PLANET, FREEABIL, 18, TERRAFORM, 0, MINDCONTROL, 0, FANATIC, 0, WORMPOLICE, 0, PSI, 50, POPULATION, -2, TECHSHARE, 3, ALIEN, 0
Economics, Green, PLANET,
Economics, Free Market, nil,

Well, that is certainly an unusual faction. In nearly all possible ways, it plays different from the normal human factions for which this AI is tuned. Getting it to play this faction as well would require pretty extensive changes to the code. Normally fungus is relevant maybe for a couple of turns before the game ends, but with those massive bonuses, it could pretty much skip most terraforming. It would still need the minerals from somewhere though.

Do you know what kind of units the AI normally uses to capture natives? It appears you're saying the AI might normally have some different units that are more often used to capture/fight the native life. And which version of kyrub's patches are you referring to here?
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 17, 2018, 07:48:00 AM
Well, that is certainly an unusual faction. In nearly all possible ways, it plays different from the normal human factions for which this AI is tuned. Getting it to play this faction as well would require pretty extensive changes to the code.

Well, I'll just place them past factions_enabled limit then.
Do you know what kind of units the AI normally uses to capture natives? It appears you're saying the AI might normally have some different units that are more often used to capture/fight the native life.

Unfortunately, most of this activity takes place before any AI observation sans Scenario Editor could be established. But I believe first worms are captured by basic scouts and sentinels on exploration duty, and then those first worms trigger something like chain reaction, capturing more while driving towards bases or exploring. Of course, if you employ natives in a war against AI, it will soon field empath scout rovers and trance scouts, but I guess that wasn't the point of your question?
And which version of kyrub's patches are you referring to here?

http://alphacentauri2.info/index.php?action=downloads;sa=view;down=108 (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=108)
I checked SP movies from the save - without Thinker Mod they're played.
Title: Re: SMACX Thinker Mod
Post by: T-hawk on October 18, 2018, 05:57:00 AM
Adjacent condensors are not forbidden (and are a good idea since they'll always make both squares rainy.)  The only things forbidden adjacent are boreholes and drill-to-aquifer.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 18, 2018, 06:49:07 PM
But I believe first worms are captured by basic scouts and sentinels on exploration duty, and then those first worms trigger something like chain reaction, capturing more while driving towards bases or exploring. Of course, if you employ natives in a war against AI, it will soon field empath scout rovers and trance scouts, but I guess that wasn't the point of your question?

I was mostly asking what kind of units the AI normally uses to fight the native life. It might have something to do with the default unit plans or abilities. The AI might need some tweaking to be more aggressive in hunting down the worms.

I checked SP movies from the save - without Thinker Mod they're played.

Yeah, this issue has been verified now. The cause is still a total mystery. I don't remember any part of the code interacting directly with the movie playback stuff. Sometimes it's a little bit frustrating to develop mods by patching binaries without the source code because of these kind of unexpected interactions with the other parts of the game logic.

Other new option is "load_expansion" which can be disabled to turn off any expansion related features. Note that the tech tree will not adjust the dependencies without modding, so any techs or items depending on expansion-only techs will be unavailable, including some victory conditions.

This might need some clarification is somebody wants to create a vanilla game mod. The settings are still loaded from alphax.txt but the important thing here is that alpha.txt cannot be copied in its place, because many of the id numbers and item types in alphax.txt tables are hard coded. The game will crash if any of the tables has too few items when it's loading the data. To recreate the whole SMAC environment, one would have to keep the various expansion items in alphax.txt and set their requirements to "Disable" or similar. Load_expansion=0 will still disable many of the hard coded expansion-related stuff. It might even make sense to hide this option from thinker.ini because it's not relevant without a modded alphax.txt.
Title: Re: SMACX Thinker Mod
Post by: dino on October 20, 2018, 12:19:15 PM
I use modified txt files for the ai, but for each faction have the same few buffs.
Maybe instead of providing full support for separate ai factions definitions with all attributes and syntax, better implement few chosen optional buffs for all of them.
My first choices would be: ++GROWTH : so they can popboom, NODRONE : at least until ai psych management is improved,
Second choices would be: INDUSTRY,  INTEREST, TERRAFORM : some turn advantage, without changing drastically how the game plays out, or player perception when interacting with them.

As for smac mod, just add a line of description to thinker.ini variable about modified alphax.txt with SMAC tech tree and expansion features disabled being required and put it at the end of file.
Probably just replacing tech definitions with SMAC ones, while keeping unused ones in the file is enough, changing anything to disabled won't hurt, but probably is not required.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on October 20, 2018, 01:40:02 PM
I helped write a smac in smax mod that works pretty well a little while ago. The alphax, help, etc work has already been done if anyone wants to use it here.

For that mod we used features Yitzi's provided for removing some pods and stuff, iirc. You may have replicated that already.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 20, 2018, 05:57:48 PM
> I helped write a smac in smax mod that works pretty well a little while ago. The alphax, help, etc work has already been done if anyone wants to use it here.

Any download links?

> For that mod we used features Yitzi's provided for removing some pods and stuff, iirc. You may have replicated that already.

It's pretty hard to figure what was done there without any source code level documentation. Setting the smacx_enable flag in the engine is the only thing load_expansion config variable does. Reading some of the patch docs one gets the impression that load_expansion=0 disables even more of the expansion content than Yitzi's patch.

If you have already created new alphax, help, etc files it is possible to set the engine to read the modified content from different filenames, e.g. alpham.txt when expansion is disabled, so that users don't have to overwrite any files if they want to install that mod. I would actually prefer to do it that way.

Btw, the cause for the SP movies not playing has been somewhat narrowed down. If Thinker starts just with the normal GOG binary, movies play as usual. With Scient patch v2.0, movies are not shown even if they are enabled in the settings. I'm not sure what's going on there or if this is some kind of an undocumented feature of the patch.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 21, 2018, 09:30:58 PM
Reporting serious bug in Thinker-dev-20181013. Mimi, being in pact with me, off-loaded 2 colony pods on my soil and settled without any harm to the pact. Autosaves before and after event are attached. I play as Satori custom faction from http://alphacentauri2.info/index.php?action=downloads;sa=view;down=264. (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=264.)
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on October 22, 2018, 01:00:57 AM
> Any download links

http://alphacentauri2.info/index.php?topic=17869.0 (http://alphacentauri2.info/index.php?topic=17869.0)

On page 2 Yitzi briefly talks about what they did on the exe side.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 23, 2018, 09:55:13 PM
New version 20181023 is now available from downloads (https://github.com/induktio/thinker). Changes include:

- Fixed base creation bug on other factions territory.
- Improved spawn placement. Now it guarantees factions wont spawn on tiny islands.
- When expansion is disabled, modified txt files are now read from "ac_mod" folder (see thinker.ini).

> http://alphacentauri2.info/index.php?topic=17869.0 (http://alphacentauri2.info/index.php?topic=17869.0)

It must be said here this mod is not instantly compatible with Thinker because Yitzi's patch changed the alphax.txt file format. Those additions are not supported by this mod in any way. Otherwise smac-in-smacx should probably work with this mod after some changes.

If anyone has ideas how to get the SP movies working again, could be also useful to know.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 24, 2018, 09:46:32 AM
More test results. Large random map, random opponents, transcend difficulty. Miriam flawlessly crusaded Caretakers (who were being eaten by Antimind), then Antimind proper. Yang meanwhile annihilated University. He undoubtedly would conquered me if got Doc:Flex earlier. Pirates, as in previous test, were very passive and almost not settled - perhaps, some of my alphax.txt edits hinder them (but then again, in kyrub's they were always widespread and strong with the same settings). I cornered market for less than 10k EC just before Fusion Power. Probably, economic victory using Satori with their commerce bonus should be considered cheating.
Question to all: are AIs always so indifferent to player's attempt at economic victory? I didn't tried it in ages, so don't remember. Not a single hostile action in those 20 turns, despite being obstinate to seething.
Also noticed change in game behavior, could be bug: in kyrub's Unity pods inside base radius were skewed toward favorable pops - almost never worms, mostly monolith/resource bonus, oftentimes together with unit/tech/comm frequency. Now all 3 pods near HQ produced worms.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on October 24, 2018, 12:34:52 PM
I'm on a cycle tour atm, but I can have a look at the videos next week if you haven't sorted it by then.

I had quite a root around in that code a while ago.
Title: Re: SMACX Thinker Mod
Post by: dino on October 24, 2018, 12:41:40 PM
I'd consider both economy and transcend, but especially economy cheating and have these disabled in my games.
I think it's impossible to code AI to successfully counter them, I'm not even sure a human player can successfully counter these, short of initiating nuclear holocaust.

If you'll tell me that conquering the world is tedious grind, than don't do it ?
I quit the game and consider it won once I know, I can't be stopped.
I don't need a score on a victory screen to confirm that.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 24, 2018, 01:54:55 PM
I think it's impossible to code AI to successfully counter them, I'm not even sure a human player can successfully counter these, short of initiating nuclear holocaust.
This! One surgical planet buster at enemy HQ is all you need. Even before Orbital Spaceflight AIs could at least try to stop the offender with force. Particularly in that game I wrote last comment about, Mimi had resources of 3 factions at her disposal, and Yang those of 2. If they stopped their squabble and turned attention on greedy merchants sitting in 7 bases on medium island, in 20 turns all will be over for me.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 24, 2018, 10:21:24 PM
Question to all: are AIs always so indifferent to player's attempt at economic victory? I didn't tried it in ages, so don't remember. Not a single hostile action in those 20 turns, despite being obstinate to seething.

I don't remember them having any special logic for countering economic victory. That might change, however. There has been some talk of implementing the diplomacy mod for these kind of situations, but I haven't researched the variables much yet.

One thing that probably should be changed is the fact that AIs almost always stay content if you give them the techs they demand. A very simple way of changing the diplomacy behaviour would be to flip the "want revenge" or even "fight to the death" diplomacy flags if the AIs determine another faction is too weak or attempts the economic victory. I'm not sure if the latter variable strictly needs to be used, but always giving in to demands works a little too well as an exploit. These variables are also visible in the scenario editor, if anyone knows more of their effects on diplomacy.

Also noticed change in game behavior, could be bug: in kyrub's Unity pods inside base radius were skewed toward favorable pops - almost never worms, mostly monolith/resource bonus, oftentimes together with unit/tech/comm frequency. Now all 3 pods near HQ produced worms.

Hmm, was that an one time occurrence or does it keep repeating for you? This might be related to the faction placement patch but I'm not sure. Often the pods seem to produce goodies next to the HQ in my tests.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on October 25, 2018, 09:05:33 PM
Hi Induktio.
Thank you for your hard work. I started to play your mod and it seems interesting so far. One question about releases. I navigated to download page which leads to your GitHub project which has a link to your dropbox with releases. Latest one I see there is 0.7 from 10/3/2018. Yet somewhere in this topic you mentioned you created another on on 10/23.
Another thing is that I've looked inside of 0.7's thinker.ini and it is pretty small and doesn't contain all these configuration variables you mentioned recently - like including other mods, etc. Would you mind publishing your latest version in installation format? Or tell me how to make it out of your code or something. Much appreciated.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 25, 2018, 09:38:04 PM
> Would you mind publishing your latest version in installation format?

All the recent posts here relate to the develop builds which are also on the download page but on the "develop" folder. They are just versioned by their build date and their install process is also the same, just unzip to the game folder. There isn't any reason not to use them if you want to try the latest features. :)
Title: Re: SMACX Thinker Mod
Post by: tnevolin on October 25, 2018, 09:48:01 PM
Cool. Thanks!
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 31, 2018, 10:27:48 AM
Also noticed change in game behavior, could be bug: in kyrub's Unity pods inside base radius were skewed toward favorable pops - almost never worms, mostly monolith/resource bonus, oftentimes together with unit/tech/comm frequency. Now all 3 pods near HQ produced worms.

Hmm, was that an one time occurrence or does it keep repeating for you? This might be related to the faction placement patch but I'm not sure. Often the pods seem to produce goodies next to the HQ in my tests.
Doesn't repeat, must have been one-off bad luck.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on October 31, 2018, 01:14:39 PM
Also noticed change in game behavior, could be bug: in kyrub's Unity pods inside base radius were skewed toward favorable pops - almost never worms, mostly monolith/resource bonus, oftentimes together with unit/tech/comm frequency. Now all 3 pods near HQ produced worms.

Hmm, was that an one time occurrence or does it keep repeating for you? This might be related to the faction placement patch but I'm not sure. Often the pods seem to produce goodies next to the HQ in my tests.
Doesn't repeat, must have been one-off bad luck.
I believe pods can produce anything. It is just at the beginning they are more favorable probabilities that's how I understand it.
Title: Re: SMACX Thinker Mod
Post by: Fibonacci on October 31, 2018, 02:16:55 PM
Having done lots of save scumming, I can demonstrate that there is a difference between pods at the landing site of a base, and random scattering pods across the planet. Scattered pods seem to be able to produce anything, and can also fall within the batch at a faction's landing site at the start of the game. Landing site pods on the other hand seem to fall into one of four categories, just guessing based on what happened after several hundred save/reloads. "Blessed" landing site pods seem highly skewed in favor of a free tech, a comm. link to another faction, or a monolith. "Cursed" landing site pods seem skewed toward a mind worm, spore launcher, fungal growth, or alien artifact. "Vehicle" landing site pods seem to be skewed toward a unity rover, the 6r/3r police Mk1 thing whose name escapes me currently, or a unity foil (when along a coast). The fourth being regular chances at everything. The other thing that suggested to me that landing site pods are even a thing is the severely decreased chance of getting both a bonus resource (nutrient/energy/mineral) along with a "positive" (as in non-alien life based result). Taking a sample of rewards on different pod pops in the landing site radius suggests there are both landing site regular pods and scattered pods, based on similar reward, but vastly different secondary bonus along with the reward.

The last hint that "Cursed" landing site pods are even a thing at all, if you take units over to a neighboring AI landing site base, and there are any pods that the AI could have popped, but "chose" not to. I have saves of both Domai and Zakharov leaving a pod alone into the later game, I then come over and save scum a bit to test it out, and it was indeed "Cursed".

It's a game feature that settling a base next to a pod eliminates "alien life form" results from the pod, regardless of whether it was regular or cursed. Similarly, completely occupying all of the surrounding 8 squares of a "Cursed" pod reduce the "negative" rewards to just fungal blooms, but positive results seem to replace the native life rewards.

I have several saved games on turn one with Iron Man and Do or Die disabled, Look First enabled, and 3 or 4 pods that can be popped on turn one before disbanding the colony pods to cheat death and start again elsewhere. They are easiest to produce with Cha Dawn or Santiago when beginning on a river, although I suspect it's possible to get 5 or more pods if you start along a coast and get a bonus Unity Foil or Rover (unlike alien artifacts these bonus units get their moves the turn they're found).

I can probably dig out the saves to share if anyone is interested in verifying my observations. However since they're almost all first turn, they're fairly easy to replicate. Using Yitzi's 3.5D and Good Old Game's Alien Crossfire at the moment, but I'm willing to try out a few more in Alpha Centauri unpatched, or with official patches.

I can test using WINE, regular or virtualbox XP, virtualbox win98 (while I still have the installation disks/box/license for Windows 98, I no longer have a machine that reliably runs Windows 98 natively), regular or virtualbox win7, or regular win10. (Just in case one of the combinations gets some the entropy sources for the pseudorandom number generation wrong, I'm thinking WINE in particular)
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 31, 2018, 06:50:22 PM
> Having done lots of save scumming, I can demonstrate that there is a difference between pods at the landing site of a base, and random scattering pods across the planet.

Interesting, but apparently you didn't run those tests with the Thinker binary? It would be mostly useful to know if there's any differences between Thinker and vanilla behaviour. Any significant differences should probably be apparent after a much smaller number of tests though.

> I can probably dig out the saves to share if anyone is interested in verifying my observations.

Thinker should not affect any RNG outcomes directly, however, there may be some indirect effects when a new map is generated with faction_placement enabled. There's one function call in the vanilla placement algorithm that sets some bits related to the starting location which might have an effect on pod results. Next version will include a small tweak so that the modified faction placement algorithm also calls this function. Note that this fix should not have an effect on maps which were already generated using a previous version.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on October 31, 2018, 08:21:52 PM
Induktio,

#1. Why your topic is not in modding section? I was confused when I couldn't find it there.

#2. Wow. Great mod! I really see how AI behavior changed. Now it tries to occupy the big continent completely. As well as some other improvements. Please keep up this work. I believe together with Scent's bug fixes this is the most complete/advanced mod base there is. I call it mod base as anyone can drop alphax.txt changes on top of it to finalize the experience the way they like. Maybe I've said it before but that's OK.

#3. Observation.
In vanilla game I noticed two things about AI expanding bases. 1) They easily go from land to water and vice versa for aquatic factions. In other words, shore doesn't stop their expansion a bit. 2) AI expands like crazy at the very beginning. Then when they reach somewhat 20-30 bases they suddenly slow down tremendously to the point when huge land areas right next to their territory stayed unoccupied for the rest of the game. Me or other still expanding faction usually go there in the middle of the game when it seems to be much easier for this landmass originated one to take over this territory.
In your mod I see these changes. 2) They continue producing colonies like crazy throughout the whole game and tend to squeeze in every tiny spot on their continent or ocean. 1) They somehow do not go over the shore border. Land factions do not go to water ever. Aquatic ones do not go to land at all and instead infest complete ocean. I am the only one who cross the body of the water to found bases on inhabitant islands or in water. Ocean is completely empty when there is no aquatic factions - not a single sea base.
It maybe this particular game fluctuation but I don't think so. With total of 100 bases on a planet some of them bound to be in sea. I wander if your fix to 2) somehow affects 1)? Maybe AI got priority in building colonies but this priorities got so skewed that they effectively nullify the chance of building colony of other realm (sea for land faction and land for aquatic).
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 01, 2018, 08:00:10 AM
They somehow do not go over the shore border. Land factions do not go to water ever. Aquatic ones do not go to land at all and instead infest complete ocean. I am the only one who cross the body of the water to found bases on inhabitant islands or in water. Ocean is completely empty when there is no aquatic factions - not a single sea base.
Can't support this on both accounts. In my playtest all factions happily switched to seabases when they ran out of unoccupied land, albeit shrinking due to sea level rising. Also seen a few colony pods moved by boats to claim empty islands.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 01, 2018, 01:21:24 PM
They somehow do not go over the shore border. Land factions do not go to water ever. Aquatic ones do not go to land at all and instead infest complete ocean. I am the only one who cross the body of the water to found bases on inhabitant islands or in water. Ocean is completely empty when there is no aquatic factions - not a single sea base.
Can't support this on both accounts. In my playtest all factions happily switched to seabases when they ran out of unoccupied land, albeit shrinking due to sea level rising. Also seen a few colony pods moved by boats to claim empty islands.
This may be. My testing is not exhaustive. I'll keep looking.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 01, 2018, 02:42:11 PM
I call it mod base as anyone can drop alphax.txt changes on top of it to finalize the experience the way they like.

A big problem with this game has been the very convoluted ruleset which complicates AI coding greatly. They noticed that in the later Civ games and made some design decisions which made the game easier for AIs. It's maybe possible to write the AI in a really generic way that handles all kinds of modded values in the strategy, but that would probably balloon the codebase by thousands of lines at least. :-/

In vanilla game I noticed two things about AI expanding bases. 1) They easily go from land to water and vice versa for aquatic factions. In other words, shore doesn't stop their expansion a bit. 2) AI expands like crazy at the very beginning. Then when they reach somewhat 20-30 bases they suddenly slow down tremendously to the point when huge land areas right next to their territory stayed unoccupied for the rest of the game.

If you're talking about unmodded game there, it sounds quite unlike the performance I've seen. Often there's been instances where factions stagnate on 5 bases or something, so 20-30 would be a pretty good result for an AI. That was actually some of the reasons that prompted me to start this project. Also one of the eternal gripes with AI programming has been the coordination of land and sea units. I don't really remember the AI transitioning well from sea to land bases at all (in the unmodded game). I'm planning some features for the next version to address that issue.

Currently Thinker AIs will try to colonize sea but only if the land area nearby is already full. While occupying the land area is the first priority, they could maybe produce more sea colony pods but the AIs rarely seem to get any good production out of the sea bases.

Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 01, 2018, 02:45:52 PM
If you're talking about unmodded game there, it sounds quite unlike the performance I've seen. Often there's been instances where factions stagnate on 5 bases or something, so 20-30 would be a pretty good result for an AI.
I meant it as a max limit which they almost never cross. Sometimes they could stagnate below that for sure.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 04, 2018, 05:38:47 PM
Induktio,

I understand you modified some exe functionality in your mod. I am working on balancing conquer strategy with development strategy. Here is the relevant topic I opened to discuss the thing.
http://alphacentauri2.info/index.php?topic=21046.0 (http://alphacentauri2.info/index.php?topic=21046.0)

Regarding this I am quite curious if you can and like to extend your modding in this direction. Not that I insist. If you don't then I'll continue tweaking txt options to achieve it. However, if you do then I can build on top of it so it'll be slightly different txt tweaks.

Here are few things relevant to my work. Let me know your predisposition toward them.
* Disable healing completely or modify healing rates under different circumstances (territory, base, bunker, corresponding morale facility).
* Modify unit cost calculation formula. I am not talking about specific changes now - just a generic possibility.
* Modify how weapon picture is assigned to a weapon. Currently it is assigned by the weapon attack rate. Could it be done by the weapon name? This is to be able to change weapon attack rate without losing corresponding picture. This change is pretty minor and optional.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 05, 2018, 06:18:15 PM
This might be a good time to give an update of the features I've been researching. After PvtHudson pointed out the Antimind faction, that got me really thinking about expanding the strategy to native-heavy factions. It will require some additional code, but actually it's not too much.

I'm planning to implement some more ways to make use of fungus and probably the AI will also build native units if its psi bonuses are high enough. Antimind should be a pretty good test case for this since the bonuses are so abnormal. Another new feature relates to the way AI uses its colony pods and transports.

* Disable healing completely or modify healing rates under different circumstances (territory, base, bunker, corresponding morale facility).
* Modify unit cost calculation formula. I am not talking about specific changes now - just a generic possibility.
* Modify how weapon picture is assigned to a weapon. Currently it is assigned by the weapon attack rate. Could it be done by the weapon name? This is to be able to change weapon attack rate without losing corresponding picture. This change is pretty minor and optional.

Hmm, not sure about these. After all we're just dealing with a binary without source code here and changing some things is very brittle and time-consuming. This project just started as an AI coding exercise of some sorts so I'm not very inclined to go modifying the engine, at least not without a clear understanding of how the change is supposed to benefit AI performance.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 05, 2018, 07:44:34 PM
I agree that changing these formulas is very risky. Remember I didn't insist just asked if you inclined to do something like that.

If you looking for reason it is explained here http://alphacentauri2.info/index.php?topic=21046.0. (http://alphacentauri2.info/index.php?topic=21046.0.) I can repeat reasons for disabling healing here once more.
The multi round combat strongly skews odds toward stronger unit. As an example, with 3:2 odds you wins not 60% of the time as would be calculated directly from the odds but nearly 100% of the time. So slight strength advantage gives you almost 100% winning chance. Combined with healing it makes army of such units indestructible. You can build like 10 needlejects capable of knocking out enemy base defenders and just bomb-heal-repeat conquer them without casualties. Once such slight advantage is achieved it makes conquest expansion not even exponential but explosive like.
This breaks build-conquer balance. For AI it is even worse as it doesn't know about indestructible army tactics and doesn't use it. Humans do and that's why they beat it every time.
Disabling healing breaks this vicious win-heal cycle. Now fully healed more advanced unit still wins all the time. However, it irrecoverably expends HPs and is bound to die at some point. This alone makes casualties proportional to unit strengths ratio. No more indestructible armies and grades of weaker armor now do matter as they wear attacker down proportional to armor rating.

Unit cost is a different story. It doesn't help AI directly as it equally affects all players. So it may not lie in the path of your improvement. However, in its current form it makes infantry attackers ridiculously cheap. This again benefits conquer strategy where AI sucks. Changing this formula allows balancing attacker-defender unit effectiveness ratio to the extend where AI tactical choices becomes reasonable.
Once again, unit cost is kinda generic improvement. So I do not advertise it to you. Merely sharing my opinion about it.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 06, 2018, 08:44:02 AM
You can build like 10 needlejects capable of knocking out enemy base defenders and just bomb-heal-repeat conquer them without casualties.
So can them. AIs even before ThinkerMod were capable of amassing needlejets and destroying every former, colony pod and crawler in range, then switching to base defenders.
For AI it is even worse as it doesn't know about indestructible army tactics and doesn't use it. Humans do and that's why they beat it every time.
Sorry, I don't catch. AI builds units with highest available attack, and it uses healing, doesn't it? But probably we should talk about this in your thread, not here.

It's indeed time to summarize testing experience of ThinkerMod. It aimed at improvement of AI performance, and in my opinion it achieved this goal brilliantly. Faster expansion, aggressive land claim, crawler infrastructure help AI tremendously. Maybe it's just my poor skill, but I fear I have to abandon long-customary Transcend difficulty. Bravo, Induktio! Looking forward for future developments. Is it time to improve diplomacy?
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 06, 2018, 01:18:48 PM
You can build like 10 needlejects capable of knocking out enemy base defenders and just bomb-heal-repeat conquer them without casualties.
So can them. AIs even before ThinkerMod were capable of amassing needlejets and destroying every former, colony pod and crawler in range, then switching to base defenders.
For AI it is even worse as it doesn't know about indestructible army tactics and doesn't use it. Humans do and that's why they beat it every time.
Sorry, I don't catch. AI builds units with highest available attack, and it uses healing, doesn't it? But probably we should talk about this in your thread, not here.
Sure if you like I can copy your response and continue there.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 07, 2018, 04:28:13 PM
Oh, hellooo. I included a screenshot from the first test game I ran with these newest changes. It was a large random map with 4 standard factions plus Pirates and Antimind. Turn is 140 and the Gaian AI dominated throughout the whole game. Some of the fast growth is explained by the nearby jungle but it is not everything. Labs output here is about 4600 per turn, and the growth speed has been far above any typical test runs. Gaia would later transcend on turn 160 with labs output finally breaking ten thousand if I remember right. Manifold Harmonics contributed to this in a significant way probably.

So, develop version 20181107 is now available from downloads. Changes summarized:

- Rewritten colony pod movement algorithm
- Sea bases are now able to transport colony pods to land
- AI has an understanding of fungus production bonuses and will plant it if it's useful
- AI will build native units whenever psi bonuses are high enough compared to conventional weapons
- Other minor tweaks to production priorities
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 08, 2018, 10:11:23 AM
Fantastic!

It still seems weird to see Gaians with loads of boreholes and so eco damage. It would be great to see their philosophy reflected in their play, but OTOH boreholes are crazy good.

I can't see an immediate solution.
Title: Re: SMACX Thinker Mod
Post by: k3v on November 09, 2018, 05:51:23 PM
Played a new game with the latest version. Huge transcend in 2236.

This is the kind of carnage i wanted!
(click to show/hide)

Caretakers were booming so hard that a meteor took out his cap and 4 other bases lol. I think ive only seen this happen once before.

I thought my start was average, but turned out very slow. Missed WP+ME, had to disband formers to get VW in time lol.
Missed EG, slight beeline error, but I dont think it wouldve mattered, gaia goes straight for it. Hence lost Govenor. Didnt get governor till 2210! Two allies killed, forgot to set dont restart killed, so morgan came back but stayed on two bases rest of the game. So heaps of potential energy lost.

I think without a really good start, first governor is impossible due to how well the ai booms now, 60 pop at first governor (I had 46 with PTS, turn 70). Ive havent played with Lal in the game yet lol, that would definately be impossible.

Something ive never seen before was overall terraforming damage causing rising sea levels, because it was never a factor before (ai just didnt terraform enough). I lost a base and like 7 boreholes because of it.

Angels maxed at 1000 science at the end. I got a few level 6+ techs from AI's which is huge. Usurpers kinda sucked, even though they were isolated. I think they're unable to take fm+wealth, which hurts them alot as well as no commerce.

I think the only way to improve ai builder from here would be forcing them to play the builder strat. The AI cant really build space pods, cause they'll never get CBA and then only have a few bases with an aerospace academy. But with the 70% production boost forcing aerospace academies in all bases is easily doable. Do they treat pods as a base facility? Can they build more then 1 per base? I imagine space pods arent that easy for the ai to understand, but with the base spam they add up to a lot.

I'd love to have this mod on a double size huge map with all 14 factions, too bad theres so many hardcoded obstacles for it.

Anyway, the mod is amazing, really great work.

Saves attached if anyone wanted.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 09, 2018, 11:25:06 PM
Hi Induktio.
I was playing your mod with all but Fission reactors disabled. Works right in the way that I cannot equip unit with any other reactor. However, I see that AI equip their custom units with Singularity one!!! Like rover formers and armored sea probes. That seems like a glitch in a game. When reactor is disabled AI somehow can pick it up for new unit design. I saw only non combat units with Singularity reactor so far, though.
Anyone observed something like that?
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 10, 2018, 11:25:46 AM
If anyone has ideas how to get the SP movies working again, could be also useful to know.

You need movlistx.txt from scient's v2 patch. Attached here.

Scient added this file so that we can have different end-of-movie text for smac and smax (because hunter seeker alg does different things in each).
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 10, 2018, 04:04:57 PM
Lots of interesting stuff here to address.

> Something ive never seen before was overall terraforming damage causing rising sea levels, because it was never a factor before (ai just didnt terraform enough).

Yeah, I bet the original designers didn't anticipate AIs with 50 boreholes. The speed of the sea rise is getting pretty excessive with this heavy terraforming. I should probably recommend players to lower this setting in alphax now? Maybe put recommended settings in Details.md for documentation?

1, 1     ; Numerator/Denominator for frequency of global warming (1,2 would be "half" normal warming).

> Angels maxed at 1000 science at the end. I got a few level 6+ techs from AI's which is huge. Usurpers kinda sucked, even though they were isolated.

I'm thinking the fact that aliens cannot engage in commerce is now a very significant limiting factor for them. With all the new energy being produced, the AIs seem to earn a lot from trade. This might be a good thing.

> The AI cant really build space pods, cause they'll never get CBA and then only have a few bases with an aerospace academy.

Do you just mean satellites here? They do build aerospace complexes and satellites pretty quickly after learning the techs. It seems your game ended almost just after they learned spaceflight. :-/

> I'd love to have this mod on a double size huge map with all 14 factions, too bad theres so many hardcoded obstacles for it.

There have been many modding ideas, but this is actually the one that will *never* happen without a full open source port. Consider the fact that there are exactly 8 bits in a byte, and single byte values are used all over the binary to store faction boolean values. Now you get the idea.

> However, I see that AI equip their custom units with Singularity one!!!

There was a bug in the old code where it didn't check properly for disabled techs. It is fixed in the most recent version but it can't undesign already designed units in an old save. It should work properly on newly started games of course.

> You need movlistx.txt from scient's v2 patch. Attached here.

So this file is basically a verbatim copy of movlist.txt if expansion is enabled? If I were to keep this feature, I think the game should read those modded values from ac_mod folder just like the other modified files if expansion is disabled. Does not feel useful to distribute a copy of a standard file with the patch. I'm not sure if some other files might have to be put into that folder too, currently the list is: alphax.txt, helpx.txt, conceptsx.txt, tutor.txt, labels.txt

Also, what do the players think about these things:

- Should the AI build armored crawlers in mass? After fusion reactors armor becomes so cheap I'm tempted to have them build crawlers with armor installed.
- Is the colony pod production rate good enough now or should it be changed? Maybe the difficulty level should affect the desired AI expansion rate?
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 10, 2018, 04:56:18 PM
> However, I see that AI equip their custom units with Singularity one!!!

There was a bug in the old code where it didn't check properly for disabled techs. It is fixed in the most recent version but it can't undesign already designed units in an old save. It should work properly on newly started games of course.

You mean in your old code? Good to know. Cool man. Thanks for fixing this! I can continue crunching unit costs now.
:)
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 10, 2018, 07:41:18 PM
Quote
So this file is basically a verbatim copy of movlist.txt if expansion is enabled? If I were to keep this feature, I think the game should read those modded values from ac_mod folder just like the other modified files if expansion is disabled. Does not feel useful to distribute a copy of a standard file with the patch. I'm not sure if some other files might have to be put into that folder too, currently the list is: alphax.txt, helpx.txt, conceptsx.txt, tutor.txt, labels.txt

The text files in scient's patch are generally better than the ones that come with the game. If I were you I'd just expand scient's installer (code available) and add thinker to it. If you really don't want to use movlistx.txt either make a copy on first run or just change the binary to use movlist.txt?

This reminds me: have you had a look at the save-game logic? It would be good to save a list of the active factions in or related to each save game: at the moment you will end up with the wrong art etc. for factions if you load a scenario and you have to keep fiddling with alphax if you use custom factions a lot.

Title: Re: SMACX Thinker Mod
Post by: Induktio on November 10, 2018, 08:05:43 PM
The text files in scient's patch are generally better than the ones that come with the game. If I were you I'd just expand scient's installer (code available) and add thinker to it. If you really don't want to use movlistx.txt either make a copy on first run or just change the binary to use movlist.txt?
Hmm, yeah. Basically there are two behaviours one could choose from:

1. If expansion is enabled, use "movlist.txt"
    Else use "ac_mod\movlist.txt"

2. Use a filesystem call to copy movlist.txt to movlistx.txt if the latter is missing.

Movies would work fine after either of these two steps, but not sure really which one is better. Option 2 would work better if one also plays the Scient-patched game without Thinker but I don't currently see any other reason to use it over option 1.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 11, 2018, 12:46:00 AM
In scenario 1 what is the difference between the two files?

And if you're distributing one of the scient variants why not both?
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 11, 2018, 02:17:26 PM
> And if you're distributing one of the scient variants why not both?

I'm not distributing any of the txt files currently. Probably it's better for people to install the Scient patch files separately if they want all the stuff. My plan is to just have the binary either work with those or with the stock files provided by the game installer. The preference is to allow installing this mod without having to overwrite any other stuff. Keeping it very minimalistic with the dependencies.

I'm not sure how much use the load_expansion feature is going to get or how much time should be spent on it, but in theory it would be nice to have a way to turn off the expansion related features.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 11, 2018, 04:42:26 PM
I think SMAC is the better game, so I'd vote for it :)

As for movlist this seems pretty trivial:

if (expansion && exists(movlistx.txt))
    use movlistx.txt
else
    use movlist.txt
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 12, 2018, 01:07:19 PM
- Should the AI build armored crawlers in mass? After fusion reactors armor becomes so cheap I'm tempted to have them build crawlers with armor installed.
Sure, why not. Armored probe teams already added me worries.
- Is the colony pod production rate good enough now or should it be changed? Maybe the difficulty level should affect the desired AI expansion rate?
It's good that AI always has several CPs idly rolling back and forth through his lands (and mine if allied), thus they near instantly claim any released land. I'd say, rate is at least enough, perhaps even slightly excessive.

Can the "Empty facilities NN" from #FACILITIES be added to AI's build queues with low priority if their prerequisite has been changed from Disable to something?
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 12, 2018, 04:42:00 PM
> It's good that AI always has several CPs idly rolling back and forth through his lands (and mine if allied), thus they near instantly claim any released land.

Players can probably see the difference pretty quickly there, the new colony pod algorithm actually iterates every reachable tile nearby and sends the pods to the best square that fits the desired city spacing.

> Can the "Empty facilities NN" from #FACILITIES be added to AI's build queues with low priority if their prerequisite has been changed from Disable to something?

Building effects are hardcoded, so I'm guessing these are the buildings that would provide some free energy only if alphax is modded. Build queue is somewhat hardcoded in the mod too. What I think could be done here, the queue needs to look at each of the energy bonus buildings abstractly and calculate expected return versus minerals and maintenance cost. Then select the building with the highest score. It can be done fairly easily but one needs to figure out the energy bonus calculation and balance this with other priorities.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 15, 2018, 12:00:47 PM
I feel like soon it would be the time to wrap up an another release of the mod. It's been a while since v0.7 already. Still it would be nice to have a couple of more features related to either social engineering or diplomacy. I've been looking at those areas and the reversing database does not cover them very well, so any progress is not that quick. In the case of adjusting SE choices, I'm not sure if it's doable to attempt to patch it or if it will require a larger rewrite. Some of the default AI choices are quite horrible so it may actually be the biggest obstacle to AI performance right now which is pretty annoying.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 15, 2018, 01:59:27 PM
Still it would be nice to have a couple of more features related to either social engineering or diplomacy. I've been looking at those areas and the reversing database does not cover them very well, so any progress is not that quick.
Maybe, start with a couple of small bugfixes to get grasp of the matter? Like, fix annoying multiple late game hate-messages in a row, or exploit of provoking AI into vendetta with troops removal demand?
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 18, 2018, 05:17:03 PM
During the last week or so, I've been planning a feature Thinker has not modified before: combat unit movement! :)

Arguably this is the most complex part of AI programming, at least in the original game, the single biggest function dealt only with unit movement. There's certainly many different variables to consider, starting with combat odds and zones of control that interfere with path finding. In the first phase, this feature will probably be limited to evaluating counter attacks up to a couple of tiles away from the unit.

I think generally, the AI is really passive in attacking the native life, so having this feature will be important for the AIs to handle abundant native life. The units should also start to heal at monoliths because currently the AI does not seem to understand that, they only try to acquire the morale upgrades and then forget them. Also I'm not sure if the normal AI ever attacks with a hasty penalty, but in this case, it is possible to implement this behaviour now.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 19, 2018, 04:56:39 AM
I think generally, the AI is really passive in attacking the native life, so having this feature will be important for the AIs to handle abundant native life.
So true! Single spore launcher can stiffle an entire AI faction in the start.
Also I'm not sure if the normal AI ever attacks with a hasty penalty.
I've seen that.

Thanks to your efforts, SMAX has received biggest AI upgrade in 20 years and is already much harder and involving game than before. I don't dare to imagine what can be achieved in the tactical combat field!
Title: Re: SMACX Thinker Mod
Post by: MercantileInterest on November 19, 2018, 10:08:49 PM
Good to have a code modder among us once again.

Before his disappearance, Yitzi was talking about ways to scale back infiltration. Rather liked the thought of being able to remove infiltration by sending a probe team into an enemy base, perhaps with a low chance of success. Other ideas include a Planetary Council measure to vote on removing all infiltration or using one of the extra secret projects slots for the same effect. No idea how practical these measures might be, except that Yitzi said the first one was doable. Concern with infiltration mainly applies to multiplayer but that's my preference anyway.

Be back with more observations on Yitzi features later. Glad to have you here!
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 19, 2018, 11:51:22 PM
Before his disappearance, Yitzi was talking about ways to scale back infiltration. Rather liked the thought of being able to remove infiltration by sending a probe team into an enemy base, perhaps with a low chance of success. Other ideas include a Planetary Council measure to vote on removing all infiltration or using one of the extra secret projects slots for the same effect. No idea how practical these measures might be, except that Yitzi said the first one was doable. Concern with infiltration mainly applies to multiplayer but that's my preference anyway.

Be back with more observations on Yitzi features later. Glad to have you here!

I think it is too small scale change. There are much bigger clearly visible problems. Besides, AI doesn't need an infiltration to see all your units.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 20, 2018, 04:51:38 AM
If the works ever came to changing the rules of the game, there are plenty of ideas waiting (albeit of various utility and difficulty), at least http://alphacentauri2.info/index.php?topic=19520.0 (http://alphacentauri2.info/index.php?topic=19520.0) and http://alphacentauri2.info/index.php?topic=17418.0. (http://alphacentauri2.info/index.php?topic=17418.0.)
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 21, 2018, 01:02:50 AM
Okay, so develop version 20181120 is now available from downloads. Most interesting changes since last update:

- SP movies should now work by default in GOG installation
- AI starts building armored crawlers after fusion reactors

First phases of land combat unit logic implemented:
- AI considers any possible counter attacks on enemy units up to ~3 tiles away
- Attempts only attacks on tiles it can reach in one turn, sometimes with a hasty penalty
- Even base tile defenders can counter attack now, given favourable odds
- AI heals units at monoliths now

Triads other than land are not affected yet. It's hard to say how accurate the combat odds or tactical calculation formulas are yet, so they will probably receive some revisions later. Post here your observations if the AI behaviour changes noticeably.

> Concern with infiltration mainly applies to multiplayer but that's my preference anyway.

Note that IP multiplayer is not supported in this mod due to the large amount of extra code required to synchronize the game state across networks. I'm not sure if I would even attempt implementing that.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 22, 2018, 12:51:35 AM
I saw it first few times when I was talking to Lal. Later on it displays 25 as it should.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 22, 2018, 12:53:22 AM
Chart is not scaled properly.
Another thing is that regardless of whether I right-click left or right panel and select what to display it displays my choise on left panel only.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 23, 2018, 09:04:28 AM
Does AI build probe ships? Vanilla AI built Probe Foils if predefined and put them to good use (however, it didn't use them against coastal bases). In the recent game on standard random map with the latest ThinkerMod dev build, there were no probe ships in unit roster screens of all factions. Was it due to Librarian difficulty? By the way, my impression is the new Librarian corresponds to the old Transcend most closely.
Another question about predefined units. On what condition AI builds disabled *Sea Formers and Sea Escape Pods? Looks like those two rows 5 and 22 are hardcoded, possibly wired to MY. Sven in particular goes mad on *Sea Formers.
About unit movement amends regarding unarmored probe teams and, in a lesser degree, attackers in general. Is it feasible to teach them to end turn in one tile with friendly defender, or as far from target as possible to cross in one turn (especially ships), or outside of enemy vision, or at least not adjacent to enemy if possible? Recently my garrison unit broke record, eliminating a stack of no less than 25 Free Drones probe teams.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 23, 2018, 02:33:43 PM
My apologies. Looks like these errors were there result of txt misconfiguration. I've verified it and updated and don't see it happening any more.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 23, 2018, 08:30:54 PM
> Does AI build probe ships?

If the AIs have foils + probe team tech, they should also build probe foils randomly along with normal ships. So dunno why you might not be seeing any foils. They might develop slower on easier difficulty levels though. I don't think I've implemented any significant changes there.

> Another question about predefined units. On what condition AI builds disabled *Sea Formers and Sea Escape Pods?

Yeah, the meaning and order of the standard units is hardcoded. Those units are a fallback default type for the prototype picker if the factions don't have a custom prototype of that type even though they should have the tech. The code would behave weirdly if it's not able to produce the unit types it would have the techs for.

> Is it feasible to teach them to end turn in one tile with friendly defender, or as far from target as possible to cross in one turn (especially ships), or outside of enemy vision, or at least not adjacent to enemy if possible?

Sure it's feasible to rewrite some of the movement code and there's already some changes, but currently it doesn't directly affect unit types with the probe weapon. Remember that even if they stopped away from enemies now, the new attack code considers any tiles that can be reached by roads from the attackers current location in one turn (including the attack). Rovers are able to cover pretty large distances now. Any unit that has to end its turn next to enemy roads is now in *real* trouble, including other rovers.  Probe teams often have difficulty reaching their targets, sure, so they could probably use some improvements.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 24, 2018, 11:22:28 AM
Attached save crashes the game after pressing End Turn. Made entirely in Thinker-dev-20181120. Hope this will help to catch some bug. Satori custom faction is from http://alphacentauri2.info/index.php?action=downloads;sa=view;down=264. (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=264.)
Also looks like (at least Librarian) AI doesn't build any user-predefined units, i.e. beyond #UNITS line 23, despite having prerequisite tech.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 25, 2018, 08:29:07 PM
Hmm, that was quite a serious issue, but it should be now fixed in version 20181125 (https://github.com/induktio/thinker). It should also properly build the user defined units listed in alphax.txt. It is now redundant to define probe foils in alphax.txt but it should cause no issues after this update. So basically you can continue playing that save game normally.

The code indeed crashed on a null pointer dereference, but the thing is, the source code included a check for this null value and it worked with optimizations disabled, but gcc decided to heuristically eliminate this check when using the -O2 switch! I actually had to check this from the emitted assembly code and the condition was really missing. I now have to override this behaviour with -fno-delete-null-pointer-checks.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on November 27, 2018, 01:18:02 AM
Such a quick fix, thanks a lot. Crash indeed gone, and AI is building user predefs. But so far no probe ships, neither predefined nor self-designed. Will see how it unfolds.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 27, 2018, 07:03:17 AM
Here's a quick port of the smac_in_smax files I wrote to the format thinker expects. labels.txt is just a copy of the base game's one.

Just extract this dir to your smac dir and set load_expansion = 0 in thinker.ini.

It differs from original smac_in_smax in that all SMAX features are disabled whereas the original release thru yitzi allowed and used selective enabling of some SMAX features (sealurks, landmarks).
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 27, 2018, 11:57:52 PM
Induktio,
By the way, did you see this mod? It seems to working on the same AI performance enhancement thing. Just FYI.
http://alphacentauri2.info/index.php?action=downloads;sa=view;down=260 (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=260)
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 28, 2018, 12:11:12 AM
Re: combat mechanics, from an email chain with induktio but made public in case anyone has anything to add and for posterity.

There's no need to monte carlo it, the advantage is if you can find the right function you can let SMAC handle disengagement rules (including whether the unit can disengage due to surrounding units), different kinds of combat (e.g. artillery, naval), collateral damage, etc and you can just treat it as a black box. I suspect this is harder than one would like because of all the global state in SMAC, but maybe it's OK.

---

So from the manual and from some experiments done ages ago on apolyton[1][2], we can get a pretty accurate idea of what the real combat system is (SMAC combat system is very similar to Civ2, see [2]).

let ah, dh = attacker's health, defender's health.
let p = probability of attacker hitting in a single round (this seems to have a slight fudge factor on it in Civ2 and maybe also SMAC that benefits the stronger unit).

In post#5 in [1] they argue that the true probability of the attacker winning is the sum of the probability of hitting the defender dh times for all possible number of rounds that the attacker could survive for (they're using the probability mass function for the binomial for each round, except they subtract one from each operand in the combination, I don't know why they do that.).

let f(k, n, p) = probability of getting exactly k successes from n rounds with probability p of each success

(or mess with the combination like they do? I'd want to understand why).

Their formula in python:

probability of attacker winning = sum((f(dh, n, p) for n in range(dh, dh+ah-1))

In terms of efficiency, that's a linear time function if you make a lookup table for the factorials or n^2 if you don't, which is probably fast enough.

[1] also provides a constant time approximate formula.

---

I was going to plot the probabilities for a variety of initial healths for a range of strengths and see if I could fit a constant time model, but I haven't got around to it yet.

Any model you do use can also be tested against experimental data from SMAC in [3] and [2].

[1]: https://web.archive.org/web/20140905043718/http://apolyton.net/showthread.php/22856-Info-Combat-(GL)?s= (https://web.archive.org/web/20140905043718/http://apolyton.net/showthread.php/22856-Info-Combat-(GL)?s=)
[2]: https://web.archive.org/web/20140907092936/http://apolyton.net/showthread.php/103023-Combat-results?s= (https://web.archive.org/web/20140907092936/http://apolyton.net/showthread.php/103023-Combat-results?s=)
[3]: https://apolyton.net/forum/other-games/alpha-centauri/151230-combat-mechanics (https://apolyton.net/forum/other-games/alpha-centauri/151230-combat-mechanics)
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 28, 2018, 10:38:11 AM
> Here's a quick port of the smac_in_smax files I wrote to the format thinker expects. labels.txt is just a copy of the base game's one.

Nice. I didn't check it yet myself but we could place this mod in a separate repo so it doesn't get lost in this thread. I'm also wondering whether I should supply a new alphax.txt with this mod, but anyway the recommended changes are visible in Details.md in the repo.

> By the way, did you see this mod? It seems to working on the same AI performance enhancement thing. Just FYI.

Yeah, but he made that using only binary patching. It's pretty hard to compare changes without source code. By developing Thinker using C++ we're basically unlimited in what kind of new algorithms the AI could use. Now that I also implemented the method where the patches can be applied dynamically at startup, it's pretty rare to even have to change the actual game binary.

> [1] also provides a constant time approximate formula.

Are you referring to this formula below? It's somewhat similar to what Thinker calculates now but "firepower" doesn't have the same meaning in this game as far as I know. There's only one value derived from A/D strength/modifiers that is used to scale the random numbers and determine winners in combat. I wouldn't make any assumptions the page is applicable to SMAC.

(click to show/hide)
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 28, 2018, 01:13:06 PM
Yes, that formula, but firepower is always 1 in SMAC. In [2] and [3] there's a discussion based on empirical data.

Also the description of the smac and civ2 combat systems is very similar: they're both multi-round you hit or I hit things.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 28, 2018, 02:32:48 PM
they're using the probability mass function for the binomial for each round, except they subtract one from each operand in the combination, I don't know why they do that.

Because all possible chain of events should end up with loser to take the hit. So you put this last hit aside and everything else is a complete permutation.
For example, ah = 2, dh = 2. The probability the attacker winning the combat is p (last blow to defender) + sum of other combinations: 0 or 1 times attacker loses and 1 time defender loses.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 28, 2018, 02:35:43 PM
> By the way, did you see this mod? It seems to working on the same AI performance enhancement thing. Just FYI.

Yeah, but he made that using only binary patching. It's pretty hard to compare changes without source code. By developing Thinker using C++ we're basically unlimited in what kind of new algorithms the AI could use. Now that I also implemented the method where the patches can be applied dynamically at startup, it's pretty rare to even have to change the actual game binary.

I didn't mean to integrate this patch blindly. Merely scan through a list of changes and think if you want any of them in yours.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 28, 2018, 02:41:51 PM
Are you referring to this formula below? It's somewhat similar to what Thinker calculates now but "firepower" doesn't have the same meaning in this game as far as I know. There's only one value derived from A/D strength/modifiers that is used to scale the random numbers and determine winners in combat. I wouldn't make any assumptions the page is applicable to SMAC.

(click to show/hide)

Is this a formula SMAC uses to display odds? I understand it just multiplies round odds with both unit hit point proportion. That is incorrect combat odds due the fact it results in multi round binomial distribution which is not a direct multiple of hit points. In fact, stronger unit with smaller amount of hit points may have better combat chances even though the program displays the opposite.
:)

Anyway. Thank you for publishing it. It's a good information.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 29, 2018, 11:07:25 PM
Looks like the last big feature missing from the next release is doable after all, namely rewriting the AI social engineering. :)

I've had some really interesting results with the new SE code. The AI actually now considers all the possible society effects resulting from a SE change in an abstract manner, so it's able to understand the nonlinear effects of the different modifiers. For example +2 ECON +4 EFFIC is some of the combos it tries to achieve now. It is also able to understand pop booming and toggle growth modifiers based on that. It only considers the actual cumulative social effects, so it's not hardcoded to rely on any particular choice.

When doing some tests with the Technocrat Foundation custom faction, I noticed ROBUST modifier seems to be bugged in the game. It's supposed to cut some penalty modifiers by half, but sometimes it reduces BOTH the negative and positive modifiers by half. It seems really few custom factions make use of this modifier since it's so marginal, so I would suggest avoiding those. PENALTY modifier that only applies to one social model seems to be working okay though. Again, its use is probably really rare among the custom factions.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 29, 2018, 11:40:38 PM
Interesting work.
By the way, were you able to determine original AI algorithm of SE model selection?
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on November 30, 2018, 03:15:46 PM
they're using the probability mass function for the binomial for each round, except they subtract one from each operand in the combination, I don't know why they do that.

Because all possible chain of events should end up with loser to take the hit. So you put this last hit aside and everything else is a complete permutation.
For example, ah = 2, dh = 2. The probability the attacker winning the combat is p (last blow to defender) + sum of other combinations: 0 or 1 times attacker loses and 1 time defender loses.

Yes, that makes perfect sense :) Thanks.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 30, 2018, 10:11:56 PM
New release version 0.8 is now available from downloads (https://github.com/induktio/thinker). Changes since the last release:

* New combat logic for land-based units attempts to do counter attacks more often
* New code for selecting social engineering priorities
* AI understands the value of fungus and will sometimes plant it
* AI sometimes builds native units when the psi bonuses are high enough
* Faction placement option added: avoid bad spawns on tiny islands and equalize distances to neighbors
* Landmark selection options added to config
* Experimental load_expansion option added
* Many other fixes and adjustments
* Scient patch updated to v2.0

This new social engineering AI is probably really significant in boosting the AI capabilities. It should be able to fairly reliably pop boom via SE if +4 growth is just attainable. It also takes into consideration the distance to any enemies and might decide to switch out of Free market (or any other model with -police) to avoid the pacifism penalty. I'm not sure yet if the switch happens too soon though. Tell us here your experiences with the new SE priorities.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 01, 2018, 12:39:30 PM
Nice work, Induktio. Let me try it.

Are you still up to some non AI enhancement directly related changes?
One thing I noticed about psi combat in Yutzi's patch. He made it affect both attack and defense. Which makes sense to me. With vanilla settings goring deeper and deeper on negative PLANET ratings doesn't change things. Player just stop building natives and attack them. The defense strength still the same. That is why FM PLANET penalty is almost not noticeable.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 01, 2018, 02:10:51 PM
Was just played your new version and observed strange thing. I never made a treaty with Gaian's and started a war against them. Then at some point it turned out we are in truce. Don't remember how it happened but OK. Then at some point they start attacking my units without game telling me that they are doing sneak attack. I've checked the comm screen and it says we are in truce. Yet both of us can attack each other without any problems.
Title: Re: SMACX Thinker Mod
Post by: Induktio on December 01, 2018, 04:50:04 PM
> Then at some point they start attacking my units without game telling me that they are doing sneak attack.

Looks like I can't replicate this bug at all. Did this happen even on the same turn? There's a Gaian laser squad a couple of tiles away, and I did notice one thing. If you station one impact infantry both next to the Cyborg base and the laser squad, it may seem the squad is attacking, even though it is the recon rover *inside* the base that actually counter attacked there. Visually on the map it might look really similar, but the laser squad should not attack in this case.

Are you using the default WorldBuilder btw? It looks like there's quite a lot of small islands. I didn't mention it in the thread yet, but the modded WorldBuilder can be seen in Details.md (https://github.com/induktio/thinker/blob/master/Details.md). Not that it affects this issue though.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 01, 2018, 06:13:08 PM
> Then at some point they start attacking my units without game telling me that they are doing sneak attack.

Looks like I can't replicate this bug at all. Did this happen even on the same turn? There's a Gaian laser squad a couple of tiles away, and I did notice one thing. If you station one impact infantry both next to the Cyborg base and the laser squad, it may seem the squad is attacking, even though it is the recon rover *inside* the base that actually counter attacked there. Visually on the map it might look really similar, but the laser squad should not attack in this case.

Are you using the default WorldBuilder btw? It looks like there's quite a lot of small islands. I didn't mention it in the thread yet, but the modded WorldBuilder can be seen in Details.md (https://github.com/induktio/thinker/blob/master/Details.md). Not that it affects this issue though.

I didn't change worldbuilder.
They didn't just attack me once. We are at war. I attack their units they attack mine. Yet game says we are in truce and we can communicate and trade technologies, etc. I'll see if it happens again.
Title: Re: SMACX Thinker Mod
Post by: LastConformist on December 03, 2018, 07:33:45 PM
Dumb question maybe... I found this mod when a renewed interest in SMACX was sparked recently. But I can't figure out how to install it properly. I downloaded the files from Github and thereafter am completely stumped. I do have the GOG version of the game. Ine instructions on Github don't seem to make sense to me. I don't see a terranx_mod.exe. Can anyone help?
Title: Re: SMACX Thinker Mod
Post by: dino on December 03, 2018, 09:36:23 PM
It's a bit dumb question indeed. You've probably downloaded source code from github.

Go to github page linked in the opening post, scroll down a bit to the Download section of the description.
Go Release versions -> Thinker_v0.8.zip -> click download on the top right corner.



Title: Re: SMACX Thinker Mod
Post by: Induktio on December 04, 2018, 09:08:19 AM
Yeah indeed.  :)

Re: bug reports. Make sure the issues are repeatable given some save file. If the issue cannot be repeated even after multiple save game reloads (in the case it's non-deterministic), then basically nothing can be done about it.

Anyway, currently I'm not planning to mod the combat mechanics in any way. Probably in the future releases I will attempt to streamline or extend the current AI behaviour. There might still be an issue with the foil probe team prototypes not being created properly for the AIs, have to investigate that later.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 04, 2018, 01:49:13 PM
Speaking about bugs there is a minor one. Saving and loading production queue. Annoys me a little by adding more mouse-clicks but harmless overall.

In original game it saves the current production as well. That is if I save the queue with Scout Patrol currently produced. Then when I load it in new base the currently produced item is changed to Scout Patrol. This is not reflected in UI immediately but if you close the base screen and open it again you'll see it.
In your mod the currently produced item is not changing for sure.
This is repeatable I won't attach a save.
Title: Re: SMACX Thinker Mod
Post by: Induktio on December 06, 2018, 02:08:17 PM
Speaking about bugs there is a minor one. Saving and loading production queue. Annoys me a little by adding more mouse-clicks but harmless overall.

I think I see the difference you're talking about here. In the base game it saves/reloads the currently produced item along with the queue, but looks like this behaviour was changed in Scient patch v2.0. It's mentioned in Details.md:

Quote
50. [EXPLOIT] Using the right click "Save current list to template" and "Load template into list" features of base queue can be used to bypass retooling completely. Fixed so these queue template features only save and load the actual queue and not affect the item currently in production.

Thinker by itself should never modify production items in player bases, so this is entirely a feature caused by the Scient patch. Whether this change should be reverted or patched differently is another question then. Arguably it's slightly annoying if the current production item is not changed along with the queue.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 07, 2018, 02:49:18 PM
Well then. If it is an exploit, I'll live with it.
Title: Re: SMACX Thinker Mod
Post by: Induktio on December 13, 2018, 01:00:25 PM
I added the smac-in-smax mod link on the readme page (https://github.com/induktio/thinker) while expanding the details documentation. It has now its own repository (https://github.com/DrazharLn/smac-in-smax) in github so it doesn't get lost in this thread.

About that patch #50 I'm not yet sure if we should keep it that way or change it to something else. I think the old behaviour with the build queue would be better if the retool exploit could just be patched in a different way. There's also many other modding options that could still be added, that's for sure. I have not entirely abandoned the idea of modding satellites, probably there just isn't any simple of way of doing it, not to mention even deciding *how* they should be modded.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 19, 2018, 08:56:31 PM
Induktio,
We were discussing the way of balancing psi attack and defense in general. It turned out that AI does not attack well with native nor it defends well against them by mean of building cheap units with trance/song.
Did you pay attention to it in your mod? This alone would give AI great advantage if it can assess current situation and shift toward building normal or native attackers/defenders. I.e. when enemy sends waves of worms - build more cheap trance/song units, otherwise not. When assaulting neighbor see if they have strong psi defense. If not - build worms, otherwise not.

Would creating predefined units with these abilities help AI?
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on December 20, 2018, 05:38:30 AM
Speaking of worm wars, I didn't see any AI in the latest version switching from FM to Green, even on the brink of collapse under worm waves.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 20, 2018, 02:01:20 PM
Speaking of worm wars, I didn't see any AI in the latest version switching from FM to Green, even on the brink of collapse under worm waves.

Yep. That's too. AI has a lot of things it can do better. We just touching some most visible flaws.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on December 20, 2018, 05:30:54 PM
When assaulting neighbor see if they have strong psi defense. If not - build worms, otherwise not.

Not correct.  Successful use of mindworms on offense is usually a combined arms operation, not a monolithic attack.  There's a stage during city siege at which you throw mindworms, because now you're fighting units that aren't strong enough to stand up to them.  If something has Psi defenses, you just have to weaken those units first in some other way.  This is no different from ECM defenses, or AAA defenses.  Combined arms is the way you take all these buffs down.

You might not want to build mindworms for offensive assault, if you yourself have pathetically weak mindworms.  Like your PLANET rating is negative and you don't have Biology Labs etc. to level up what you produce.

Even still, weak mindworms are a good bush scouting and defense option.  The stock AI likes to sneak across big fields of fungus, and this is complete disaster for them if you bring a couple mindworms to intervene.  Having the mindworms be terribly strong is not all that important here, because likely to survive and level up, just getting fed all these human sacrifices.  A better AI would both plan to utilize these death traps as home defense, and also would be wiser about blundering into them.

I'm sure people could write better AI all day if they had a clear foundation to work from.  My point is that these AI problems are difficult, not simply reduced to cranking this setting up or down as a pass filter.  I'm sure Induktio knows that already and is allocating his efforts accordingly.

Defensive units, is more about cranking a pass filter up or down, as you suggest.  There's not as much tactics to defense, as you're just trying to withstand a siege that might be a complete ambush, no preparation on your part.  "Stack with cheap Trance units" is a good countermeasure to a mindworm spawning faction, or a mindworm apocalypse.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 20, 2018, 05:41:34 PM
When assaulting neighbor see if they have strong psi defense. If not - build worms, otherwise not.

Not correct.  Successful use of mindworms on offense is usually a combined arms operation, not a monolithic attack.  There's a stage during city siege at which you throw mindworms, because now you're fighting units that aren't strong enough to stand up to them.  If something has Psi defenses, you just have to weaken those units first in some other way.  This is no different from ECM defenses, or AAA defenses.  Combined arms is the way you take all these buffs down.

You might not want to build mindworms for offensive assault, if you yourself have pathetically weak mindworms.  Like your PLANET rating is negative and you don't have Biology Labs etc. to level up what you produce.

Even still, weak mindworms are a good bush scouting and defense option.  The stock AI likes to sneak across big fields of fungus, and this is complete disaster for them if you bring a couple mindworms to intervene.  Having the mindworms be terribly strong is not all that important here, because likely to survive and level up, just getting fed all these human sacrifices.  A better AI would both plan to utilize these death traps as home defense, and also would be wiser about blundering into them.

I'm sure people could write better AI all day if they had a clear foundation to work from.  My point is that these AI problems are difficult, not simply reduced to cranking this setting up or down as a pass filter.  I'm sure Induktio knows that already and is allocating his efforts accordingly.

Defensive units, is more about cranking a pass filter up or down, as you suggest.  There's not as much tactics to defense, as you're just trying to withstand a siege that might be a complete ambush, no preparation on your part.  "Stack with cheap Trance units" is a good countermeasure to a mindworm spawning faction, or a mindworm apocalypse.

Well, come on! I didn't mean to give specific tactical advice. Just to find out if this is possible or plausible at all. So read my "build worms" as "build more worms than usual", etc.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on December 20, 2018, 07:42:31 PM
Well, come on! I didn't mean to give specific tactical advice. Just to find out if this is possible or plausible at all. So read my "build worms" as "build more worms than usual", etc.

In general it's not a good idea for an AI to build units it doesn't really know how to use, and doesn't have a firm plan for using.  The stock SMAC AI isn't that smart about such things.  For instance if you crank up the Scenario Editor and watch AI vs. AI games from an Omniscient view, you'll see lots of units being manufactured and lots sent out into the wilderness to wander around.  It is incredibly and egregiously wasteful.  It runs cities out of SUPPORT.  It is not effective at stopping a human player from seizing cities.  How many times have you attacked a city, and wondered "Where are all those other units it's supposed to be supporting?  I didn't have to fight that many."  Well they're out in the bush being stupid.

So no, please don't ever recommend producing anything offensive unless it is known how it's going to get used.  Defense, it's much easier to crank up a setting that will help.  That's the main point I was trying to make, despite the number of words spilled on the "offensive" side of the equation.  Gotta convince people why it is so.

Every offensive thing built is a choice, that consumes production, and can be very very stupid.  Like planes in the stock .exe that just mill around doing nothing important.  The AI builds such sheer quantities of those planes, that it could take down entire empires with them, if only it knew how to use them properly.
Title: Re: SMACX Thinker Mod
Post by: Induktio on December 21, 2018, 01:09:37 PM
It turned out that AI does not attack well with native nor it defends well against them by mean of building cheap units with trance/song.
Did you pay attention to it in your mod? This alone would give AI great advantage if it can assess current situation and shift toward building normal or native attackers/defenders. I.e. when enemy sends waves of worms - build more cheap trance/song units, otherwise not. When assaulting neighbor see if they have strong psi defense. If not - build worms, otherwise not.

Would creating predefined units with these abilities help AI?
Yeah, so currently the AI has no logic for adapting the production to counter any specific enemy units. It just builds a little bit of everything. At least in the unmodded game I feel the worms are a little too weak, so the AI does not put much emphasis in producing them. Generally they need to have at least some kind of a faction/tech psi bonus before the worms are even considered for production. One good thing with the worms is that they don't need support when sitting in fungus, but this logic would also have to be coded in the movement AI. The prototype picker puts some extra value on trance/empath units, but this bonus is not adapted to the current game situation. Sometimes it might be pretty irrelevant, sometimes really useful.

There's at least one case where predefined units might be really helpful: if the AI knows how to use the unit properly but the prototype planner does not auto-design any comparable unit for some reason. Otherwise the results might be a little hit and miss.

Speaking of worm wars, I didn't see any AI in the latest version switching from FM to Green, even on the brink of collapse under worm waves.
Does the stock AI actually understand when its losing many units to psi attacks and try to increase the planet rating because of that? Not sure really. Anyway, the SE selection will get some further tweaks when I'll get back to it. Defining the conditions for when to increase the planet rating because of the psi attacks might be a little tricky though. It's just generally these strategies are a little bit rock-paper-scissors, so you can't go all in rock because then it would be vulnerable to paper and so on.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 21, 2018, 02:32:51 PM
Otherwise the results might be a little hit and miss.

I agree. I am not telling about making AI smarter at all. This is too big of a task for modding at least. Any attempts to make AI perform better boils down to giving it a right tool that it would stupidly use without thinking and yet succeed.
:)
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on December 22, 2018, 06:44:45 AM
Does the stock AI actually understand when its losing many units to psi attacks and try to increase the planet rating because of that? Not sure really.
In stock AI I noticed only one pattern of "military situation - SE choice" kind, and fairly detrimental to him: after losing a base to mind-control, AI would often switch to Fundie, clear over-reaction in most cases. IMHO, this calls for a more generalized approach: in time of peace, choose SE maximizing growth, economy, research, etc; in time of war (and this means real danger, not some empty vendetta from a faction half a globe away), maximize morale, support, planet, etc. Mixed character of most choices makes this a little difficult, so basically "many enemy units in my territory - switch out of Demo/FM/Wealth and into PS or Fundie/Green/Power".
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 27, 2018, 02:48:30 PM
Induktio,
More on generic "Probe team actions" topic.
Barring HSA, probe team success rate depends on unit morale only and not own or opponent's PROBE rating. Since middle game most probe teams are Elite as it is very easy to raise their morale level by various means. Elite probe destroys defensive facilities (perimeter, tachyon) with 75% success rate. As they are so cheap destroying enemy defensive facilities in front of your army becomes a very effective strategy. The problem here is that AI does not use it massively while human does. It essentially renders AI defensive facilities useless against human player.
As your mod targets AI improvement do you consider modding this aspect of the game? If yes, there could be multiple ways to do it starting with those I pull from the top of my head in this post.
http://alphacentauri2.info/index.php?topic=21129.msg117489#msg117489 (http://alphacentauri2.info/index.php?topic=21129.msg117489#msg117489)
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on December 28, 2018, 05:04:07 AM
The problem here is that AI does not use it massively while human does.
In my games on Thinker difficulty, AI definitely builds tons of probe teams (albeit without Algorithmic Enhancement, but with armor, Hypnotic Trance, Comm Jammer). Though he uses them not so smartly, they are a force to be reckoned with; a couple of defensive probes in border bases aren't sufficient.
Having said that, changes to probe system are begging. This is evidenced by frequency with which those proposals arise.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 28, 2018, 02:34:51 PM
The problem here is that AI does not use it massively while human does.
In my games on Thinker difficulty, AI definitely builds tons of probe teams (albeit without Algorithmic Enhancement, but with armor, Hypnotic Trance, Comm Jammer). Though he uses them not so smartly, they are a force to be reckoned with; a couple of defensive probes in border bases aren't sufficient.
Having said that, changes to probe system are begging. This is evidenced by frequency with which those proposals arise.

I didn't mean AI doesn't build them. It does all right: buys bases, steal technologies, incite drone revolt, assassinate researchers, even destroy random buildings. It does not destroy specific defensive structure targets. I never saw that.
Target destroying defensive facilities is relatively easy to do: Veteran 34/25, Commando 34/40, Elite 50/50. The effect of this is tremendous: you lose 3-5 times less units capturing a base. The cost of probe team is so small that it is incomparable to the cost of extra lost units capturing defended base. With all these factors combined this can be considered as a super effective strategy that only human is aware of = exploit.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 29, 2018, 07:47:27 PM
Not sure if this is Thinker bug or something from existing code. I've captured University city that was building some project.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 03, 2019, 08:46:45 PM
Induktio,
Did you see anywhere if AI is able to build units with Soporific Gas Pods at all? In general, are there settings for AI prescribing what unit types to build (chassis, weapon, armor, abilities) and in what proportion?
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 05, 2019, 10:48:24 PM
Found a bug.

I am playing Thinker mod with my txt mod on top of it. SMAX. Usurpers.
Every time I found a base I see the base name edit window. In this window I can move cursor way beyond the right end of the name. When I keep pressing right arrow cursor does not move any further to the right beyond some position. When I then keep pressing left arrow it doesn't start moving left until some number of left clicks passed. It seems like the actual text is much much wider that the one displayed.
When I delete the whole name the text from script.txt appears in the name input.
Looks like program is reading the string and doesn't break at end of line of something. See screenshots. The cursor is not visible.

I tested the same playing Usurpers on original GOG version of SMAX. It repeats there too. Since I have a mess of different versions on my machine I am not 100% sure it is actually original one. Didn't do any more test yet. However, I don't remember noticing this bug before.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 06, 2019, 01:36:15 AM
Wow. Never mind. I just uninstalled and reinstalled a fresh original version from GOG. It has the same bug!
Title: Re: SMACX Thinker Mod
Post by: Mart on January 06, 2019, 02:09:48 AM
I have seen something similar in Unit Workshop, where you can move cursor, in unit name, if I remember correctly, on large number of spaces, that seem to be there for no reason. But I play Planetary Pack version.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 06, 2019, 04:50:01 PM
Mine is also GOG Planetary Pack (SMAC + SMAX).
Are you saying early SMAC version didn't have it?
Title: Re: SMACX Thinker Mod
Post by: Mart on January 06, 2019, 04:57:10 PM
I do not know that, my Planetary Pack comes from edition years ago. It was sold in a separate box, I think it might be before GOG existed, it was like shortly after original game release and its expansion released, compared to today's 2019 year.

It may be similar bug, but not exactly the same. Bugs can be very complex.


[Edit]
I think it is release from year 2000:
https://www.amazon.com/Sid-Meiers-Alpha-Centauri-Planetary-Pack/dp/B00004NHFD (https://www.amazon.com/Sid-Meiers-Alpha-Centauri-Planetary-Pack/dp/B00004NHFD)
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 06, 2019, 07:40:01 PM
It may be hard noticeable bug then. People rarely rename stuff. And even if they do they do not move cursor beyond the text on purpose.
Title: Re: SMACX Thinker Mod
Post by: Induktio on January 06, 2019, 07:43:33 PM
I recently had an idea to add one new feature: the ability to select custom factions while the expansion is disabled (using the smac-in-smacx mod). Currently if you set load_expansion=0, the choices in the faction selection screen are locked, like in vanilla SMAC. With some small tweaks, it is possible to reactivate the faction drop down menu that is available in SMACX and select any custom factions.

Alas, there's one issue with this: Alien factions are also visible in the menu and selecting them causes some weird behaviour while playing the game. I'm not sure if there's any easy way to hide them from the drop down menu, but this is not an issue as long as they are not selected. Otherwise I don't see any major obstacles to adding this feature.

Elite probe destroys defensive facilities (perimeter, tachyon) with 75% success rate. As they are so cheap destroying enemy defensive facilities in front of your army becomes a very effective strategy. The problem here is that AI does not use it massively while human does. It essentially renders AI defensive facilities useless against human player.
As your mod targets AI improvement do you consider modding this aspect of the game? If yes, there could be multiple ways to do it starting with those I pull from the top of my head in this post.
http://alphacentauri2.info/index.php?topic=21129.msg117489#msg117489 (http://alphacentauri2.info/index.php?topic=21129.msg117489#msg117489)

Well, it can be said probe teams are a little overpowered against AI, but then again, lots of other units can also be used to overwhelm the AI defenses because it doesn't allocate the defenders that well. I'd say modding those probe action success rates is not really priority, although disallowing certain probe actions in addition to just mind control might make sense if the target has +3 PROBE. If we went on changing those probabilities, then the mind control costs could need tweaking as well. They can also be a really easy way to capture some bases.

Wow. Never mind. I just uninstalled and reinstalled a fresh original version from GOG. It has the same bug!

So are you saying this bug is present in the unmodified game (GOG version) as well?

Title: Re: SMACX Thinker Mod
Post by: Induktio on January 06, 2019, 08:31:09 PM
Induktio,
Did you see anywhere if AI is able to build units with Soporific Gas Pods at all? In general, are there settings for AI prescribing what unit types to build (chassis, weapon, armor, abilities) and in what proportion?
I haven't seen the AI design any Soporific units. There's a long, complicated function in the game binary that chooses which prototypes to create. I have not directly modded it, instead Thinker creates independently a couple of additional prototypes (probe teams etc) which are then usually chosen for production.

PvtHudson mentioned it doesn't build any Algo Enhanced probes, but this might be caused by the fact that Algo Enhancement is so late in the standard tech tree it's somewhat unsual to see the AIs reach that stage of development. The prototype planner should design Enhanced probes immediately when it has the Enhancement tech in addition to fusion reactors and the tech to select 2 special abilities.

As a clarification to the previous post, I might consider tweaking the AI probe team actions especially if it ignores some useful probe team actions altogether. I have not written any code for that part yet, so it's in the "maybe" category of future improvements.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 07, 2019, 12:15:41 AM
Wow. Never mind. I just uninstalled and reinstalled a fresh original version from GOG. It has the same bug!
So are you saying this bug is present in the unmodified game (GOG version) as well?

Yep. I've uninstalled completely, deleted folder, reinstall from my GOG library and was able to reproduce.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 07, 2019, 12:26:48 AM
Elite probe destroys defensive facilities (perimeter, tachyon) with 75% success rate. As they are so cheap destroying enemy defensive facilities in front of your army becomes a very effective strategy. The problem here is that AI does not use it massively while human does. It essentially renders AI defensive facilities useless against human player.
As your mod targets AI improvement do you consider modding this aspect of the game? If yes, there could be multiple ways to do it starting with those I pull from the top of my head in this post.
http://alphacentauri2.info/index.php?topic=21129.msg117489#msg117489 (http://alphacentauri2.info/index.php?topic=21129.msg117489#msg117489)

Well, it can be said probe teams are a little overpowered against AI, but then again, lots of other units can also be used to overwhelm the AI defenses because it doesn't allocate the defenders that well. I'd say modding those probe action success rates is not really priority, although disallowing certain probe actions in addition to just mind control might make sense if the target has +3 PROBE. If we went on changing those probabilities, then the mind control costs could need tweaking as well. They can also be a really easy way to capture some bases.


Disabling probe actions against +3 PROBE is a good idea. Makes perfect sense. Need to think which ones. Disabling infiltration completely is probably not needed.

Actually, if you want go this path, I have an interesting idea in mind. Each enemy +1 PROBE decreases ALL percentages by 25% both success and survival. This way at +3 PROBE rating no targeted destroying defensive facilities possible as even for Elite team with AE the success chance goes down to 0%. It makes a very good sense as now PROBE rating is actually plays defensive role as it should and makes it more difficult for enemy to carry out their spy tasks. At the same time normally 100% success actions like infiltration are still possible at 25% rate. That includes random sabotage that may occasionally destroy defense but it'll take a lot of probes to get to it.

It will also make PROBE effect actually quite valuable. In vanilla game its effect is pretty unimportant besides disabling subversion at +3 rate.
Title: Re: SMACX Thinker Mod
Post by: Induktio on January 29, 2019, 11:43:51 AM
It's been quite a while since last update, but there's still more in development. I added a couple of smaller tweaks this time, e.g. the ability to select custom factions while smac-in-smacx is active. Could still add a couple of more features before deploying a new version for testing.

It's hard to say which features would be the best to implement here given the benefit/time ratios. I could maybe improve the unit movement code or tweak the production AI but not sure if there's any simple, obvious improvements left. If the build queue was rewritten we could maybe look at the facility choices in a more abstract way, so the planner could rebalance the production choices even if the costs/maintenance of facilities are modded. That's how the AI works in later Civ games also, so in essence it doesn't have any hardcoded build order.

Other topic is also the possibility of implementing new modding features. There's been a couple of ideas in this thread, but do we have any consensus of some really useful modding features that are currently missing?
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on January 30, 2019, 02:15:19 PM
The bug where you get the wrong faction art and stuff when loading a scenario save game or similar is pretty annoying, especially for people playing multiplayer games (including PBEM, which your mod presumably doesn't break?)

That bug makes lots of modding more tedious and reduces potential audience.
Title: Re: SMACX Thinker Mod
Post by: BFG on January 31, 2019, 03:03:07 AM
I've had random crashes with Thinker...they usually occur when I tried to load a colony pod onto a Unity Transport Foil.  But the crash didn't happen every time.  It seemed like it was trying to set the move coordinates to (0,0) so it could be due to that fix.  I'll try to get more info to make sure.

Meanwhile...I approve!  Tried to play a pacifist/builder Miriam game and got my butt kicked.
Title: Re: SMACX Thinker Mod
Post by: Induktio on January 31, 2019, 01:14:12 PM
> I've had random crashes with Thinker...they usually occur when I tried to load a colony pod onto a Unity Transport Foil.

Can't say much without a save game to inspect. I do suspect it's because of something else happening in the background because Thinker is not supposed to affect player-controlled units in any way.

> The bug where you get the wrong faction art and stuff when loading a scenario save game or similar is pretty annoying, especially for people playing multiplayer games (including PBEM, which your mod presumably doesn't break?)

I'm not familiar with this bug at all. How do you actually trigger it? Does it have anything to do with this entry in Scient patch notes?

Quote
52. [BUG] Fixed an issue where diplomacy dialog could be incorrectly displayed due to faction id value being set incorrectly. This is best exhibited where Progenitors switch into "Human" dialog syntax.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 02, 2019, 02:22:34 AM
I failed to save the game where I had the random crashes.  Will be sure to do so next time.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on February 07, 2019, 01:21:01 PM
It's hard to say which features would be the best to implement here given the benefit/time ratios.
IMHO, it would serve AI's best interests to tighten up diplomacy. I.e., fight well-known exploits, and teach AIs to better choose their friends and enemies. Though don't know how about benefit/time ratio for these.
Other topic is also the possibility of implementing new modding features.
Is it possible for predefined units to not grant prototypes?
Title: Re: SMACX Thinker Mod
Post by: BFG on February 08, 2019, 10:22:23 PM
I’d just be happy at this point if the AI knew how to automate gravship formers correctly.  But I am sure I am in the minority there :)

On a different note, I can no longer find a solution for “get every single Secret Project” with Thinker like I can with the base AI.  My old primary strategy (Zak builder and pacifist) is no longer good enough to win, even on Librarian.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 08, 2019, 11:38:00 PM
IMHO, it would serve AI's best interests to tighten up diplomacy. I.e., fight well-known exploits, and teach AIs to better choose their friends and enemies. Though don't know how about benefit/time ratio for these.

Is it possible for predefined units to not grant prototypes?
Diplomacy could be a topic of interest.. I have done some research on it but the code seems a little complicated to modify. It would need some more insight to figure out what all the variables actually do there. But there seems to be much potential for improvement.

Probably there is some way of disallowing prototypes that have not been researched, so is this a feature that is considered generally important?

I’d just be happy at this point if the AI knew how to automate gravship formers correctly.  But I am sure I am in the minority there :)

On a different note, I can no longer find a solution for “get every single Secret Project” with Thinker like I can with the base AI.  My old primary strategy (Zak builder and pacifist) is no longer good enough to win, even on Librarian.
Hmm, interesting. Just think of it, this mod doesn't even grant any artificial production bonuses on top of the default cost ratios in the difficulty levels, unless they are explicitly activated from the config. If we compare this to let's say Civ 3, my main aim was to make Transcend level feel like, maybe not quite, but close to Deity in Civ 3. Maybe we can declare "achievement unlocked" in that aspect.

Gravship formers are certainly a possibility, I've already thought about implementing them, but they feel a little like some late-game esoteric feature.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 09, 2019, 01:54:58 AM
The main problem with gravship formers automation is that the AI thinks they can only alter land when in fact they can alter both land and sea squares.  I’ve been surprised at how poorly they are automated versus other key units I have added such as needlejet colony pods.  Still, there aren’t many games that even see gravships so it’s not much of a priority.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 09, 2019, 02:09:32 AM
Probably there is some way of disallowing prototypes that have not been researched, so is this a feature that is considered generally important?

It's been important to my modding.  Because predefined units give away the prototypes, I adopted a policy of giving out such prototypes "one tech later" than when you could, in principle, make a given unit.  So for instance I have Doctrine: Initiative as a prereq for Doctrine: Air Power.  I can't give out a Cruiser Probe Team until Doctrine: Air Power.  It's annoying.  It makes a big difference later in the game, as Tier 4 vs. Tier 5 techs can be separated by a rather long time in my tree.  Even Tier 2 vs. Tier 3 can take a long time in my tree, because I've pressed so many techs earlier.  My tree is "broad" now.  In your core area of research, Explore Discover Build Conquer, not as many delays, but outside your core, considerable delays.  To the point that some people have noticed it can feel like a tech stagnation game. 

So my $0.02 is yes, this matters.  A lot.

I also increased prototype cost by 200% in my mod.  Originally Tim's idea, but I ran with it.  So getting a Synthmetal Sentinel together is a substantial challenge in my mod now.  If you're really in a pinch, you can blow an Artifact on it.  That'll work.  I actually had to do that in a recent game I played, and I think it was worth it, to overcome the otherwise 10..15 turn delay.

Quote
Gravship formers are certainly a possibility, I've already thought about implementing them, but they feel a little like some late-game esoteric feature.

I don't know where your .exe is at with late game AI terraforming.  For a stock .exe it's a non-issue.  The AI is never going to beat a competent player on Transcend.  The human player will get ahead, the AI is always going to be somewhat behind.  Caveat: the interim periods when I didn't know how to play my own mod yet.  But that passes.  Anyways, I terraform every single square by hand.  Gravships would never be useful to me.  Too late game, I've already done everything needed by then.

The uber technology is the Hovertank Former.  That is very useful for making long rails over fungus or rocks.  One may need to remove fungus to lay a mag tube, depending on one's tech.  You just hover over the fungus instead of wasting a turn moving onto it.  Same things with rocks.  Infantry and Rover chasses lose a turn getting onto the rocks.

Meanwhile on the oceans, Cruiser formers work just fine and will be available way, way earlier than Gravships.  In version 1.27 of my mod I made Gravships available "earlier".  It still doesn't manage to come early, it's a late game thing.  Hovertanks come much earlier too, like midgame, same time as Cruisers.  In fact I have Cruisers and Hovertanks as the prereqs for Needlejets.  That may not be logical from a lore standpoint, but I consider a faster chassis to be an Explore tech.  So they feed the next big deal Explore tech, which is planes.  One could argue for a Ship -> Plane -> Hovertank progression instead, and I wouldn't call it wrong, but I'm doing it the way I'm doing it.

I haven't been able to get the stock AI to use Hovertank Formers.  I tried, but it just wasn't interested in building them.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 09, 2019, 05:15:16 PM
I don't know where your .exe is at with late game AI terraforming.  For a stock .exe it's a non-issue.  The AI is never going to beat a competent player on Transcend.  The human player will get ahead, the AI is always going to be somewhat behind.  Caveat: the interim periods when I didn't know how to play my own mod yet.  But that passes.  Anyways, I terraform every single square by hand.  Gravships would never be useful to me.  Too late game, I've already done everything needed by then.

Stock AI's put up such a bad performance it's not really even a point of discussion. For a long time players used to do things like build-every-secret-project to find some challenge. I used to do that myself sometimes but now it's probably a little bit more challenging (read: have to conquer most of the early game ones).

In the original game they added lots of complex mechanics which the AI was not designed to handle very well. Also, I don't think I would go on increasing prototype costs by such a large margin or even at all. It's probably going to make the game harder for the AIs because it's not well equipped to strategize around those limitations unlike a human player.

The main problem with gravship formers automation is that the AI thinks they can only alter land when in fact they can alter both land and sea squares.  I’ve been surprised at how poorly they are automated versus other key units I have added such as needlejet colony pods.  Still, there aren’t many games that even see gravships so it’s not much of a priority.

Yeah, gravship formers would need some moderate restructuring of the movement code because they can modify both types of squares. So I have to consider that.

It's important to note here that the player's formers still use the default code when they are automated. They could be adjusted pretty easily to use Thinker's code instead, but the problem is that then they should obey the "automation preferences" selected by the user. Do you think we should have them use the new former code instead if the preferences are just followed? Probably it would be a good change.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 09, 2019, 07:16:26 PM
In the original game they added lots of complex mechanics which the AI was not designed to handle very well.

True.  I run into things all the time that the AI doesn't know how to do.  Nowadays I think of them as "human cheats".  I push some of the HCs later in my tech tree, so that by the time they become available, the human will have probably already figured out some way to win anyways.  It's a soft way of taking things out of the game, without strictly removing content from the game.

Quote
Also, I don't think I would go on increasing prototype costs by such a large margin or even at all. It's probably going to make the game harder for the AIs because it's not well equipped to strategize around those limitations unlike a human player.

I have not observed the stock AI having any problem coming up with the more expensive prototypes.  Probably because the AI on Transcend is "cheating" like a mad dog, being given these huge INDUSTRY equivalent bonuses.  Also possibly because I have sufficiently delayed contact between hostile factions, by (expected) map size, extra land mass, and more defense for cities.

I don't know if it's been addressed, but I'd severely like to see the AI actually cash Artifacts to get techs.  And I'd like to see the number of pods that appear on the map be controllable by user input somehow.  They can so easily turn the game into just candy.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 10, 2019, 07:14:36 PM
Yeah, gravship formers would need some moderate restructuring of the movement code because they can modify both types of squares. So I have to consider that.

It's important to note here that the player's formers still use the default code when they are automated. They could be adjusted pretty easily to use Thinker's code instead, but the problem is that then they should obey the "automation preferences" selected by the user. Do you think we should have them use the new former code instead if the preferences are just followed? Probably it would be a good change.

That’s a great question.  So long as user preferences are followed, yes, I would agree that any units automated by the user (not just formers) should use the same code as the AI.  I know that that means the player automated units will now be stronger, which flies in the face of what Thinker is about, but not having player AI be the same as other factions’ AI seems a bit unfair.

On a related note: you may also want to look at sea and gravship crawlers.  So far, whenever I automate sea crawlers they want to explore rather than harvest. I presume gravships would do the same but haven’t tried them yet.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 10, 2019, 08:08:01 PM
I know that that means the player automated units will now be stronger, which flies in the face of what Thinker is about,

Not really.  Even if Induktio has come up with "better" terraforming AI, it will never, ever be as good as a human terraforming every tile manually.  If you automate them, it's suboptimal.  That's your choice as a player.  Induktio could make it less suboptimal, but he wouldn't be giving an advantage to the human.  The human already has the ultimate advantage of being able to do it all manually.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 11, 2019, 01:52:08 AM
True, but I was talking relatively.  Now, automated player formers are inferior to AI ones.  Changing to the improved code would put them on par with each other.  Of course, direct control is superior to either.

Moving player automated formers to the new code will make the player stronger, if the player was going to automate in either case.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 11, 2019, 07:54:44 AM
As for the optimal strategy, good luck with that. ;b; Humans weren't able to calculate optimal strategy for Go either despite thinking for a couple of millenia.

Anyway, sea crawlers are not currently implemented. So whether behaviour they were doing is the result of the standard movement code which probably means the AI doesn't understand how to use them. Have to keep that in mind too.

I think, overall, having player's formers use the same code than the AI ones would make the game feel more consistent, since then the two types of formers wouldn't operate in a vastly different way.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 11, 2019, 07:28:42 PM
As for the optimal strategy, good luck with that. ;b; Humans weren't able to calculate optimal strategy for Go either despite thinking for a couple of millenia.

I think near optimal strategy for terraforming is quite a bit less complicated than that.  It is mostly a minigame about leveling up squares.  Better vs. worse sequences of square improvements for a single city over a short period of time are fairly easily to determine.  That's how we all manage to do it manually.  Long term?  Well, war is hell.  Not really important to crystal ball too far into the future.

Optimal sequences of connecting roads and rails is more involved.

Quote
Anyway, sea crawlers are not currently implemented. So whether behaviour they were doing is the result of the standard movement code which probably means the AI doesn't understand how to use them.

AI sea terraforming is not incompetent.  It just overemphasizes minerals instead of energy.  It will even raise the ocean floor if you have the tech to do so and allow it to happen.

Quote
I think, overall, having player's formers use the same code than the AI ones would make the game feel more consistent, since then the two types of formers wouldn't operate in a vastly different way.

In principle it's a perfectly reasonable and obvious thing to do.  In practice, you may have a transitional period where you invent new bugs and misbehaviors.  Then someone might wish for that "dumb" original code.  Especially irritating in other games, is anything that gets a Former gratuitously killed.  Like moving the units right into the path of oncoming enemies, or failing to stop work and retreat.

Title: Re: SMACX Thinker Mod
Post by: BFG on February 12, 2019, 12:10:32 AM
AI sea terraforming is not incompetent.  It just overemphasizes minerals instead of energy.  It will even raise the ocean floor if you have the tech to do so and allow it to happen.
We were talking about crawlers there, not formers.  Sea crawlers are not implemented at all, and gravship crawlers poorly.

Quote
In principle it's a perfectly reasonable and obvious thing to do.  In practice, you may have a transitional period where you invent new bugs and misbehaviors.  Then someone might wish for that "dumb" original code.  Especially irritating in other games, is anything that gets a Former gratuitously killed.  Like moving the units right into the path of oncoming enemies, or failing to stop work and retreat.
True, though there are rare situations where you don’t want the formers to retreat...to buy you that last turn on a new defensive unit for an exposed colony, for example.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 12, 2019, 02:17:21 AM
Oddly enough, Needlejet Supply works.  Although, it seems only for the AI.  I got rid of Copters in my mod.  I replaced the Unity Chopper with a Supply Needlejet, so that it can't attack anything.  I wanted to use a Transport module but it was too slow.  The Supply module doesn't have that problem.  So, the AI can gain one of these from the Unity crash site, or occasionally from popping a pod.  I was quite surprised to see the AI put them over a square somewhere and convoy resources indefinitely.  When the AI uses them, they stay aloft indefinitely, never leaving the square they're convoying from.  When I use them, they crash and burn in short order!

I don't think they go for optimal squares.  Like seeking out a Nutrient or some such.  They just seem to pick something and stick to it.

I can't remember if I've tried adding a sea crawler to the predefined units.  Guess I can try it now.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 13, 2019, 12:53:24 PM
Had an interesting idea recently. I guess most players remember how later Civ games introduced the rule that units cannot use the roads in the enemy/non-allied territory?

It seems the same rule could be implemented quite easily in SMAC by changing the movement cost function. In the gameplay it could be a pretty big change, but I think it would make more sense especially after the introduction of mag tubes. It would also have to be decided how this rule would apply on native units on fungus or any faction with the Xenoempathy dome project. Native units could become relatively more valuable if they were able to use fungus as roads even in enemy territory.

This rule could make land-based probe actions a little harder but I'm not sure if that's a negative thing at all. Basically any kind of new rule could be implemented if the movement cost function is rewritten.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 14, 2019, 12:27:49 AM
That is indeed an interesting idea, but I have to admit, I'm generally not in favor of adding new gameplay rules / tweaks that are outside the bounds of what could happen within the vanilla game.  I'd rather focus on improving the AI / behavior of what's already there.

I could certainly see that becoming an option in Yitzi's patch, however.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 14, 2019, 01:21:46 AM
Yeah, there is indeed an argument against changing game mechanics in a significant extent due to the way players are used to playing this game. There's a bunch of ideas that could be implemented, but at this point of development it's kinda unlikely I would add many drastic changes to the game mechanics. At least if stuff like this gets added it should have a configuration option. AI improvement is still the main goal here anyway.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on February 14, 2019, 05:47:18 AM
+1 for road movement rule experiment. Fungus movement unchanged.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 14, 2019, 10:18:34 AM
-1.  You will split the rather small player base into different groups.  Whatever is the default will get testing coverage.  Whatever is not the default, won't get the coverage.  In the less tested group, in the real world there will be bugs aplenty.  I say this having played Freeciv for many years.

What you're proposing is known as "mission creep" in industry.  It may be a sign that you're getting bored of the project you're working on and really want to do something else.  With your programming skills, I would strongly encourage you to work on a new 4X TBS game, that you personally can make money from.  Rather than trying to turn SMAC into something other than what it is, as though messing with a  binary is an easy thing to keep bug free.

There are wild bugs in the pathfinding already.  Units that just go in nonsensical directions because borders and enemy units are in the way.  Particularly in the case of non-combat units.  When someone proposes to really tear up the behavior of the pathfinding code, I say gee, what can possibly go wrong?
Title: Re: SMACX Thinker Mod
Post by: dino on February 15, 2019, 07:14:15 AM
Magtubes allow to snowball through enemy picking with overwhelming force severeal bases one by one in a single turn, so at least a rule to treat magtubes as roads on enemy territory should help AI with defense.
Not being able to use enemy magtubes also makes sense from simulationist pow.
With roads, I'd consider making them cost 1/2 movement points on enemy territory, not being able to use them at all would be too much of gimp for assault forces.

Depends, how much it'd take to do and how much you like this feature, you can be the only judge. I'd certainly try it if it was made.
The mod is singleplayer focused, as long as it's optional no consensus among the players is necessary imo.
If we were concerned about "fracturing community", than by this logic no one should make any txt rules editing either.


The other modding feature, that could be really useful in improving game balance, would an option to change [1,2,3,4] reactor constants in unit hit points and cost formulas.
Both are already identified in the code, so unless it's impossible to use floats as these exponent values, should be doable.

I'd suggest just implementing two separate tables of four values for cost and HP, configurable in thinker.ini
There is no way you would reach consensus about these formulas and yet most experienced players would like them adjusted, so making it completely configurable is the only way.
I personally, if given such a feature, as first experiment would make reactor reduce unit cost, but by a smaller factor and remove HP increase completely.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 15, 2019, 08:20:35 AM
(https://i.telegraph.co.uk/multimedia/archive/01505/mission-accomplish_1505293i.jpg)

There has been some tragic examples of calling the mission accomplished too early on... But in all seriousness, the majority of stuff that will get added in this mod is already done. It probably wont become one of those "forever" projects until I move on to something else.

I agree how the magtubes provide excessive bonuses for the attackers as they are currently implemented. This is not mentioned in the docs, but currently Thinker does not build any magtubes on its territory precisely for that reason. Magtubes don't provide any particular economic benefits either. About the feasibility of that reactor modding, it might be kind of hard to do when the reactor values are referenced hundreds of times in the game binary. It's probably a lot easier to change the movement cost function.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 15, 2019, 01:32:35 PM
Not being able to use enemy magtubes also makes sense from simulationist pow.

It doesn't make any sense at all.  What would Lawrence of Arabia do?  Blow up Turkish railways, because he can freely move there.  Why not deny the use of roads entirely?  Because roads are roads, they are not turrets or troops.  Roads are what you fight over, they do not defend themselves.  Why not deny movement over enemy terrain entirely?  Because the ground doesn't magically inflict pain upon enemy troops, unless it's Elvish fantasy root grabbing stuff, a Russian winter, or an African disease.

Mag tubes are definitely overpowered, but artificial limits on the ability to use them is a cheap shot.  Nobody's empire has an expenditure for "implicit defense", representing some kind of intangible of fortifications spread everywhere.  This is a game where you move all of your military units one by one.

Some games have taken the approach of a rail allowing faster movement than a road, but it still costs movement points.  I don't have an opinion on the enjoyability of that as a game mechanic.  Call To Power 2 may have done that, but it's been eons since I played that game and I have no clear memory of it.  My concern is, SMAC is tedious enough to win already.  Making long distance map movement even more difficult than it already is, strikes me as heading towards The Very Dull.

Some games don't allow terrain improvements to be built on your same turn.  This prevents a rail from appearing instantly, without the AI having any chance to react to it.  However it also burdens the player with a lot more planning and mouseclicking.  There's a very basic challenge vs. usability tradeoff here.

I am pretty sure Freeciv has that "no instant improvements" mechanic.  All you really end up doing is putting a good piece of armor at the tip of your rail head, like a Mechanized Infantry.  You may be slightly slowed down by having to drive your Howitzers over roads, only knocking off a "front" of cities instead of all of them.  It doesn't greatly change the human ability to wipe the AI out. 

Title: Re: SMACX Thinker Mod
Post by: dino on February 16, 2019, 12:55:33 AM
Steam/Diesel locomotive carries it's own source of energy. You can cut power from magtube, sabotage electric grid. We can also imagine whole infrastructure being automated / remotely controlled.

Being able to use enemy infrastructure and potentially strike any city connected to tube network deep into enemy territory is not realistic.
Unit in transport is vulnerable and not combat ready, you can't just uninterrupted carry your army on a train up to enemy gates even now.

Half, or third of a road movement cost, instead of infinite range would be nice too.

Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 16, 2019, 03:19:42 AM
Being able to use enemy infrastructure and potentially strike any city connected to tube network deep into enemy territory is not realistic.

Look, roads were great for Rome projecting force outwards, but they were also great for enemies swarming inwards.  "All roads lead to Rome."

Quote
Unit in transport is vulnerable and not combat ready, you can't just uninterrupted carry your army on a train up to enemy gates even now.

"Instantaneous" travel is not realistic for us now.  But if you accept that as a basic part of the game on its timescale, then the tactical consequences are realistic.  The US Civil War for instance saw a great speeding up of troop movements compared to previous eras of combat.

The "interruption" problem is basic to IGOUGO game mechanics.  If you want realistic interruption, you have to use finer and finer grained timespans to do the simulation.  If you're not willing to simulate by the hour or even the minute, then you have to accept that something is not realistic.

Lacking realism, one worries about whether systems are game mechanically fair, and whether they are cumbersome.  These virtues and vices cannot necessarily be satisfied at the same time.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 16, 2019, 02:11:24 PM
Those bigger features might need a little more evaluating before implementation.

Anyway, today develop version 20190216 is available from the downloads (https://github.com/induktio/thinker/) with a couple of other changes:

- New parameter: cost_factor allows one to change AI production bonuses
- New parameter: max_satellites specifies how many of them AI will build normally
- Config file format reorganized
- AI now sometimes nerve staples bases after UN charter has been repealed
- Possible to select custom factions in smac_only mod
- Command line parameter -smac added

I estimate that nerve stapling can have a big impact on AI bases if the charter gets repealed. Funnily enough, you will get a message each time AI staples one of its bases. Post here any observations on how this will affect the game balance.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 16, 2019, 06:08:57 PM
Thanks for your continued work!  It has to be rather tedious on such an old game.

Did I catch that the AI will not build mag tubes?  I know they are OPd but personally I don’t like blocking things the AI is supposed to have access to.  Is there anything else in that category?  Is there a complete list of changes somewhere?
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 17, 2019, 02:29:39 PM
Complete list of what kind of changes exactly? Maybe source code... Thinker doesn't build every single thing that is available, e.g. mag tubes, bunkers and echelon mirrors are some of the things that are not built. Hard to find good use cases for those, although mag tubes could be implemented, but then I certainly wouldn't want the formers building them on every possible square. It would have to be more selective in some way.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 17, 2019, 11:30:00 PM
Personally I would prefer if it could build those, IF doing so would further strengthen the AI competitiveness.  I’m sure it’s a lot harder to implement than it sounds, but perhaps the AI could start building some of those when it would otherwise run out of instructions to execute.

I don’t mind if the AI is able to build overpowered improvements, is what I am trying to say.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 18, 2019, 06:21:20 PM
Not building Bunkers is an extremely good call.  In my own mod, I've disabled Bunkers entirely.  All they provide is a ready invasion route for the human player.  They are of no tactical value to the AI at all, they are a liability.  I don't really know what the original authors were thinking, implementing that.  I believe they were not thinking, or rather, not playtesting enough.

In my mod, mag tubes are available rather early.  It's a Tier 2 tech, you are expected to get it at the beginning of the game.  To actually build a meaningful mag tube network, takes a lot of Formers though.  I find there are many competing needs for quite awhile, even potentially to midgame, depending on your circumstances.  I have the bias of assuming a Huge map with deliberate extra land mass, to give AIs room to grow real empires.  YMMV if you are playing Standard maps that are more like island water worlds.

The stock AI builds acceptable if somewhat wasteful mag tube systems on the maps that I've given it.  I seriously doubt the AI makes good tactical use of such systems.  Rather, they end up being networks for me to use in my conquest.  The stock AI mainly just builds large numbers of units that mill around between cities, as though they're afraid someone's gonna sneak up on them, and that defense by lotsa trip wires in the field is a good idea.  It isn't.  Conquering the stock AI is mostly about whacking a city, watching lots of units going out of support due to loss of minerals, and cleaning up after collapse.  A proper AI would use a mag tube as a combat spearhead, the way I use it against the AI.

I consider roads and mag tubes to be Conquer technologies.  My tech tree is weighted accordingly.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 18, 2019, 11:11:35 PM
What’s your opinion on Echelon Mirrors, out of curiosity?
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 19, 2019, 06:20:05 AM
In general, that it's a dumb game mechanic.  You stress about where to place these things "perfectly" in order to get some kind of bonus.  The randomly generated terrain never gives you a natural perfect layout.  What I actually do, is plant all my forests on flat terrain that's devoid of minerals.  And I plant my farms with solar collectors on rolling terrain so that they all get +1 mineral.  I think that's 2-1-2 most of the time, and ok for an early game tile.

I manually terraform everything.  Around midgame, I've probably finished doing all those farms.  Tree Farms are starting to become available.  If there's any rolling, moist terrain I haven't finished up yet, just sticking a tree on it is starting to look like a better idea.  Tree farms aren't just for happiness, money, and minerals.  Every square of forest, also staves off global warming some.  Planting more and more trees helps you.

In midgame I've probably had a war concern.  I've probably built a mag tube to someone's front door and invaded something.  Fighting wars is a major distraction from tooling around with Echelon Mirrors.  I think it is a piece of gratuitous content, in search of a real need to use it.  I think I've actually Drilled To Aquifer more than I've bothered with Echelon Mirrors, and [Q] is a truly obscure command.  I think that has tended to happen more on my Enormous maps, where I'm not in ready contact with enemies.  On Huge maps, by midgame I'm probably invading someone somewhere.

So let's say that despite every other demand on my attention, I actually get around to placing Echelon Mirrors.  Where will they go?  Well, I look for natural clusters of solar collectors, where I've already built them.  I don't like tearing up existing terrain to do this.  Consequently, there don't end up being all that many natural Echelon Mirror spots.  It's all random, and I developed what was there.

I don't believe in raising altitude either.  All it does in my experience, is mess up my weather patterns.  What's the point of working all these farms, only to have them suddenly go Arid?  Thanks for nothing.  I'd rather just keep working with what I've got, and not have it all fry as land gets raised.

Some people build high altitude energy parks and then put lots of supply crawlers on them.  I say, why not get all the energy from the oceans?  It's cheap and plentiful out there.
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 19, 2019, 08:11:48 AM
The main use for echelon mirrors is really to build an energy park for the super science city, otherwise there's not much use for them. The way to get most energy is to build alternating rows of solar/echelon at max altitude, but the problem is usually finding enough terrain that is high enough. Usually the land raising part tends to make it not worth it, but at maximum each solar panel could yield around 10 energy which can be crawled.

Then if we look at this from the AI perspective, coding a behaviour like this would get pretty complicated since it requires so much coordination from multiple different units. The AI would need to preallocate terrain for the energy park and not build any bases there, etc. Things like that seem to make implementing land-based energy parks not worth it. There are also many other easier things to add to the AI.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on February 19, 2019, 11:27:52 AM
Things aren't helped by the fact that nearby forests do spread into echelon tiles, and then mirrors (unlike boreholes) stop working.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 23, 2019, 06:20:45 PM
Interesting. I didn’t realize that regarding echelon mirrors and forests.  Probably yet another bug or at least an oversight.

On a different topic, I have been testing various base units to see which can boost AI and which are useless.  I would be interested to hear thoughts or feedback.

Significant boost:
Needlejet Colony Pod (or any Aero Pod)
Probe Foil

Small boost:
Gravship Formers (AI can only use on land)
XX Missile (Not sure it’s better than vanilla missiles)
Aero Transports

No boost / detrimental:
Supply Foil (AI doesn’t know how to use)

To test:
Gravship Supply
Enhanced probes and various other enhanced units
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 23, 2019, 07:59:45 PM
Significant boost:
Needlejet Colony Pod (or any Aero Pod)

My testing said the stock AI would build them but not use them.  Do you have different results from that?  Or are you testing Thinker Mod's AI.

Quote
Probe Foil

If you provide this as a predefined unit, the stock AI will go after sea bases with these.  It's bad enough that I often refrain from building sea bases early on, since they're likely to get mind controlled before I can do anything to protect them.  However I can't see how this significantly boosts the AI in any way.  Rather, it annoys me.  I'm ok with that because I think it's fair, I've abused the AI with my own foil probe teams for years.
Title: Re: SMACX Thinker Mod
Post by: BFG on February 23, 2019, 09:40:34 PM
My testing said the stock AI would build them but not use them.  Do you have different results from that?  Or are you testing Thinker Mod's AI.
I was talking about Thinker, but I'll admit my testing on this one wasn't as good as it should be.  I was going off the computer's ability to successfully automate the unit and find a good base square, and how they're handled when they're the only colony in Scenarios.  I'll try an actual game scenario and see.

Quote
If you provide this as a predefined unit, the stock AI will go after sea bases with these.  It's bad enough that I often refrain from building sea bases early on, since they're likely to get mind controlled before I can do anything to protect them.  However I can't see how this significantly boosts the AI in any way.  Rather, it annoys me.  I'm ok with that because I think it's fair, I've abused the AI with my own foil probe teams for years.
Oh yes, these annoy the crap out of me too.  I've lost at least one Thinker game as Zak due to getting hit by a fleet of these.  From Deirdre of all people.  But they do strengthen the AI, which is a big part of the goal here!
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 25, 2019, 09:47:50 AM
> On a different topic, I have been testing various base units to see which can boost AI and which are useless.  I would be interested to hear thoughts or feedback.

> Probe Foil
> Enhanced probes and various other enhanced units

These have already been implemented by the design_units feature long time ago. It builds armored/foil probes and AAA garrisons when the proper techs are available. It's always possible to add new unit combos to boost the AI capabilities though.

> Needlejet Colony Pod (or any Aero Pod)
> Gravship Formers (AI can only use on land)
> XX Missile (Not sure it’s better than vanilla missiles)
> Aero Transports
> Supply Foil (AI doesn’t know how to use)
> Gravship Supply

These types of units are not currently implemented in Thinker, e.g. it does not provide any notable behaviour beyond the standard AI logic. I'm also evaluating which ones of these could be implemented in the next version. It does look like some of them could be helpful but we'll see later which ones will be implemented.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on February 28, 2019, 08:11:23 PM
I may have found a bug in Thinker mod's unit design stuff.

In my SMACX AI Growth mod I do not allow ECM or Hypnotic Trance on probe team units.  I figure that armored probe teams are already enough of an exploit.  Consider how easy it is to make an Elite probe team unit, as they get PROBE bonuses, MORALE bonuses, and whatever increases in base probe team morale that various techs give.  Incidentally, I also eliminated increases in base probe team morale, because they're clearly overpowered as the game goes on.  It's like exploit city and in my mod I've reined all that in.

So I was quite surprised to see the AI make an armored hovertank probe team unit with Trance capability.  I checked my design changelog and indeed, I did eliminate this, it wasn't some mistake in the flags I set.  In my alphax.txt the flags are:
Code: [Select]

; Flags  =
;          000000000001 = Allowed for Land units
;          000000000010 = Allowed for Sea units
;          000000000100 = Allowed for Air units
;          000000001000 = Allowed for Combat units
;          000000010000 = Allowed for Terraformer units
;          000000100000 = Allowed for Noncombat units (non-terraformer)
;          000001000000 = Not allowed for probe teams
;          000010000000 = Not allowed for psi units
;
Hypnotic Trance,       1, CentEmp, Trance, 000011111111, +50% defense vs. Psi

Another possibility is Thinker is exposing a bug that was already in the game's code.  But the stock AI has never designed a hovertank probe team unit, so I've never observed it before.

Adding a Fusion reactor into the mix might be relevant as well.  I know that Scient's patch allows a reactor type to be specified for a predefined unit.  I don't do that in my mod, nor do I use Scient's patch.  My point is the Scient patch may have changed the flag behavior somehow.

The importance to my current game, is Morgan is dominating with all those nice thermal boreholes.  I'm dead last, and he's sending these Trance hovertank probe teams at me.  Fortunately I built the Hunter-Seeker Algorithm, just barely before he and others were going to.  But if it weren't for that, I'd have a real problem.  Mindworms are my armored probe team antidote, since they aren't affected by probes and regular armor doesn't matter to them.  I do allow probe teams to have 3-Res armor, for lack of any way to prevent it, and I think that's all the anti-mindworm buff a probe team should have.  I don't want invincible probe teams in my mod.

probe teams should not have Trance capability
probe teams should not have Trance capability

Note the unkillability.

armor determines probe team combat
armor determines probe team combat

I can't take it out with a probe team either.  Note that I have an Elite probe team vs. his Disciplined team.  Note that I'm using an infantry chassis probe team, to avoid the enemy getting any bonus from his 3-Pulse armor.  Finally note that I'm the Data Angels.  In my mod, they get the usual +2 PROBE bonus, and no other factions get any PROBE bonus at all.  Furthermore in my mod, the only ways to get a PROBE bonus from social engineering are +1 for Power and +2 for Thought Control.  I've chosen Power so I have +3 PROBE.  Now, maybe that just raises my probe team morale, I forget.  The point is, I'm the baddest ass probe team faction that anyone can possibly be in this game, no one else has my advantages, and I still can't even crack these things.  They are invulnerable in probe-to-probe combat, because you can't add a weapon to a probe team to counteract the armor!

Sorta forgot that he's got a Fusion engine and I'm attacking with Fission, but I still think I should be doing better.  I'll try throwing a few units at it to check...

It's quite an exploit.  I did choose to teach the AI to use this exploit, by providing a 3-Pulse Speeder Probe Team predefined unit.  I figure if the player can do it, why not let the AI do it too.  I wouldn't mind changing the game so that probe team armor is not allowed.  However there's no way to do that by .txt modding the stock game.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 01, 2019, 04:58:43 AM
I'm not seeing a way to delete my posts, so I'm reusing this slot for another possible bug.

In my mod, as in the stock game, the compulsion of the Cybernetic Consciousness is to choose Cybernetic Future Society.  Nevertheless, I check on my ally in my current Thinker test game, and I see they've chosen Thought Control!  I've never seen that happen before.

Cyborgs that do not believe in Cybernetic
Cyborgs that do not believe in Cybernetic

My compulsion line in cyborg.txt is a little different from the stock game.  Instead of:
Code: [Select]
  Future Society, Cybernetic, GROWTHI have:
Code: [Select]
  Future Society, Cybernetic, RESEARCHI have no idea if that would make any difference, but that there is a difference, is worth mentioning.




Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 01, 2019, 06:49:31 AM
I'm reusing another one of my undeleteable thread slots for the same bug.  This time it's Deirdre!  Why the heck is she Socialist?  (My version of Planned.)

Gaians who are not Green
Gaians who are not Green

Both the stock game and my mod have the same compulsion line:
Code: [Select]
  Economics, Green, PLANET
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 01, 2019, 06:50:37 AM
Oops, sorry, had multiple tabs open in my browser and posted some AAR stuff in the wrong place.  I've replaced those errant posts with a bug report.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 01, 2019, 10:10:50 AM
So I was quite surprised to see the AI make an armored hovertank probe team unit with Trance capability.  I checked my design changelog and indeed, I did eliminate this, it wasn't some mistake in the flags I set.  In my alphax.txt the flags are:

Another possibility is Thinker is exposing a bug that was already in the game's code.  But the stock AI has never designed a hovertank probe team unit, so I've never observed it before.

Adding a Fusion reactor into the mix might be relevant as well.  I know that Scient's patch allows a reactor type to be specified for a predefined unit.  I don't do that in my mod, nor do I use Scient's patch.  My point is the Scient patch may have changed the flag behavior somehow.

The importance to my current game, is Morgan is dominating with all those nice thermal boreholes.  I'm dead last, and he's sending these Trance hovertank probe teams at me.  Fortunately I built the Hunter-Seeker Algorithm, just barely before he and others were going to.  But if it weren't for that, I'd have a real problem.  Mindworms are my armored probe team antidote, since they aren't affected by probes and regular armor doesn't matter to them.  I do allow probe teams to have 3-Res armor, for lack of any way to prevent it, and I think that's all the anti-mindworm buff a probe team should have.  I don't want invincible probe teams in my mod.

So yeah, that marvelous piece of engineering was indeed created by Thinker's design_units feature. And that's not even the end of story. When it gains more techs, it will upgrade both the armor and the reactor. And also add Algo Enhancement when it's available. Thinker calls Smacx's native propose_proto function to create those prototypes, but the problem with those abilities looks like this function does not do any checks if the rules allow the ability for the unit. So that looks like an oversight. Probably should rewrite some parts of that code.

What those lopsided combat odds really reflect is the overpowered value of fusion vs. fission reactors ("Power" number). Anyone fighting with obsolete reactors is at a huge disadvantage. It would be nice to mod those reactor values but the last time I checked, they were hardcoded in the binary in so many places it's difficult to change them.

In my mod, as in the stock game, the compulsion of the Cybernetic Consciousness is to choose Cybernetic Future Society.  Nevertheless, I check on my ally in my current Thinker test game, and I see they've chosen Thought Control!  I've never seen that happen before.

My compulsion line in cyborg.txt is a little different from the stock game.  Instead of:
Code: [Select]
  Future Society, Cybernetic, GROWTHI have:
Code: [Select]
  Future Society, Cybernetic, RESEARCHI have no idea if that would make any difference, but that there is a difference, is worth mentioning.

That one is intended behaviour. New social_ai decides what society models they will run and the old code has been replaced. They are not allowed to select social opposition models, but currently the social preference category does not get any specific priority either. I could maybe increase that priority but I'd rather avoid situations where the AI's always choose one model regardless of other considerations. Now it has some situational awereness, where if the AI has enemy factions closeby, it will prioritize POLICE, MORALE, and PROBE more, among other effects.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 01, 2019, 10:46:18 AM
Thinker calls Smacx's native propose_proto function to create those prototypes, but the problem with those abilities looks like this function does not do any checks if the rules allow the ability for the unit.

Well that solves a mystery at least.

Quote
New social_ai decides what society models they will run and the old code has been replaced. They are not allowed to select social opposition models, but currently the social preference category does not get any specific priority either.

This isn't good from a character narrative perspective.  Deirdre could chew you out about not being Green, when she herself could be the very Planned or Free Market economy she's railing against!

It's also not necessarily good from a game political perspective.  The original 7 factions were carefully positioned to be at each others' throats in various balanced and predictable ways.  Possibly similar with the 7 factions in the expansion, by themselves at least.  Now, randomly combine any / all of them, and social choices definitely slant one way or another.  Player makes choices like, "No one will get pissed about my Politics this game.  Free ride."

So, I've modded to get rid of "weak" factions.  There's nothing like a stock Morgan in my mod, he's much tougher because he's got piles of instant money.  No SUPPORT penalty either.  Most of my factions are supposed to be retaining their original character, i.e Morgan builds.

Some of the social engineering choices weren't championed by anyone, so I changed that.  The Pirates champion Wealth.  The Data Angels champion Thought Control.  The Believers champion nothing!  Only faction that has complete free will like that.  The Cult of Planet takes over the championing of Fundamentalist.  Marr goes for Power because he is a Conqueror, and Svensgaard isn't doing it anymore.

Lots and lots of playtesting to balance these.   Don't really want the factions or the techs to be genericized, with some kind of "one true borehole" path through the game.  It makes TOTAL SENSE for Morgan and is TOTAL ANATHEMA for Deirdre.

Some of the factions, they retain a secondary compulsion, i.e. ECONOMY for Morgan, PLANET for Deirdre.  Other factions, in my mod they don't have a secondary compulsion.  It's a limiter, it straitjackets their choices in the social engineering table.  I made a lucky find, that setting this to Nil, gives the stock AI more choices.  And that the stock AI will actually make those choices!

I only want them limited if it's totally to the faction's advantage, and also true to their narrative personality.  So yes, it's ok if Zhakarov fixates on RESEARCH.  Desired, even.  Cha Dawn, however, I do not require to fixate on PLANET.  He's already got +2 PLANET, maybe the AI will decide that's enough?  Maybe he's like a televangelist, completely cynical.  Will damage the planet with Capitalism to keep his mindworms well funded.  Dishonesty in cults and religions is a thing!

Quote
I could maybe increase that priority but I'd rather avoid situations where the AI's always choose one model regardless of other considerations. Now it has some situational awereness, where if the AI has enemy factions closeby, it will prioritize POLICE, MORALE, and PROBE more, among other effects.

My view is, the .txt modder should be deciding what's constrained about a faction and what isn't.  That's what makes a faction a faction.  But to the extent that constraints are relaxed, the AI should be doing whatever it thinks best.  I've changed things around so that Chairman Yang can end up with a Capitalist Police State, even with the stock binary.  Yes the AI actually chooses that, no new code!  Or he may choose something else.  Point is, Capitalist Police State is modern China.  It's a thing.

One thing I would like all factions to do, regardless of orientation, is spread better at the beginning of the game.  Not do stupid things with colony pods.  With the stock binary, I and others noticed that an Explore focus seems to trigger better early empire growth.  Don't know why, only that it does.  Hence how I got the name, "AI Growth mod".  The Explore trigger wasn't an original idea, it was something I found in the forum archives.

Title: Re: SMACX Thinker Mod
Post by: Induktio on March 01, 2019, 12:12:40 PM
Lots and lots of playtesting to balance these.   Don't really want the factions or the techs to be genericized, with some kind of "one true borehole" path through the game.  It makes TOTAL SENSE for Morgan and is TOTAL ANATHEMA for Deirdre.

Some of the factions, they retain a secondary compulsion, i.e. ECONOMY for Morgan, PLANET for Deirdre.  Other factions, in my mod they don't have a secondary compulsion.  It's a limiter, it straitjackets their choices in the social engineering table.  I made a lucky find, that setting this to Nil, gives the stock AI more choices.  And that the stock AI will actually make those choices!

The thing here is that playing according to some narrative doesn't appear from nowhere, instead somebody has to code very specific rules how that should be handled. And often in the stock game there are situations where playing strictly according to a factions narrative, e.g. using only their prioritized social settings, results in inferior play. The dilemma didn't rise earlier with borehole building because the AI basically never built them anyway. Sea level rise wasn't really relevant when the AI had such poor production etc. Like if one AI is planet friendly, should it stop borehole building altogether? How is it going to deal with the disadvantage in production vs the other factions then? Possibly they could have a reduced amount of borehole construction for the sake of the narrative but not sure how well they would do.

The social_ai formula is still a work in progress, it will probably receive tweaks to the scoring system. But people shouldn't expect the choices to be exactly similar to the stock AI's choices because there will probably be significant differences.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 01, 2019, 01:55:59 PM
I think I now remember an issue that came up during testing the social_ai feature. If we look at Gaian faction file for example, it has these lines:
Quote
  Economics, Green, PLANET
  Economics, Free Market, nil

The last values on each line are supposed to be the social priority and opposition effects, in that order. In the actual data structure, these values are always -1 which is an undefined value. It probably means the rules parser ignores these two values and they have no actual effect on the AIs. These values are also mentioned here: http://alphacentauri2.info/wiki/Faction.txt_editing_guide (http://alphacentauri2.info/wiki/Faction.txt_editing_guide)

Scient might know more about this since he contributed to the guide but don't know when he's going to release the decompiled code. I notice the guide also states that "The Social Priority line specifies the social choice a faction will oppose and be unable to select in social. This has no effect for a human using the faction." This seems incorrect, it should refer to "Social Opposition line" and the opposition category value should also affect human factions equally.

Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 01, 2019, 06:44:34 PM
And often in the stock game there are situations where playing strictly according to a factions narrative, e.g. using only their prioritized social settings, results in inferior play.

That's why I sat around for 10 months rebalancing factions to make them superior again.  My Gaians aren't weak, they kick ass.  They have free Biology labs.  I had to give Zhakarov free Biology Labs and Network Nodes, because he really wasn't tough enough in the face of escalating competition between all my rebalanced factions.  And he doesn't have any PROBE penalty anymore, nor any unhappiness every 4 citizens.  All of that was necessary, partly because the Discover part of the tech tree doesn't give any weapons anymore.  You can't count on the University being the guy with the Chaos gun now.  Nor the Hunter-Seeker Algorithm.  Nor are the Gaians the ones with the Missiles now.  Nor do the Morganites have the Silksteel Armor.

I don't want your AI to try to adjust every flaw of the game.  Other modders deal with that stuff. 

You can't anticipate every balance issue that arises with mods.  Yes, you can focus on the stock factions and alphax.txt rules.  Please don't.  Not in ways that mess up what other modders are doing in their mods.  There's a difference between being compatible and having an interface boundary with other mods, and thinking you personally are supposed to solve every problem yourself, with Thinker mod as some kind of standalone ultra-competent game experience.

Many of us like SMAC, and still talk about it and recommend it to others 20 years later, because of the narrative and world building.  I mean, that's why /r/4Xgaming actually gives me the most downloads, because people over there still have collective memory and still care.  Nobody, literally nobody, has done anything remotely close to SMAC in the narrative dept.  It's still the exemplar.

Stepping on that in the interest of gameplay, is not a feature for some of us.  Yes we want to be more challenged, because we are bored.  But for many of us, we don't want the Gaians to be turned into the Morganites, or really every faction to be the Morganites.  If we wanted that, we could play with Randomize Faction Personalities, or just start a game with 7 Morganites!

I think it's notable that Pandora happened, and didn't get traction, very exactly because they didn't really bother with all the narrative and world building stuff.  I'm told they eventually achieved a somewhat modern AI, due to some uber-modder's work.  Sort of like you, Induktio, you could have easily been that guy.  Going that road, Pandora's your endgame.

Quote
Sea level rise wasn't really relevant when the AI had such poor production etc.

Actually it is still not relevant.  I have proven in the other thread, that the game is cheating on AI eco-damage.  3X difference compared to a human playing the same faction!  There's a reason I've never adopted the play style you've implemented for the AIs.  I'd get slaughtered by mindworms doing that.  The whole world would end in a dripping wet mindworm apocalypse.

I hope you decide to make it relevant, i.e. make the AI play by the same eco-damage rules as a human player.

Quote
Like if one AI is planet friendly, should it stop borehole building altogether?

I'd go so far as to say, the Gaians should never be allowed to build a borehole at all.  If that was a modding feature, prohibiting some particular action, I'd be all for it.

In contrast, the Cult of Planet would build the most boreholes.  They're complete jerks.  They'll tell you anything, long as they get you indoctrinated into the cult.  Anyone remember In God We Trust with Marty Feldman, and the Church of Divine Profit?  That's Cha Dawn!  Or at least, that's how I imagine Cha Dawn in my mod, certainly a direction they can be going in.  Deirdre is absolutely earnest.  Cha Dawn could easily be a big fat liar.

Quote
How is it going to deal with the disadvantage in production vs the other factions then?

In an ideal world, the Spartans would deal with it by invading.  The Peacekeepers would deal with it by turtling up, growing population, and voting.  The Gaians would make mindworms and attack -3 PLANET factions.  The University would turtle up and research.

Yeah, that's all much more AI than just cranking up the condenser, crawler, and borehole production.  I have no idea how much more, or what the stock AI already did.  I've adjusted as much as I could at the .txt mod level, giving the few AI inputs I was allowed to give.  Some of those did help, so I know that the stock AI isn't a complete dunce at differentiating play styles, as a matter of faction input.  The original designers did try to do this, it's only a question of how successful they were.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 01, 2019, 07:09:42 PM
It probably means the rules parser ignores these two values and they have no actual effect on the AIs.

I know for fact that setting the secondary compulsion to Nil, caused a greater range of stock AI choice than I otherwise saw them do.  The Hive never went Police State Free Market until I did that, for instance.  Obviously I've never looked at the plumbing, the machine code.  But I would submit, it's not so easy to observe how a piece of machine code behaves.

I also observed factions being much more willing to move back and forth between Fundamentalist and Democratic, after I gave them this freedom to do so.  If for instance you compel a faction to seek MORALE, well then they're always going to go Fundamentalist.  So I refrain from compelling them.  Or I'm careful about what compulsions actually result in meaningful choice in the SE table, and what compulsions don't.

I believe that choosing a secondary compusion, such as PLANET, makes the AI seek those entries in the social engineering table, and prefer those over others.  However, it is not ironclad.  I have often seen a faction choose the None column choice, if the AI thinks it's a better deal.  For instance, my mod gives +1 GROWTH for Survival.  Factions often choose it, rather than Capitalist or Socialist or Green.  It gives 1 benefit and 0 penalties, which might be better than the 3 benefits and 2 penalties of other choices, depending on what the AI wants to do.

I don't have rigorous proof of what an "affirmative" secondary compulsion does.  I think of it as a "strong suggestion" to the AI.  I'm guessing the AI will not choose something that goes against the suggestion, i.e. a PLANET penalty instead of a bonus, but I'm uncertain of this.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 01, 2019, 07:51:18 PM
You can't anticipate every balance issue that arises with mods.  Yes, you can focus on the stock factions and alphax.txt rules.  Please don't.  Not in ways that mess up what other modders are doing in their mods.  There's a difference between being compatible and having an interface boundary with other mods, and thinking you personally are supposed to solve every problem yourself, with Thinker mod as some kind of standalone ultra-competent game experience.

Many design problems are balancing acts, including finding a balance between difficulty and interesting narrative. It certainly doesn't have to be exclusive, although currently this mod has been slanted in favor of increasing challenge. I will say straight up though, Thinker is supposed to be a playable experience without extra mods, but modding should always remain a possibility. There's simply so many players that prefer the vanilla game mechanics.

Quote
Sea level rise wasn't really relevant when the AI had such poor production etc.


Actually it is still not relevant.  I have proven in the other thread, that the game is cheating on AI eco-damage.  3X difference compared to a human playing the same faction!  There's a reason I've never adopted the play style you've implemented for the AIs.  I'd get slaughtered by mindworms doing that.  The whole world would end in a dripping wet mindworm apocalypse.

I hope you decide to make it relevant, i.e. make the AI play by the same eco-damage rules as a human player.

It seems like the post is jumping to conclusions pretty fast. Although it's not fully documented, in the stock game the AI gains an advantage in eco damage at thinker and transcend difficulty levels, as can be seen from here: http://alphacentauri2.info/wiki/Difficulty (http://alphacentauri2.info/wiki/Difficulty) At librarian and below, the eco damage should be equal for human and computer bases, unless I missed something.

The post also looks like you've entirely ignored how the clean mineral formula works or are not aware of it. As a player, it's perfectly possible to run 50 mineral production from boreholes with zero eco damage. This just requires some timing with the first fungal pops and then rushing lots of tree farms or similar clean mineral boosting facilities. The AI might be able to do this too if the behaviour was coded in, but currently it's not implemented obviously. http://alphacentauri2.info/wiki/Ecology_(Revised) (http://alphacentauri2.info/wiki/Ecology_(Revised))

If we were to go on increasing AI eco damage, then the increased fungal pops would also act to lower the eco damage because the clean mineral cap increases faster. The increased number of fungal pops would also cause sea level rise even sooner. Fungal pops can also be highly exploitative mechanic for the player since the worms generate planet pearls. That's just the way eco damage works in the stock game. Now, Yitzi's patch did attempt to do lots of changes here, but not sure if it makes sense to duplicate them.

It's always possible to change librarian level cost factor to 7 and see how the equal eco damage would change things when the cost factor is similar to transcend level. I just doubt it makes that much of a difference here.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 02, 2019, 07:02:52 AM
As a player, it's perfectly possible to run 50 mineral production from boreholes with zero eco damage. This just requires some timing with the first fungal pops and then rushing lots of tree farms or similar clean mineral boosting facilities.

It "just" requires you to do a whole lot of stuff.  As opposed to say, spamming whatever you like with all kinds of nifty boreholes, free pass no problemo.  All those requirements constrain your growth and conquest.  The AI suffers none of that by comparison.  I mean the game "just" requires you to conquer everything on the map in order to win it, just about everything could be spoken of this way.

Quote
If we were to go on increasing AI eco damage, then the increased fungal pops would also act to lower the eco damage because the clean mineral cap increases faster.

You still have to stay on top of it, and some factions with their Economy choices will not have the same options for mitigation.  What's AI Morgan gonna do?  Double down on Free Market like a good little climate denier, that's what.

Quote
The increased number of fungal pops would also cause sea level rise even sooner.

I'm not worried about that.  I want the AI to suffer the consequences of the eco-damage it does.  So that it isn't so easy for it to make 40 minerals cities and invade me like I'm standing still.  I may get some flooding, they may get giant mindworm stacks that completely wipe out their cities, no matter how big they are.  Have you played through that sort of thing?  Did it because of illegal chemical weapons a couple of times, it wasn't pretty.

Quote
It's always possible to change librarian level cost factor to 7 and see how the equal eco damage would change things when the cost factor is similar to transcend level. I just doubt it makes that much of a difference here.

And then other things change like how many drones are unhappy.  Shifting these things up and down doesn't work unless all of the factors can be adjusted.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 02, 2019, 10:21:55 AM
I'm not worried about that.  I want the AI to suffer the consequences of the eco-damage it does.  So that it isn't so easy for it to make 40 minerals cities and invade me like I'm standing still.  I may get some flooding, they may get giant mindworm stacks that completely wipe out their cities, no matter how big they are.  Have you played through that sort of thing?  Did it because of illegal chemical weapons a couple of times, it wasn't pretty.

Did you read how that eco damage formula works? Of course you're going to get lots of problems when doing atrocities while UN charter if effective. I suppose that part of the formula works as intended, e.g. limits certain exploitative strategies. Otherwise the original eco damage is pretty broken in the sense it can be gamed by very simple strategies. It doesn't make sense to say eco damage gives some huge advantage to the AIs since human player can easily exploit it. With higher eco damage, it's even easier to trigger the first fungal pops and increase the clean mineral cap...

Sure it's possible to play a variant where the player is not allowed to cause any eco damage, but that is a self-imposed limitation and the game will get much tougher as a result. But then again, giving AIs cost discounts is a self-imposed choice for the player too. What maybe could be done here, is have some kind of a config option to have the AI adjust the extent it uses heavy terraforming improvements, like boreholes and condensers. It could even adjust it according to the faction definition, but I'm not sure yet how that might be implemented.

Edit: So looks like the wiki has two guides for eco damage:
http://alphacentauri2.info/wiki/Ecology_(Advanced) (http://alphacentauri2.info/wiki/Ecology_(Advanced))
http://alphacentauri2.info/wiki/Ecology_(Revised) (http://alphacentauri2.info/wiki/Ecology_(Revised))

There are some discrepancies in the details how the eco damage is calculated, in this case the advanced version is probably correct. Improvements number should be divided by 8 before added to the minerals, and one of the terms in the final eco damage number is "3 - PLANET", and not "PLANET + 3". But the textual description of eco damage should be correct there.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 02, 2019, 06:51:36 PM
I suppose that part of the formula works as intended, e.g. limits certain exploitative strategies.

Until you get everyone to legalize chemical weapons.   :clap:  Which can be surprisingly easy or surprisingly hard to do.  Depending on what, I don't even know.  Dumb AI thoughts about weapons it's not even gonna use?  Anyways, gotta love the morality of Planet giving its blessing according to the United Nations protocols.

Quote
It doesn't make sense to say eco damage gives some huge advantage to the AIs since human player can easily exploit it.

How much Super Hover Former empire repair have you really done?  It gets old.  Especially those flooded river plains that actually kill any unit you leave on them.  I don't care how much benefit you're supposed to be getting by fighting the good fight against mindworms, it's really a drag to have your empire ripped apart again and again, never being able to make any progress on it.

And that's assuming you still have land to work with.  Once the world turns to water, your minerals drop like a rock!  Even the Pirates can be affected, because deep ocean doesn't generate any minerals.  Once you have no productivity, you don't have a way to get out of your situation.  You die.

I learned the hard way that I actually have to premeditate about that.  The climate scientists of Planet have to be really really good.  They have to anticipate that they're going to lose all their minerals and start picking city sites and production strategies early to counteract that.  Like, if you built a lot of mining platforms and subsea trunklines in advance, you'll be ok.  If you didn't, well screw you, you're just not a good scientist are you!

You also have to premeditate about how to survive the mindworm attacks.  Like build the Neural Amplifier before you set off the world destruction.  There's a lot of stuff you have to do, it's no free lunch.  You also spend all your time fighting mindworms and none of it fighting other factions.  That can turn into a real problem.

Never once, to this day, have I survived a chemical weapons triggered mindworm onslaught.  And the only reason I survived Fission Armor's early factory debacle, is because Tim made the Ascent to Transcendence take super duper long to produce.  If it had been the stock game's version, or my version, the game would have been over with complete AI victory.  When I played my 1st Thinker mod game combined with my mod, I knew that endgame was coming, which is why I quit.

Quote
What maybe could be done here, is have some kind of a config option to have the AI adjust the extent it uses heavy terraforming improvements, like boreholes and condensers. It could even adjust it according to the faction definition, but I'm not sure yet how that might be implemented.

What I actually want, is for the AI to do what it's already doing, and suffer for it.  The same pain that I get.  Because then we get to see, this isn't some kind of best / obvious / uber strategy for the AI to be doing.  The AI could easily make all these great productive minerals and then burn out.  Or maybe it will actually build some eco-friendly facilities, I've actually seen the stock AI do that, when testing the early factories debacle of Fission Armor mod. 

But the point is, the AI will not simply get to cakewalk human players, like we're all some kind of pile of dummies who don't actually know how to play the game, and should have been using the same strategies the AI is using.  The game is set up to cheat like a mad dog for the AI, the AI doesn't pay the cost of its ecological transgression at all.  That was fine when the AI wasn't any good at supply crawlers and boreholes, but you've totally changed that.  You've given it the knowledge of a power gaming minimaxer.  Well, such a "player" needs to suffer the consequences fairly.

I'm not interested in my life being easier with the eco-damage, like dropping down to Librarian.  I think the eco-damage, as is for humans on Transcend, are ok rules.  I've been playing with those rules forever.  Dropping to Librarian is basically nerfing eco-damage rules out of the game.  So now you've got your AI, and it's doing its horrible crawlers and borehole thing, forcing me to play that way to keep up.  Because it's now the golden path through the game.  I don't want there to be only 1 golden path through the game.  I don't want to be forced to play the game the AI's way.

So in my perfect world, the AI has to actually play the game that I'm playing, and not be given a huge eco-damage cheat.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 02, 2019, 07:28:07 PM
and one of the terms in the final eco damage number is "3 - PLANET", and not "PLANET + 3".

I fixed it.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 05, 2019, 10:35:20 AM
Just for fun, here's a talk called Playing to Lose: AI and "Civilization" (Soren Johnson) (https://www.youtube.com/watch?v=IJcuQQ1eWWI). He was the main AI designer at Firaxis from Civ 3 onwards.

Btw, one of the lines on that revised eco damage should be like this:

Quote
Improvements = ((2*WorkedImprovements + 1*UnworkedImprovement + 8*Boreholes + 6*EchelonMirrros + 4*Condensors + Seabase - Forests) / (8 * (1 + TreeFarm) * (1 - HybridForest))

A very important detail in the ordering of the brackets.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 05, 2019, 03:11:01 PM
Btw, one of the lines on that revised eco damage should be like this:

You mean on one of the wiki pages?  You could just edit the wiki to be correct.  It doesn't require any kind of special permissions to do that, just an account here.

I skipped through the Soren Johnson video.  I didn't really get a lock on anything I'd especially comment on.  In general, the problem of an AI being written that simply kicks the player's ass, and thereby isn't any fun to play against, is a known game design problem.
Title: Re: SMACX Thinker Mod
Post by: dino on March 05, 2019, 06:15:46 PM
In general, the problem of an AI being written that simply kicks the player's ass, and thereby isn't any fun to play against, is a known game design problem.

Giving lame AI so many cheats, that it can crush a player mercilessly no matter what is indeed unfun, unlike competent ai with little cheats.
So I call it bullsh*t, if we are talking actual good AI, not AI cheats, since I've never played a 4x game where too good AI was a problem, opposite was always a prablem,

Most probably 90% of players never spend enough time with 4x games to learn to play competently enough, to require competent AI to enjoy the game, so producers can't financially justify spending more resources on AI development and what we were getting was considered good enough for overwhelming majority of gamers.

Other less likely explanation is it's actually so hard to do, that no one ever succeeded despite trying and allocating serious resources to AI. This one may, or may not be true, we will never know, because probably spending something like 25% of a game budget on competent AI programmers in order to make really great one, was never even attempted by any game studio, since it wouldn't be considered a smart bussiness decision.
Imo it was always a financial decision, not a game design decision, but a small vocal minority of hardcore fans need to be addressed in an interview, so we get "bad ai is actually a good game design" argument...

Short version: Average gamer is too dumb, or lazy to care enough about AI, so a good one would brought far less revenue, than it would cost to develop.

Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 05, 2019, 06:42:03 PM
What I said is nevertheless a known concept in the game industry, and is not limited to 4X games.

Budgets have been a historical issue, as have computing resources.  I don't know whether either are issues lately.  I haven't been keeping up, as it mostly doesn't matter to me what the rest of the industry is doing with AI.

The only data point I've collected in that regard, is Gal Civ III is reputed to have tried to really sink some 64-bit threading resources into AI.  The player feedback I read in /r/4Xgaming, doesn't seem to say that yep, they obviously succeeded.  I haven't been willing to embark upon GC3 learning and mastery to find out one way or the other.  Got other development priorities right now.

Multiplayer bias is an ongoing issue.  The idea that since humans are "always" going to do better than AIs, that human players would prefer to seek other humans to play against.  This claim leaves out a substantial chunk of players, like myself, who do not enjoy interacting with other humans online.  Either because humans turn out to be too much into hardcore minimaxing to be any fun to play against (a subset of the general lobbying problem), or they're just jerks, making Life more unpleasant than it needs to be.

Multiplayer bias is further encouraged by social media marketing models.  Which again, I personally don't like, and do my best to avoid participating in.  I'm a Facebook refusenik, for instance.

Aside from those problems, is game production bias, which Soren Johnson did comment on at one point in his video.  The game designers are out in front with all these rules and systems they keep heaping onto a game.  Human playtesters egg it on: yeah yeah yeah MOAR MOAR MOAR!  The AI programmer plays catch-up to those concerns, in an industrial studio setting at least.

As a solo indie developer, I have the power to say "no" to that.  To recognize that half of what's in SMAC, is game mechanically useless.  I've never seen anyone endeavor to put a 4X franchise on a diet.  I've only seen developers follow the mantra of "MOAR".  I intend to do differently.  My SMACX AI Growth mod is like a dress rehearsal for what does and doesn't matter about the game.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 06, 2019, 10:38:58 AM
Upgrading an engine to 64 bit is really only significant if one has to allocate more than 2 GB memory. That's what the purpose is. Rarely do these AI routines perform such heavy computation that 64 bit would help there. Most of the time we're mainly dealing with scripted routines, not some computationally heavy machine learning stuff.

Usually something like pathfinding might be a bottle neck, probably also in SMAC it's the culprit that hangs the game from time to time. Though that might have to be investigated further with a profiler. Interestingly I created a separate, simpler pathfinding routine for Thinker which seems to perform its role very efficiently. From very early on, I figured it was necessary so the AI would have an idea how to deal with the complex and modifiable terrain.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 07, 2019, 07:42:48 AM
Most of the time we're mainly dealing with scripted routines, not some computationally heavy machine learning stuff.

GC3 may have attempted to do some computationally heavy, threaded, machine learning stuff.

Quote
Interestingly I created a separate, simpler pathfinding routine for Thinker which seems to perform its role very efficiently.

The main thing I hate about the stock binary's pathfinding, is the way it makes mistakes with Formers and other non-combat units.  Get near a border, and the pathfinding goes crazy!  If it would just use whatever the combat units are using, all would be well.  Then you just get the occasional total meltdown where a unit moves back and forth until it asks you if you want to quit doing that.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 08, 2019, 12:02:16 PM
> GC3 may have attempted to do some computationally heavy, threaded, machine learning stuff.

It would be good to have a source for this kind of claim. If they were using something like that, I'd guess it's a pre-computed model. Large strategy games don't necessarily lend themselves easily to that kind of analysis. The range of possible actions is very large in those games, compounding the problem.

About the other issues raised in this thread, I won't give any promises what stuff will be in the next version of Thinker. Mostly it should deal with fine-tuning the existing behaviour though.
Title: Re: SMACX Thinker Mod
Post by: MercantileInterest on March 08, 2019, 04:47:25 PM
What does Thinker do to the faction placement algorithm?
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 09, 2019, 08:54:07 AM
> GC3 may have attempted to do some computationally heavy, threaded, machine learning stuff.

It would be good to have a source for this kind of claim.

Search /r/4Xgaming and also /u/draginol.  That's Brad Wardell's account.  I remember reading something about this, but not caring enough to get into the details.  First I'd have to see if it plays well, and I was unwilling to put in the time.  Only if it was beating me, or challenging me, would I bother to figure out how it was doing that.  So I read what other people said about it, and the results were mixed.  Like, some people said it wasn't particularly smart and definitely relied on resource buffs to provide challenge.  I don't actually know one way or the other.

My memory of 2 years of posts in /r/4X gaming is also, that nobody else has done 4X AI worth a spit.  GC3 is the only one that is worth investigating for its technology.

Quote
Mostly it should deal with fine-tuning the existing behaviour though.

You really don't need roads on every single square.  It's a waste of terraforming production, and it makes AI territory easier to invade.

You don't need a Condenser like every other freakin' square.  Personally I have preferred to put them on Rolling, Arid squares.  Then I get a mineral to go with my food and complete lack of energy.  I never put mine on Flat terrain because then you just get a pile of food with no minerals and no energy.  If squares are already Rainy, then they don't need Condensers next to them.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 09, 2019, 02:12:53 PM
What does Thinker do to the faction placement algorithm?

Well, it is described in the documentation, the new algorithm decides where all the factions will spawn on the map. The main purpose for this is to prevent multiple factions being bunched up in a small island or similar. That part the algorithm does really reliably, it will evaluate the size of the starting landmass and discard bad locations. Random map generation also works better when it's paired with my WorldBuilder enhancements that are now also available from the project page (https://github.com/induktio/thinker/blob/master/Details.md).

And yeah, I looked at those testing reports. It might be getting redundant to test the same parts of the game any further though. But then again, the next version is not ready.
Title: Re: SMACX Thinker Mod
Post by: dino on March 12, 2019, 11:05:57 AM
Compared to vanilla, builder gameplay is nailed, but thinker has now opposite problem to vanilla it's extremely passive with no defences.
Enemy territory full of boreholes and condensers, tightly packed with bases and roads is like free candy and leading faction can be easily overrun in few turns in late 2100s.
It's literally easier to conquer the world than vanilla and I saw bvanevery here and one guy on rpgcodex having exactly the same experience with thinker.

My thinking is that you can't make ai capable of determining when it can safely buildup and when it needs defenses, so it has to do both all the time and rely on cheat bonuses to compete with more adaptive human.

1) I've proposed already a formula that it needs at all times to have ( 50% + ( ai_fight * 10% ) + 10% if vendetta + 10% if enemy units inside borders ) of mineral production used by unit support.
2) It needs a way to keep the units upgraded, from my testing vanilla ai do upgrade units when it has excessive amount of money, so maybe some change to make it more of a priority and reduced upgrade cost for the ai.
3) It shouldn't build so many sentinel type of units.
4) If player military power variable ( used for military ranking ) is 3x smaller than ai and ai mood toward player is bad enough it should just trigger vendetta straight away.
    Under some conditions vanilla ai can just declare vendetta without going into dialogue ( meybe it's in perihellion only ), so it's an idea to replicate this when these conditions are met.

Whathever you have on your plate currently, you should put it on hold and try to address issues above first, because currently it's boring and passive in early game and easy to conquer.

Another issue is ics style of bases placement, it doesn't compete for land in early game I can easily and without conflict, grab more land early, than against vanilla ai with exploration focus.
1) Maybe you could incorporate vanilla colony pod ai into yours, like give it 40% chance it will behave like vanilla, 60% chance it'll use your movement/ base placement code.
2) Make it spread bases 3 tiles away, never 2 I can give ai cheats that makes it popboom, which will be wasted with too tight placement, also tightly packed early bases have less special resource, monoliths, rainy tiles to work with, plus the issue of not grabbing land fast enough early.

As amazing, as builder aspect of the ai is in thinker, it's as unsatisfactory to play against as vanilla currently, just for different reasons.
It can compete only if you don't rush them. If you don't attack it, you can either give it enough cheats, that you don't have a chance, or not and you'll always win a very predictable and uninterrupted builder game.
Title: Re: SMACX Thinker Mod
Post by: MercantileInterest on March 12, 2019, 06:20:34 PM
A pair of variables from Yitzi alphax:


Disable, ; Technology to convoy all three resources
Disable, ; Technology to convoy all three resources outside of base radius

Convoying all three resources doesn't sound like a useful gameplay feature but this would be:


Disable, ; Technology to convoy resources outside of base radius

With this option, crawlers could be a very early game tech but not overwhelmingly powerful.

Another Yitzi variable:


0        ; If non-zero, borehole count per base is squared when determining ecodamage {under -2 billion to over 2 billion}

Makes it eco-suicide to spam more than one borehole per base. This would interfere with Thinker's current functioning.

Right before he left, Yitzi talked about the need for huge armies of formers bogging down gameplay. His proposed solution was to make all formers cost mineral an extra mineral upkeep regardless of clean reactors or support value but at the same time to reduce the time needed for terraforming in the alphax file.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 12, 2019, 07:14:26 PM
Umm yeah, recently progress with the mod has been somewhat slower than I would have liked. I've evaluated several new changes to the terraforming algorithm and scrapped some ideas along the way. It's pretty difficult to code robust heuristics that work well in a wide range of situations.

> Compared to vanilla, builder gameplay is nailed, but thinker has now opposite problem to vanilla it's extremely passive with no defences.
> 1) I've proposed already a formula that it needs at all times to have ( 50% + ( ai_fight * 10% ) + 10% if vendetta + 10% if enemy units inside borders ) of mineral production used by unit support.

I've been wondering about this as well, it looks like currently Thinker builds too few military units. Luckily this can be modified easily by adjusting the threat formula. Currently the main heuristic it uses is the distance to the nearest enemy base. The formula has a wide range of variables but I think it does make sense to add "if enemy units inside borders" factor there. We'll see what kind of effects this stuff will have when I get the next develop version ready.

> 2) It needs a way to keep the units upgraded, from my testing vanilla ai do upgrade units when it has excessive amount of money, so maybe some change to make it more of a priority and reduced upgrade cost for the ai.

I don't remember seeing the AI upgrade any of its units. Can you provide some kind of a save game where this happens consistently?

> 3) It shouldn't build so many sentinel type of units.

It's just currently it builds too few units. When its adjusted to build more, the units should be mostly offensive in nature.

> 4) If player military power variable ( used for military ranking ) is 3x smaller than ai and ai mood toward player is bad enough it should just trigger vendetta straight away.

Diplomacy stuff probably will not be a part of the next update. It will need a lot more reversing before anything can be implemented.

> 1) Maybe you could incorporate vanilla colony pod ai into yours, like give it 40% chance it will behave like vanilla, 60% chance it'll use your movement/ base placement code.

This colony pod argument is something I will mostly disagree with. Grabbing territory doesn't do much by itself unless it's populated by bases. Closely packed based can be defended more easily anyway. Each turn a colony pod spends on movement is a turn of missed productivity from a future base.

> Disable, ; Technology to convoy all three resources
> Disable, ; Technology to convoy all three resources outside of base radius

Would make crawlers super-overpowered and require lots of patching. Nah.

> Disable, ; Technology to convoy resources outside of base radius

Insignificant, Thinker mostly crawls tiles that are inside base radius anyway. Thinker formers wont even consider improving tiles that are not workable by some base.

> 0        ; If non-zero, borehole count per base is squared when determining ecodamage {under -2 billion to over 2 billion}

Not planning any patches on the eco damage formula currently.
Title: Re: SMACX Thinker Mod
Post by: dino on March 12, 2019, 09:21:41 PM
This colony pod argument is something I will mostly disagree with. Grabbing territory doesn't do much by itself unless it's populated by bases. Closely packed based can be defended more easily anyway. Each turn a colony pod spends on movement is a turn of missed productivity from a future base.

You're too much concentrated on how well it does isolated buildup, too little how its behaviour interact with other factions and human player.

Grabbing territory deny it to other factions, player controlled one specifically. For a player it's essential to have more land to work with than AIs to counter their cheat bonuses.
With current strategy I can easily corner thinker faction on my contient on a small piece of land and grab 2x more land myself.
Prevent war with diplomacy until I'm ready and after buildup 2x more land mean 2x more support minerals, easy future war.

With 3 tiles spread, infantry from neighbouring base can still reinforce threatened one within a single turn. More spread mean more special tiles per base, one extra food, mineral, or monolith tile early will offset 2 turns spent getting there.

When the amount of land is constant, than less spread mean more bases and faster utilisation of limited land.
But more spread in early game will result in 2x more land and 20% less bases in a given timeframe, but after buildup 2x more land equals 2x more resources and 2x more really good tiles that are crucial in early game.
Especially with growth bonus that gives AI popboom ability, at the same stage human player starts to popboom.

But denying land to human player is the main argument for a fast land grab.
Imo you should be a bit more concerned with how it interfere with what human player wants to do and how human can interfere with what it does.

***
As for unit upgrade, I remember experimenting with custom AI factions few months ago, I was curious what AI will do with excess money.
I gave Gaians starting money bonus and 10% interest rate, it was generating mad money.
It build tons of scout patrols early, at some point all scouts were gone and it had tons of plasma sentinels and it didn't lost scouts in war since it was only me and them on the continent.
I assumed it upgraded scouts at some point, sadly I didn't pinpoint the moment when that happened with a save, so I am not 100% sure it was the case, maybe it lost them to worms.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 13, 2019, 04:14:17 AM
Makes it eco-suicide to spam more than one borehole per base. This would interfere with Thinker's current functioning.

Another option that would work in any alphax.txt without requiring a specific binary, would be to make Boreholes a lot more expensive.  I mean really, Thinker mod at this point seems to be built around major exploits in the game's rules.  I've plugged some of them, making Supply Crawlers and Boreholes available later in the game.  I didn't do that because of Thinker, it was already part of my mod design.  And it does help, as not every faction even makes it to being able to produce supply crawlers or Boreholes.  But really, should Boreholes be this cheap if the AI is so good at making them? 

Quote
Right before he left, Yitzi talked about the need for huge armies of formers bogging down gameplay. His proposed solution was to make all formers cost mineral an extra mineral upkeep regardless of clean reactors or support value but at the same time to reduce the time needed for terraforming in the alphax file.

What bogdown?  I just spend some turns executing all of Yang's Formers.  Yes he had an excessive number of them, but I'm not seeing the problem.  Fairly weak peons can kill the garden variety non-combat Former.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 13, 2019, 04:27:40 AM
The formula has a wide range of variables but I think it does make sense to add "if enemy units inside borders" factor there.

Bear in mind that if I'm rail heading, I may not be inside the AI's faction's borders at all.  Until I instantly link the next base in 1 turn.  A core principle of -5 POLICE combat is you have to whack a base in 1 turn.  Rail heads are an excellent way to do that, but not the only way.  All techniques involve jumping over borders rapidly.  Air units and drop pods can reach right over borders.

Quote
It's just currently it builds too few units. When its adjusted to build more, the units should be mostly offensive in nature.

Beware of glass cannons and paper tigers.

Quote
Closely packed based can be defended more easily anyway.

That's the main thing I consider rails to be for.  Before I go on offense, that is.  Integrated empire for robust defense.  I don't build "close" bases like Thinker AI.  I build almost perfectly terrain covering bases.  I don't like wasting space.  Bureaucracy does affect me, whether or not it affects the AI.  I try to build my empire with a perfect radius, assuming I have the resources to do it.  I'm poor as dirt in Thinker mod and have to react to conditions.

Closely packing bases and then putting roads everywhere is lousy defense BTW.  No bottlenecks to choke and eliminate the enemy in stacks.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 13, 2019, 04:45:17 AM
With current strategy I can easily corner thinker faction on my contient on a small piece of land and grab 2x more land myself.
Prevent war with diplomacy until I'm ready and after buildup 2x more land mean 2x more support minerals, easy future war.

You can kill a local enemy with any number of tactics, doesn't have to be anything fancy like you're saying.  How do you suppose your land grab is going to work with distant enemies, on a Huge map?  Answer: it doesn't.  You can't control distant AIs.  It doesn't matter how dedicated you are, how proactive you are, and I don't care what 4X TBS game you're playing.  You control whatever your logistical radius of early game control really is, and the AI fills in the rest.  Any specific AI can be a suicidal sacrifice.  In general the AI factions are spamming the map, spreading wherever you can't control.  If you are on a big map, they will gain their footholds somewhere, and you can't stop it.

My preferred technical term for this phenomenon is Whack-A-Mole.

If you typically play on Standard sized maps, you may not have noticed how "close quarters" your fighting always is.

Quote
or monolith tile early will offset 2 turns spent getting there.

I do game the popping of pods to get better starting resources for the earliest cities.

Quote
but after buildup 2x more land equals 2x more resources and 2x more really good tiles that are crucial in early game.

Another flaw in your claim is whether the human is actually willing to do 2x mouseclicks to play the damn game.  Yeah, sure you can win games by colonizing, colonizing, colonizing until you're blue in the face.  Do you personally have the stamina for that?  It's akin to grinding in a MMORPG, working the land so hard to get a result.  Now if you're sorta compulsive about colonizing, colonizing, colonizing, if you think that's fun and pretty much why you're playing the game, you need to recognize it's a specific play style and not everyone shares your joy in it.  Just as Infinite City Sprawl is a specific play style that I think is pretty lame too.

AIs don't get tired of doing very boring things over and over again.  That's a big problem with AI play mechanics that are mostly SPAM.  Does the human want to deal with all the cleanup required to win?  Does the human want to defend the same damn bases the same damn way for 100 turns in a row?  Sometimes the AI "beats" me because it has bored me to death.

Quote
It build tons of scout patrols early, at some point all scouts were gone and it had tons of plasma sentinels and it didn't lost scouts in war since it was only me and them on the continent.

It can lose them to exploration attrition.  It also doesn't have to upgrade.  It could disband, or give units to allies.
Title: Re: SMACX Thinker Mod
Post by: dino on March 13, 2019, 11:03:59 AM
Huge maps are boring. I never play on huge map, only on standard, or custom smaller than standard ( to keep standard rules ).
So land grabbing is crucial and thinker currently leave me way too much room for early expansion.

I also play with modded AI factions, that can popboom and have support bonus, so i need to have more land than them to have any chance at competing.
If thinker did spread more and kept bases defended from the beginning, it would provide serious pressure on me from the beginning.

If thinker spread bases more like I want, you would have less bases to conquer and manage later, not more.
Current almost ics style of placing in thinker is actually annoying and I advocate for less but bigger bases, as more fun singleplayer experience.
On top of being less annoying, it would be imo more challenging in right circuimstances ( buffed AIs that can popboom early ).

If there is no consensus, maybe we could have at least thinker.ini setting that would keep AI bases 3 tiles away.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 13, 2019, 01:57:39 PM
Well at least you're testing something different than I am.  Even if Huge maps can get boring, I almost never play on Standard maps because there's no challenge to them at all.  At least on Huge, particularly the way I've modded SMACX AI Growth mod, AIs do have the ability to take root, establish real empires, and be genuine threats for awhile.

I don't think it's a good idea to expect support bonuses and pop booms when contemplating Thinker mod's design.  It's supposed to be compatible with the stock game and with other people's mods, and that's quite a set of assumptions about modding.  I don't believe in giving any faction a SUPPORT bonus, that's one of the things I removed because it is quite overpowered.  Everyone has to choose Police State (+2 SUPPORT), Fundamentalist (+1 SUPPORT), or Power (+1 SUPPORT) if they want more SUPPORT.

I arranged it so that the combo of Socialist and Eudaimonic will give +4 GROWTH and an unconditional pop boom in the presence of a Children's Creche.  It's also possible to pop boom with less than that if you make people happy enough for a Golden Age.  Those both take time to happen.  The exception is Lal, who is given +2 GROWTH as one of his major faction advantages.  Under Thinker mod he pop booms like mad!  Really scary.  I thought the Pirates were scary, but Lal is at least equally scary.

For our great suggestions about Thinker mod, I don't feel a need to say "spread your bases differently".  I would rather see it directly address this list of core problems:


On the positive side, it does respect research foci.  That was my big issue back in the day.  Even the monster superpowered factions, have followed the research trends I expect from my mod.  And they are severely different and noticeable, as for instance you only get weapons and armor by researching Conquer.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 13, 2019, 06:30:46 PM
You're too much concentrated on how well it does isolated buildup, too little how its behaviour interact with other factions and human player.

Grabbing territory deny it to other factions, player controlled one specifically. For a player it's essential to have more land to work with than AIs to counter their cheat bonuses.

That kind of stuff probably is not something that can be implemented by just having the colony pods walk more distance. For example, if there are fewer, but bigger bases, drone management becomes even more of a problem than it is now. It already builds the bases mostly 3 tiles apart which is the distance infantry can cover in a single turn along roads. Fast horizontal expansion is pretty much the key in this game, at least if one looks at this speed run (http://www.dos486.com/alpha/university/). It's 3 pages long, the most interesting stuff is in the end.

I wouldn't recommend playing this mod on any maps smaller than standard. The AI needs some time to grow up before it can be effective. Even standard sized maps may be problematic here. The game still mostly has the old AI for combat unit movement, which in theory might be rewritten to assign new priorities for the units, but it would be a really big project.

That's why I slightly increased large map size to 50x100 in the recommended alphax.txt file (https://github.com/induktio/thinker/blob/master/docs/alphax.txt). That file is also the configuration I use for testing this mod. Mostly it just has the standard game configuration values there. With few exceptions, I don't do separate testing with mods, although on these issues it probably has no effect.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 13, 2019, 07:02:03 PM
Fast horizontal expansion is pretty much the key in this game, at least if one looks at this speed run (http://www.dos486.com/alpha/university/).


He cheated by playing with Directed Research.  That's a baby's game.

In my mod, the Caretakers and Usurpers have been stripped of their free armor, stripped of their recycling tanks, and their Battle Ogres' main armament has been nerfed to strength 3.  They get E1 Progenitor Psych and C2 Field Modulation to start with.  The latter gives the fairly useless Cloaking Device and nothing else.  Unlike all other factions in my mod, they get 1 penalty to go along with their 1 bonus.  Most factions just get 3 bonuses and no penalties.  That's how powerful I consider Directed Research to be.  If you play it outside of Alien factions, you are cheating.

It's for people who couldn't make the cognitive leap from Civ II and whined and screamed about things changing.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 13, 2019, 07:50:34 PM
You might then want to go argue with T-Hawk whether the speed run is valid or not. Lots of tactics can be considered exploitable. The basic principles for expansion should work about the same either way.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 13, 2019, 07:53:28 PM
I don't have anything to gain by arguing with T-Hawk, about a demonstration on his own website that doesn't purport to be anything other than exactly what it is.  But, you claimed it is an exemplar of how to win the game.  I don't agree with you, because his method relied on a very basic kind of cheating.  Just go to the biggest exploit of the game as quickly as possible to win it.

Notice furthermore that he took the research buff faction, on top of already having a directed research cheat.

If you took the Aliens in my mod, you'd have your few remaining Alien advantages, but you wouldn't have any research buff.  And it would be a long time before you got supply crawlers at all.  Even if you got the Weather Paradigm, it takes more time to get it in the 1st place, and more manufacturing cost.  There's no way you'd get all this done in under 100 turns.  That's 'cuz I've spent a lot of time rebalancing exploits and holes in the game.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on March 14, 2019, 08:47:43 AM
If there is no consensus, maybe we could have at least thinker.ini setting that would keep AI bases 3 tiles away.
+1. Or make it faction-dependent to add variety. If I remember right, vanilla Miriam preferred very wide spreading. I too have no stamina to play on huge maps and mostly use standard, and there colony pod wars become a minigame in itself.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 14, 2019, 04:40:16 PM
Well well, now we have a new develop build (version 20190314) available from the downloads (https://github.com/induktio/thinker). This update is focused on the build priorities and terraforming:

* Thinker now supports formers based on all triads. Design_units will also create gravship formers when the techs are available.
* Formers will build less roads and try to avoid placing them on forest tiles when they're not needed.
* Other smaller tweaks to former priorities.
* Military unit production priority is now notably increased from previous amounts.
* Whenever AI loses bases to conquest, this also triggers an extra priority to devote nearly all available resources to building new units.
* During peacetime these modifiers will have a much lesser effect, so economy building should still work.
* Small changes to social_ai to prefer priority category models more often. But social priority/opposition effect values (e.g. PLANET) have no effect because of the engine, and are still ignored.

It needs some more testing to determine if the military buildup is enough now. The next step would probably be to implement credit rushing for production items, currently it does not do that. It would be pretty powerful, since now rushing is basically a human exploit.

This update doesn't change anything with the base spacing though. For example the new road building method would need yet more changes if the spacing was changed from current values.
Title: Re: SMACX Thinker Mod
Post by: dino on March 14, 2019, 10:59:26 PM
I know you didn't change anything, but this time all bases were spread 3 tiles apart ( no base within borders of another base ).
If it looked like this in my previous game I wouldn't complain at all. Maybe I had weird map geography previously, will see after more games.

Idea regarding upgrading units: Just automatically disband all units, that are inside base and have both attack and defense values half, or less of maximum available.
Exception: Don't scrap scouts when laser/synthmetal available, wait for the next tier.
Half their mineral value will be returned toward production and can be always performed, no funds needed. It'll also free support minerals for non military production, if currently not threatened.

First impressions:
Level of military buildup probably would be suitable in late 2100s, for an early game it seems a bit too crippling.
Positive is it would be really hard to conquer it early. I'll continue with this game to see if AI will recover from a slower start.

If it doesn't, possible suggestion ( maybe I wrote it too early and should see how midgame plays out first, but since I've already typed it, I'll leave it here ):
Keep it like it was before, for the first x number of turns ( possibly make it dependant on mapsize, plus small random factor, you could also make it variable in the ini, so we can playtest to find the best value ).
If it looses a base during early game ( these x number of turns ), engage something less aggressive than "almost all production towards military".
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 15, 2019, 12:06:32 AM
I know you didn't change anything, but this time all bases were spread 3 tiles apart ( no base within borders of another base ).
If it looked like this in my previous game I wouldn't complain at all. Maybe I had weird map geography previously, will see after more games.

There is only one known exception to the 3 tiles between bases rule that Thinker follows currently. If a colony pod is on a jungle tile, then it is allowed to have one base within 2 tiles, otherwise the next base has to be within 3 tiles or more before a colony pod is deployed. It might be easy to miss this factor if the jungle is covered in forests etc.

Quote
Idea regarding upgrading units: Just automatically disband all units, that are inside base and have both attack and defense values half, or less of maximum available.

Something like that could be done. It might also be possible for the AI to run out of design slots in the late game, especially after new reactors are discovered. Not sure how often that is a problem. There always seems to be some obsolete designs lurking around. It might be even better if it upgraded the units, but have to investigate more how that could be implemented. Hmm.

Quote
First impressions:
Level of military buildup probably would be suitable in late 2100s, for an early game it seems a bit too crippling.
Positive is it would be really hard to conquer it early. I'll continue with this game to see if AI will recover from a slower start.

Early game is quite tricky to manage especially if the faction has support problems. When the bases reach 20+ minerals the problem would pretty much solve itself. Early on there might be also the problem of lacking any viable armor/weapon techs. If the new version is somehow crippled in the early game, then I might write some fix for that. But if the AI is at war with a close enemy, then it should probably be building lots of units regardless.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 15, 2019, 12:33:42 PM
+1. Or make it faction-dependent to add variety. If I remember right, vanilla Miriam preferred very wide spreading.

She does, but it's not faction dependent, it's Explore research focus dependent.  This phenomenon was observed by several modders previous to myself.  I brought it to its logical conclusion in SMACX AI Growth mod.  The inputs of faction personality and research foci do partly govern AI behavior in the stock binary.  Most factions in my mod use Explore as part of their focus.  For instance Morgan is not a Build faction, he's an Explore, Build faction.  Zhakarov is Explore, Discover.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 15, 2019, 12:47:39 PM
Early game is quite tricky to manage especially if the faction has support problems.

Having SUPPORT problems was a stupid, unbalanced idea in the original game.  So was having SUPPORT buffs.  In my mod this is all gone.  There is no crippled Morganite faction, he starts with the same SUPPORT that everyone does.  If you want more SUPPORT you have to choose the government forms that give it.  The only one that gives a SUPPORT penalty is Green and it is only -1.  So -1 is the lowest SUPPORT anyone can have in the game, and you have to choose it.

This is an instance where you can really kill yourself trying to solve AI problems, that as a matter of game design, don't even have to exist in the 1st place.  The game was not enriched by Morgan being a wimp or Yang being overpowered.  Heck I've had to buff Morgan to +2 ECONOMY.  I don't know what they were thinking, that +1 ECONOMY was supposed to be some kind uber power.  It isn't, at least with the stock binary and game behavior.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 15, 2019, 02:44:02 PM
If the players want, they can always go and mod the factions to have more resource buffs. However, it is not the default setting in this mod.
Title: Re: SMACX Thinker Mod
Post by: dino on March 15, 2019, 03:47:11 PM
It recovered from production paralysis, buildup really took off like 10 turns later, but it had solid defences up all time.
I think for a standard map it more or less works, but on a larger map it would be a bit of waste.
If it could on top of that modernize its armies somehow, it would be amazing.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 16, 2019, 03:53:14 AM
Well well, now we have a new develop build (version 20190314) available from the downloads (https://github.com/induktio/thinker).

I notice it contains an alphax.txt.  None of your previous development versions did, nor did your 0.8 release version.  Was this intentional?  I sure hope not, because that makes it de facto incompatible with any mods that change alphax.txt.  That really should be left alone as the text modder's territory / interface / boundary.

Well, looks intentional.  I'm looking at a diff of your changes compared to the stock game.  I guess you've decided you want to go a little into the .txt modding business as well.  My analysis shortly.

Most significant change is global warming frequency:
Code: [Select]
1, 2     ; Numerator/Denominator for frequency of global warming (1,2 would be "half" normal warming).
Your design philosophy here, is you're just going to make global warming easier for everyone.  I can see some players objecting to this.  They might want your AI, but not your reduction in global warming.  Yes they could change it to something else, if they're into learning those details and figuring out what you did differently.  What if they just want to play the stock game, but with your AI?  What if they want to play someone else's .txt mod?  Now they can't just drop your files on top of their installation, they have to be very careful about whose alphax.txt they've got.  That may not be a big deal to you, and you may not think it's a big deal to hardcore players here on this site.  But I encounter a lot of people on /r/4Xgaming or GOG games that don't seem to have gotten into modding before.  You're definitely creating a mod management problem on this.

I notice a lot of changes to #WORLDBUILDER settings.  Now at least, if someone else's alphax.txt simply throws those out in favor of their own, it's not necessarily incompatible.  It just generates a different kind of map.  That can be a problem if your .exe code is relying on a different kind of map though.

Like, I'm going to feed it whatever I feed it.  I spent a month or two on my own map generation conclusions, even before I started SMACX AI Growth mod.  It was one of the 1st things I folded into my mod.  I solved problems I thought needed solving, and I think I'm an expert at what you get when changing those settings in alphax.txt.  To any extent I need to refresh my memory on it, I've got articles written up on this site about it, in painful detail about why I did what I did.  So there's no way I'd be taking your map generator.   :D  I hope your code is not expecting some very particular thing, like for your new faction placement algorithm.  Because in general, people who alter #WORLDBUILDER can't obey constraints you might put there.

My own map philosophy, briefly, is no small islands ever, bigger continents, and plenty of ocean in case the Pirates are in the game.

I notice you redefined what a Large Planet is.  Stock is 44x90, yours is 50x100.  It's not a crazy idea or anything, but if your code is depending on that to work well, people are going to be violating your constraint.

Now maybe you don't have any constraint, only a desire.  Do you desire that people test your AI at 50x100?  Well, someone who prefers the stock alphax.txt, is still going to be on 44x90.  If they ever provide you testing results, you're always going to have to be nagging at them whether they played on 44x90 or 50x100.  And it will be a lot of durr durr d'oh! to straighten that out.   :doh

Maybe you're fine with that, but I tell people Huge map is how you're expected to play my mod for a reason.  That's the design center, and I get better feedback the more people I've actually got playing according to my design center.  If someone says to me, "Well your stuff doesn't work very well on Standard!" I don't have to be surprised, I can tell them I designed the whole thing around Huge maps and up.  Sadly, I don't think I've gotten enough feedback to date to be seriously worried about these map size differences.  Nevertheless I thought I would point out the problem with "going your own way" on map sizes.

Like, maybe you should just join us on the dark side of Huge?

In my mod I added 2 map sizes: Enormous 80x160, and Giant 128x256.  Those were driven by what I could and couldn't correct about faction placement at the .txt mod level.  "Giant" was a pretty easy term to come up with, but it took me a long time to come up with the intermediate term "Enormous".  Point is I added map sizes, I didn't change any existing ones.

How do you feel, for instance, about adding Very Large, instead of changing Large?

I notice you allow anti-gravity struts on air units.  It's a very minor change.  Why aren't Fuel Nanocells good enough?  Was that really important enough to you to roll into alphax.txt?  I'm guessing you don't actually depend on this behavior.  If you did, that would be a real problem, an actual incompatibility.

I notice you don't allow Clean Reactor on a probe team.  That's just a bug fix, I did it in my mod too.  Hopefully you don't rely on that bug being fixed.

I notice you removed the asterisk in front of the *Sea Formers unit.  I've always wondered about that asterisk, if it had any real purpose.  I hope removing it doesn't break something.

Your other changes are comments.  Helpful, and they don't create any problems.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 16, 2019, 01:48:16 PM
I notice it contains an alphax.txt.  None of your previous development versions did, nor did your 0.8 release version.  Was this intentional?  I sure hope not, because that makes it de facto incompatible with any mods that change alphax.txt.  That really should be left alone as the text modder's territory / interface / boundary.

Sure, of course it's intentional. Since I've been recommending some changes to alphax.txt, I'm not going to just leave it as a note on the Github page. But notice they are optional changes. Some of the earliest stuff I've been modding is that Worldbuilder stuff, and other people have already been doing that for many years. I also posted on forums about that even before Thinker project was started. What really here is unacceptable is if you're trying to portray your changes to Worldbuilder as some kind of a new, original innovation. You may have discovered something by yourself, but there's no way your mod was the first one in that. On various forums there's probably some posts written about that topic from over 10 years ago.

Faction placement algorithm shouldn't rely on that Worldbuilder stuff in any significant way, but there are some bugs in that algorithm that should be fixed in the next version. Specifically, if players are using some pre-made maps like Map of the Planet, I don't recommend them to use faction_placement until the bug has been fixed. It can be disabled from the config. For random maps it usually works how it's supposed to. If not, then one can roll another start from Quick Start button.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 16, 2019, 08:08:28 PM
No, it's not about who thought of what in Worldbuilder.  It's that I as a modder am never going to use your version of it.  This is the 1st time you've decided to reach into alphax.txt.  When you do that, you risk stepping on other people's lawns.  My inventory above is about what could be a problem, and what isn't a problem.  Because you've never offered anyone an alphax.txt before, I'm making sure you haven't done something like become dependent on your alphax.txt changes.  'Cuz there are enough substantial mods out there that simply aren't going to do it your way, on these various things.

It would be nice to have a mod manager.  That would mitigate a lot of "stepping on lawns" and "I want your AI, not your nerfed global warming" sort of issues.  But, I'm definitely too burned out to do it.  I'm nearing 1 year of psychological effort put into my mod, and 6 months of full time work countable hours on it.  I need to move on, to things that can make me money as a game developer.

I think testing is a very big deal, something I've made a huge commitment to over the past year.  Some of my comments are aimed at maintaining a sanity of testing regime.  I'm ultimately thinking about, whether some person on /r/4Xgaming thinks the results suck or not.  Lots of testing discipline has to be maintained to keep things from sucking.  Make one change you think is not that big a deal, everything can start sucking.  It takes a lot of testing and iteration to get things right, and I'm glad I'm pretty much at the end of it.  I'm not going to be churning my stuff much anymore, not unless some tester comes along and shows me how I really broke something.  It takes way too long to fiddle with things, get results on the fiddling, and correct the fiddling.  I feel very informed at this point as to what a commercial 4X TBS testing effort is going to be like, and there's gonna be a lot of stuff I won't do as a result.

So yeah, how about not changing Large, and adding Very Large?

I respect your work enough to test it for now.  I don't do that sort of thing forever.  I can't make a living playing games of SMAC indefinitely, not even for my own modding let alone yours.  It's buckets of time.  Time that should be spent on a new, better game than SMAC.
Title: Re: SMACX Thinker Mod
Post by: dino on March 17, 2019, 09:34:01 AM
This is the 1st time you've decided to reach into alphax.txt.  When you do that, you risk stepping on other people's lawns.
Since when it's *your* lawn?
Just include alternative version of your file meant for thinker if it'll ever be required, which is not the case currently and probably won't be.
Induktio already agreed to make changes to values from txt files optional if possible, during ai focus debacle.

Quote
I'm nearing 1 year of psychological effort put into my mod, and 6 months of full time work countable hours on it.
You've spent a year changing values in configuration files and playing the game, in your own words fiddling. If you think you've learned anything substantial about game development, you are delusional.
For what you've made, 6 months of full time work is insane, you'll never produce a game.

Quote
I respect your work enough to test it for now.  I don't do that sort of thing forever. I can't make a living playing games of SMAC indefinitely, not even for my own modding let alone yours.
Just play the game if you enjoy it and eventually provide feedback, or don't play if it feels like an unpaid job.
It's Induktio who is doing us a favor here, not the other way around.

Quote
Time that should be spent on a new, better game than SMAC.
Good luck.

I won't be escalating this topic beyond this post.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 17, 2019, 02:03:44 PM
Since when it's *your* lawn?


It's my lawn when deciding whether to recommend Induktio's work to others in conjunction with my own work, on other sites like /r/4Xgaming where the vast majority of new downloads actually come from.  A new user ends up dealing with 3 scenarios:


Historically, Induktio endeavored to do (2) although there was some very early stuff where "don't affect each other" was broken.  To his credit, he fixed that.  Now he's moving into (3) and for me, all kinds of alarm bells are going off.  I hope others take user packaging seriously and don't just think eh, everyone is and wants to be a modder.  Everyone will want to just set this here, tweak that there to make stuff "finally" work.

Quote
Just include alternative version of your file meant for thinker if it'll ever be required,


I am never, ever going to publicly support binary patches that require changes to alphax.txt in order to work.  It's not my job to keep trailing after a binary patch writer who feels like changing what is compatible, for however many years he or she decides to keep making things incompatible.  I'm not planning to be in maintenance mode indefinitely far into the future.

Yitzi did this somewhat in alphax.txt.  He changed the encodings of how a few things are interpreted.  And then Yitzi vanished, never fixing or resolving those few issues.  Nobody decided to follow in his footsteps and maintain his work either.  The legacy of that, is doubling the maintenance workload of anyone doing .txt modding.

Scient's patch, notably, did not do that.  All changes he made are optional.  You can drop any alphax.txt on top of it and everything is still interpreted the same way as the stock game.

Quote
which is not the case currently and probably won't be.


And the point of raising the stuff I raised, is to make it clear why I want it to stay that way, and why other .txt modders would want that as well.  Modders do not want their work getting bitrotted over time.  I've seen all kinds of work get destroyed in the Wesnoth community because some coder didn't think maintaining the existing encodings was important enough.

Quote
Induktio already agreed to make changes to values from txt files optional if possible, during ai focus debacle.


I can't keep track of details like that in a thread this long, and what does "if possible" mean anyways?  It's always possible, so what it really means is "if I want to, as a matter of my development."  I'm perfectly willing to make a push towards "please want to keep compatibility", especially the 1st time I ever see an alphax.txt appear.

Quote
You've spent a year changing values in configuration files and playing the game, in your own words fiddling. If you think you've learned anything substantial about game development, you are delusional.
For what you've made, 6 months of full time work is insane, you'll never produce a game.


Here you have no idea what you're talking about.  Show us your own mod, and tell us how you tested your mod in production to ensure that it actually works the way you want it to.  You speak as though writing is simply spewing a volume of words onto pages of paper.  That's not where the quality of the writing comes from.

I went back and looked at your old posts.  I see that you've posted about your work before (http://alphacentauri2.info/index.php?topic=21039.msg116012).  I've replied to your ideas about your work before, but I haven't actually tried your work.  I expect that your work is not in the same state now, as in that thread.  I also don't think you've been doing public releases to playtesters as one of your main goals.

I think you should be more considerate of others before claiming some job is easy, or that you've even remotely attempted the same job.  If you have any interest in wrapping your head around the scope of what I've done, you can read my entire CHANGELOG.  It's in the readme_mod.txt of my mod, and it is painstakingly thorough.  Every damn 'fiddle' is in there.  I wrote that thing, very exactly, knowing that unappreciative people like yourself would come along.  It gives you the opportunity to actually see the work, instead of hand waving about how easy something is supposed to be.

Alternately, you could read the entire thread of my mod's production.  The CHANGELOG entries do periodically show up there as well.  It is not easy to know what's important in a thread and what isn't.  But to give you an idea of the scope, this thread about Induktio's work is 18 web pages long.  My thread is 23 pages long.  The scope of discussion is "roughly comparable".

Quote
Just play the game if you enjoy it and eventually provide feedback, or don't play if it feels like an unpaid job.
It's Induktio who is doing us a favor here, not the other way around.


Do you understand the level of testing feedback I provide when I actually go at it?  Go read my threads.  I'm not doing Induktio a favor, he owes me nothing and I tested his mod with my mod for my own reasons.  But my feedback is valuable because it is thorough.

Do you have any idea how hard it is for indie game developers to get good playtesting feedback on anything, when they don't have the budget to pay people to playtest?  Try asking about it in /r/gamedev.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 17, 2019, 09:29:11 PM
Early versions of Thinker did not provide a separate alphax.txt because my assumption was that it would be mostly played on the standard game config. That's where I did my testing too, except that I also used the additional Worldbuilder stuff. It certainly would have been possible to provide modded alphax.txt even earlier so users wouldn't have to copypaste those changes which is even more error prone.

This kind of AI has to make certain assumptions what strategies are viable, otherwise it would take way longer to develop. So there is always going to be a certain reference config on which most of the testing is based. That's just the reality of things. Sure, one can always deviate from that config but then that kind of stuff will not be so tested or even work at all. Hopefully most of the settings can be modded though.
Title: Re: SMACX Thinker Mod
Post by: T-hawk on March 21, 2019, 03:54:18 PM
Induktio, you do the best thing for your mod and your goals, ignore anyone who's just here to poop on it.

Same as I do with my writeups, they're there and I'll ignore anyone who just comes to dump on it from some sanctimonious high horse.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 21, 2019, 04:40:57 PM
:)

Here's a preview of the most significant things that should be added in the next release:

Faction placement will get several bugfixes but also along with that I'm considering a new feature. Many games have map generators which guarantee X amount of resources near each player starting location, so why not implement it here. Currenly I'm testing a version of faction placement with a feature that adds 2 nutrient bonus resources near each land based factions starting location. Technically it works just by removing a supply pod and replacing it with a nutrient resource. Water factions will not get any extra here, they have way too much food anyway, so this will make land factions more competitive.

It should be also possible to implement credit based rushing for the AI production. I think it might be limited only to rushing facilities based on some selective rule. Maybe any facility in headquarters and drone management facilities in any base that is in danger of rioting. Upgrading existing units is more complex to implement, and it can also result in very unpredictable situations for the players if frontline enemy units get upgraded in between turns.
Title: Re: SMACX Thinker Mod
Post by: dino on March 21, 2019, 05:51:20 PM
I think you should try to money rush as much as possible of everything, money rushing increases production capacity by 50% - 100% depending on the stage of the game.
When ai sits on its wealth unused, it's a huge opportunity cost.

In my games I rarely rush stuff in core bases, I use funds generated in core bases to rush like crazy essential stuff in freshly deployed outer bases, so they can catch up faster:
recycling tanks, formers, crawlers, colony pods once a base grow beyond size 1 and as you suggested psych facilities in a base of riot danger, these are things I'd prioritise and prioritise smaller bases over big ones.
Exception being energy percentage bonus facilities, should be prioritised in big bases.
I wouldn't have selective rule what can be rushed, everything could be rushed, but I'd have rules on what and where is a priority.

Once AI borders with other factions ( make it year based and depending on mapsize, if there is no way to make it smarter ), I'd make it try to accumulate and maintain some emergency funds, for probe team actions and emergency rushing of military units after loosing a base. Make emergency fund x times current money output, maybe I'd make it enough to rush one up to date unit in each base + mind control a base.

Title: Re: SMACX Thinker Mod
Post by: T-hawk on March 21, 2019, 07:09:03 PM
Rushing drone control facilities does run into the problem that the (unmodded) AI doesn't realize when they won't actually work, because the drone problem is caused by pacifism units that override facilities.  And really the best way to rush your way out of drone problems is a colony pod to reduce the size of the base.

I agree with dino, rushing is for fresh bases not established ones.  Although the logic isn't because the base is new, it's because which item is much more important than which base, and the best items will occur at new bases.  Also because rushing is worth more in bases with low mineral production, because rushing minimizes the unspent-minerals-turns waiting in the box.  Formers are almost always the most important item for those new bases.  It's more colony pods if you have the PTS but of course most AIs won't.  Recycling tanks are always at least decent too and I think generally better than support-costing units.  Economic multipliers should rank a lot lower than the unmodded AI and most players think, basically never worthwhile until the input baseline is at least 20 units and more typically like 40.  And there is nothing special about the HQ, except for the rare cases of running -4 Efficiency or having a labs-doubler secret project.
Title: Re: SMACX Thinker Mod
Post by: dino on March 21, 2019, 08:02:18 PM
If I understand features description corectly, thinker AI can already switch out off free market, when hit with pacifist drones, so making them not trigger psych facilities rushing should be doable.
Thinker is also capable of popbooming, so two, or more extra worked tiles can make psych facility really worth investment.
But if free space on the continent isn't filled yet rushing colony pod instead could be better.
With right police and support, rushing police unit (with police abillity preferably ), is a cheaper alternative to psych facility.

In early stages developing outer bases faster and deploying colony pods from them faster, helps with land grabbing.
Base placed in poor location can be useless for many decades if left alone, but with rushed recycle tanks, two formers and a crawler, will catch up quickly.
Both cases can be recognised by smaller size, this why I'd prioritise smaller bases.

It should be up to the code that chooses production to recognise when percentage bonus facility is worth investment.
If it's choosen for production at all, then it could be rushed as well, if there is no other more usefull stuff to rush and "emergency fund" is maintained.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 21, 2019, 09:32:13 PM
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 (http://alphacentauri2.info/wiki/Hurry)
Title: Re: SMACX Thinker Mod
Post by: T-hawk on March 22, 2019, 02:21:18 AM
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.
Title: Re: SMACX Thinker Mod
Post by: dino on March 22, 2019, 08:24:15 AM
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.
Title: Re: SMACX Thinker Mod
Post by: dino on March 23, 2019, 11:34:58 AM
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.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 23, 2019, 05:45:35 PM
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.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 26, 2019, 06:52:56 PM
Looks like it's time for a new build. Version 20190326 is now available from downloads (https://github.com/induktio/thinker). 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.

Title: Re: SMACX Thinker Mod
Post by: dino on March 26, 2019, 07:52:52 PM
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.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 26, 2019, 08:27:16 PM
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.
Title: Re: SMACX Thinker Mod
Post by: dino on March 27, 2019, 08:12:25 AM
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
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 28, 2019, 01:20:27 AM
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?
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 28, 2019, 01:36:03 AM
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.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 28, 2019, 02:37:56 PM
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).
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 28, 2019, 03:28:48 PM
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.
Title: Re: SMACX Thinker Mod
Post by: dino on March 28, 2019, 03:47:25 PM
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 ?
Title: Re: SMACX Thinker Mod
Post by: dino on March 29, 2019, 09:18:15 AM
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.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 29, 2019, 03:12:10 PM
It is incorrect to say nutrient bonuses would not apply to alien factions. In pretty much all of my tests, they got the two nutrient bonuses upon spawning. Faction_placement works in a way that the bonuses will appear in squares that previously contained supply pods. Actually when we will add forests to the mix, it makes also sense from the storyline point of view because forests can be popped from supply pods.

Generally I strongly dislike the addition of alien factions in the expansion, they just don't fit in thematically at all. I almost never add them to the games when playing. Even modded custom factions are a lot more interesting, I kind of like how they did the factions in Sigma pack (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=264). They seem to be fairly balanced. Can't really say any faction in there is broken when it comes to mini-maxing.

> 1) It still plays crossfire opening movie instead of original, Ytzi version of no expansion mode had it covered.

It's been such a long time since I last had opening movies enabled, didn't even thought of that. Is that as simple as using opening.wve instead of openingx.wve? About those interface graphics not sure if that is necessary, they seem to only change the colors a little.

> Wouldn't it be simplier to just include the smac mod with adjustments in thinker releases ?

If we have to keep making some adjustments to the txt files, then I would probably prefer to include it with Thinker. Now I'm just linking to the repo which has the original files offered by DrazharLn. Might have to reconsider that based on what changes we'll need.



Title: Re: SMACX Thinker Mod
Post by: dino on March 29, 2019, 04:15:57 PM
I think, I've figured out how your colony pod placement works...
It just use the original code, but before it moves you check if there is a base within 2tiles radius, if not and a base can be built, you do it instead of moving.

colony pod pathing
colony pod pathing

You could disassemble a bit more of the original function and reduce the radius in witch it seeks for spots to lets say 12 (or 9 ?) tiles.
Maybe then Peacekeepers could find a destination on an excellent terrain to the west, instead of settling barren wasteland on a path to the distant Monsoon Jungle.
It's a common issue, I've observed in most of my games. I once saw Deidre settle whole Great Dunes, because they were on a path somewhere, while ignoring 4 bases worth of rainy hills in the opposite direction.

If we are at Monsoon Jungle, you could get rid of the original code that build bases two tiles away on it, the bases are too cramped and have no space to grow to their full potential there.
Small error, maybe it's vanilla - ai can build a base on top of volcano, in fact it almost always does that.

> About those interface graphics not sure if that is necessary, they seem to only change the colors a little.
It's not necessary, but it'd be a nice touch, it's also a bit more than colors. It bothers me enough to overwrite smax pcx files with renamed smac files in my installation folder, ocd, autism, whatever it is, it's no joke ;)

Any thoughts on the tech ai weights from my previous post ?
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 29, 2019, 05:07:17 PM
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.

What you did here is somewhat similar to what tech_balance did in its earliest version before the scope of changes was significantly reduced. So in essence, your changes increase the bonus assigned to economy techs and also value the beeline to Industrial Automation significantly more. In the default tech tree the economy bonuses are so much stacked in the Growth part that Gaians always tend to get them first. But if one goes to edit the weights in alphax.txt, it will also significantly skew the blind research results of player factions. Tech_balance should not affect player factions.

Basically the AI factions and players doing blind research always iterate through all available techs, calculate the values by multiplying tech weights with research priorities, and then usually research the highest value tech. It seems there is some random element to that. Tech valuation function is just pretty complex and the result is really far from a simple dot product the weights would imply. The default valuation code stacks so many modifiers on top of that, the values might even change according to the game situation.

One basically needs a debugger to see what kind of actual values the AI factions assign on the techs. I could print out all the tech/faction pair values the AI calculates but the results might change because of those other modifiers that are calculated on top of that. But if you put weights like 5,5,5,5 on a tech you should be able to force the AI always research it when it is available. I think I need to address the fact that Gaians tend to get these techs so much earlier before the other factions in the next release. For example the bonus multiplier that is given on some of the economic techs could be increased significantly.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 30, 2019, 08:02:26 PM
Tech valuation function is just pretty complex and the result is really far from a simple dot product the weights would imply.

Nevertheless at least with my mod's tech tree, in recent development versions of your Thinker mod, it behaves as though a simple dot product is all that's happening.  Believe me, in all those test games I looked really hard to see if you'd pulled something weird with this.  We both know it was a huge issue between us at the beginning of your development.  But now I find nothing, nada, zip.  AI factions learn exactly the techs I expect them to, exactly as they do with the stock binary.

Now why might this be?  Well with rare exceptions, the highest weight I ever give to a tech is "4".  I have many techs that have secondary categories of weight "3".  Using a "2" or "1" is uncommon in my tree.  I have strict categorization rules about what Explore, Discover, Build, and Conquer imply, so many of my weights are "0".  I generally do not put a "1" in something to "help things along", I make hard barriers.  Some parts of my tech tree are also very narrow, like the Discover and Build portions.  The Conquer part of the tree is particularly broad, because Firaxis actually put more combat oriented techs in the tree than anything else.  I don't try to hide that or dole them out in "different" subtrees.  You wanna fight, you have to study Conquer.  I have a lot of "pure" Conquer techs in the tree, with the other categories zeroed out.  That could be suppressing some of the "complex" code tweaks.

Whatever the under-the-hood complexity, my approach to the weightings seems to have simplified it.  It appears to work like a straight dot product. That's all I can actually observe in real games.

For many years I've wondered if things like exploring more land, or using more navy, somehow changed what kinds of techs you'd get.  Like suddenly you're stimulated to get Doctrine: Initiative or something.  But I have no proof of that.  And I've read articles about players looking at AIs for various games, where they attribute all sorts of random noise to "intelligent" AI behavior, where none exists.  Player confirmation bias can work in the positive or the negative for a game developer.  I just refrain from saying "this is what's going on" when I can't actually observe it.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 30, 2019, 08:20:13 PM
Faction_placement works in a way that the bonuses will appear in squares that previously contained supply pods.

That would explain my observations on land.  It would also seem to imply, that factions that don't have supply pods next to them, won't get any help.  And also, that the help will be overwhelmingly nutrients.  Not other things you might want like a minerals resource, an extra Speeder, etc.

Quote
Actually when we will add forests to the mix, it makes also sense from the storyline point of view because forests can be popped from supply pods.

Telling a story requires that you do A, B, and C, in order.  If forests just seem to randomly appear on the map, that's not a story.  Walking up to a supply pod, popping it, having forests go everywhere, and getting a dialog box explaining what just happened, that's a story.  Player did something, it had a consequence, player knows they could possibly do it again in the future.  Just randomly having forests appear on Planet is completely nonsensical, is not storytelling, and does not respect player agency.

This kind of tradeoff is exactly what GNS Theory (https://en.wikipedia.org/wiki/GNS_theory) is about.  What you might think is a perfectly ok thing to do as a Gamist, to drop forests on the map because the minerals are highly desirable for a starting city, is damn irritating to either a Narrativist or a Simulationist.

Please try to remember that there are a lot of Narrativists playing SMAC.  Narrative is the reason that people are still playing and talking about this game 20 years later.  When I post on /r/4Xgaming that GOG is having another $1.49 sale, it gets 93 upvotes.  That's the highest number of upvotes for any discussion subject right now, and it's the highest number of upvotes of the past three months.  That pattern has been generally true in the past as well, for that 13.5k subscriber forum.  SMAC in its own weird way is badass like that, or at least $1.49 SMAC is.
Title: Re: SMACX Thinker Mod
Post by: dino on March 30, 2019, 11:14:24 PM
I think one guaranteed monolith for ai would be the best, forest from the start could spread too fast and eat too many rainy tiles before ai can put farms on them.
If some player wanted to help ai with an early development even more, there is always free former option, it will mix forest with farms.
It also has to be ai only, I can utilise two nutrients on rainy terrain way better than ai, to spam colony pods.

***
Regarding colony pod placement, I've actually red through thinker source and it seems that all necessary functions are already disassembled, below I propose changes to the code that should:
1) Prevent ai form ignoring excellent terrain nearby and build bases in a stright line toward monsoon jungle, with increasingly higher travel distance for colony pods ( screenshot from my previous post ).
2) Prevent ai from ignoring few tiles of excellent terrain when it is surrounded by a lot of fungus.
3) Allow ai to travel colony pod across few tiles of empty terrain, to settle on the other side of arid plateu/west slope/great dunes.

Proposed changes, with comments explaining reasoning behind them:
I didn't compile, or test it, could made syntax errors ( but hope it's ok ), it's jus much easier to present my ideas this way)

Code: [Select]
int base_tile_score(int x1, int y1, int range, int triad) {
    const int priority[][2] = {
        {TERRA_RIVER, 0}, // was 2, river doesn't matter much and few river tiles scew the result
        {TERRA_RIVER_SRC, 0}, // was 2,  river doesn't matter much and few river tiles scew the result
        {TERRA_FUNGUS, 0},
// changed from -2, negative values from few arid/moist fungus tiles shouldn't outweight too easily good terrain with few rainy, or resource tiles
// I deal with the fungus with other changes later
        {TERRA_FARM, 1},  // was 2, reduce impact of terraforming from nearby base
        {TERRA_FOREST, 1}, // was 2, reduce impact of terraforming from nearby base
        {TERRA_MONOLITH, 6}, // was 4, but do not add rainy/rolling bonus later
    };
    MAP* sq = mapsq(x1, y1);
    int score = (!is_ocean(sq) && sq->items & TERRA_RIVER ? 2 : 0); // comparable with energy bonus, wich I'd value much less than nutrient/minerals
    int land = 0;
       
if (sq->landmarks && !(sq->landmarks & (LM_DUNES | LM_SARGASSO | LM_UNITY | LM_RUINS)))  // with my changes monolith provide a lot of weight and fungus doesn't have negative impact, so do not add magnetism to ruins
        score += (sq->landmarks & LM_JUNGLE ? 24 : 12); // one flat bonus for a landmark, 3 : 2 for each tile caused monsoon to outweight excellent land from 20 tiles away and medicore land from 40 tiles away

range *= (triad == TRIAD_LAND ? 3 : 1);
  // could be changed to 2 : 1, to increase search area, if colony pod was capable of refusing to settle on below 13 score terrain until it reach its destination.
// Basically before you build base when 3 tiles away from previous one, check base_tile_score() for current location, if it's less than 13, continue moving toward better destination
        // If it reach destination tile without deploying on the way, build base there.
// with these two adjustments it should be capable of crossing few tiles of arid plateu/east slope/great dunes to reach oasis/landmark on the other side,
// eventually these gaps of terrible terrain would be settled anyway, after all good spots were used

    for (int i=0; i<20; i++) {
        int x2 = wrap(x1 + offset_tbl[i][0]);
        int y2 = y1 + offset_tbl[i][1];
        sq = mapsq(x2, y2);
        if (sq) {
            int items = sq->items;
            score += (tx_bonus_at(x2, y2) ? 6 : 0);
    score -= (tx_bonus_at(x2, y2) == RES_ENERGY ? 4 : 0); // value energy much less

            if (!is_ocean(sq)) {
if (!(items & TERRA_MONOLITH)){
if (sq->level & TILE_RAINY && sq->rocks & TILE_ROLLING) // rainy and rolling is very valuable for a new base
score += (items & TERRA_FUNGUS ? 1 : 4); // fungus has to be removed
else if (sq->level & TILE_RAINY)
score += (items & TERRA_FUNGUS ? 0 : 2); // fungus has to be removed
else if (sq->level & TILE_MOIST && sq->rocks & TILE_ROLLING)
score += (items & TERRA_FUNGUS ? 0 : 2); // fungus has to be removed
}
                                else if ( sq->items & TERRA_FUNGUS ) score -= 2; // Monolith on fungus - ruins most likely, so reduce weight of monolith cluster
            }
if (i < 8) {
if (triad == TRIAD_SEA && !is_ocean(sq)
&& nearby_tiles(x2, y2, LAND_ONLY, 20) >= 20 && ++land < 4)
score += (sq->owner < 1 ? 20 : 5);
if (is_ocean_shelf(sq) && !(items & TERRA_FUNGUS)) //fungus has to be removed
                    score += (triad == TRIAD_SEA ? 3 : 2);
}
            for (const int* p : priority) if (items & p[0]) score += p[1];
        }
    }
    return score - range + random(6) + min(0, pm_safety[x1][y1]);
}

And again get rid of 2 tiles bases spread on jungle. Instead of using extra nutrients, to rapidly settle jungle and surrounding area ai gets clustered bases with too much food and too little production.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 30, 2019, 11:33:30 PM
I think one guaranteed monolith for ai would the be best,
From a human player's standpoint, it's definitely less disruptive to the narrative than a magically appearing forest.  Yes aside from the Ruins, Monoliths don't just appear on the map without a player popping a pod.  But story-wise a Monolith is not something that a player "does".  The player didn't bring a Monolith here, the player simply discovers that it is here.  Whereas, humans bring trees with them. And robot mining equipment.  And robot farmers.  And robot solar collectors.

Quote
If some player wanted to help ai with an early development even more, there is always free former option.

I wonder if it's possible to change the way a Headquarters works, so that it always gets an extra 1-1-1 of resources.  Or even 2-1-2.  Making sure that sure that every faction has at least 1 viable city, might help a lot with starting stability issues.  I think the idea of "your capitol provides more stuff" is pretty common in the 4X genre.
Title: Re: SMACX Thinker Mod
Post by: dino on March 31, 2019, 08:18:54 AM
The forest would appear in place of unity pod, near the place human crashlanded, it's obvious they spilled the seeds, when crshing.
You also complain about gamism in a game where harverstable forest can pop to existence in a year.
Title: Re: SMACX Thinker Mod
Post by: dino on March 31, 2019, 11:23:04 AM
I've realised that with my changes The Ruins would be almost as bad, as Monsoon Jungle previously, so I've added two lines of code to deal with it in my post about improving colony pod deployment.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 31, 2019, 02:21:56 PM
The forest would appear in place of unity pod, near the place human crashlanded, it's obvious they spilled the seeds, when crshing.

You are laboring under delusions of already knowing how the game is played.  There's a point at which I can't impart game design sense to anyone else.  You have forgotten that a human player never sees a supply pod.  They only see the forest near where they land.  The only reason you know about supply pods is because you're deep into the algorithms of how all this works internally.  You aren't trying to see it from the perspective of a player who's never seen this mod, and who may never ask questions about this mod.

Quote
You also complain about gamism in a game where harverstable forest can pop to existence in a year.

So go give tanks Pegasus wings then, because Nothing Really Matters [TM].
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 31, 2019, 03:02:49 PM
This kind of tradeoff is exactly what GNS Theory (https://en.wikipedia.org/wiki/GNS_theory) is about.  What you might think is a perfectly ok thing to do as a Gamist, to drop forests on the map because the minerals are highly desirable for a starting city, is damn irritating to either a Narrativist or a Simulationist.

Some features might result in autistic screeching, yeah. Adding resources on the map is definitely non-vanilla behaviour, so this should be a configuration option as have been earlier suggested. For the most part, this mod is suppposed to keep the vanilla game mechanics. I'm kind of inclined to keep this an AI-only feature by default, since the human player will have those pods to pop anyway. The point is to mostly provide an early game advantage so that the factions don't get bogged down in nutrient-poor starts. That's why a monolith may not be nearly as useful because it doesn't lift the nutrient production cap on a tile.

I think, I've figured out how your colony pod placement works...
It just use the original code, but before it moves you check if there is a base within 2tiles radius, if not and a base can be built, you do it instead of moving.

For the most part it was not supposed to use original movement code, since the new base placement code should replace it. The old code is only a fallback mechanism in case something fails with the search. There is some kind of a flaw in the way movement orders are processed that results in this weird behaviour. Usually it is supposed to go to the nearest usable base site, and not go seek far away landmarks.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 31, 2019, 03:34:46 PM
Looks I have to copy a screenshot from the recent playtesting thread, I just.... have to do it.

Quote
swiss cheese
swiss cheese

The Weather Paradigm driven Datatechs have been going nuts with Boreholes for a long time.

That's some advanced level terraforming right there. Just look at how nicely the pop-maxed bases are placed in rows and so on.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 31, 2019, 03:42:39 PM
I'm kind of inclined to keep this an AI-only feature by default, since the human player will have those pods to pop anyway.

At least the AIs don't care what story they're being told.  The human player will rarely if ever see what goes on at an AI landing site.  They might see what happens with the Cult of Planet, Caretakers, or Usurpers.  Even then, maybe they are always placed in an area of the map that's black / unexplored to the human player?  I can't remember if I've ever actually seen Courage: To Question get founded, for instance.

Quote
That's why a monolith may not be nearly as useful because it doesn't lift the nutrient production cap on a tile.

However the 2-2-2 of a Monolith has a pretty good nutrient to minerals balance for spewing out colony pods at a good clip.  3 nutrients and 1 mineral does not get you the fastest colony pods.  You want to get to size 2 rapidly, then kick up the minerals to knock it down to size 1 again.  Excess nutrients with no minerals to match, actually makes everything take longer, because it'll try to go to size 3.  Most factions will drone riot at 3.  Even if they don't, it's just taking a lot more food to make a colonist, absent any substantial minerals increase.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 31, 2019, 03:53:46 PM
That's some advanced level terraforming right there. Just look at how nicely the pop-maxed bases are placed in rows and so on.

It's also longstanding terraforming.  They got the Weather Paradigm pretty early on.  They've been the powerhouse of the game and were giving me lots of free troops when I was invading the Believers.

And would you believe that by delaying the availability of such terraforming techs to everyone else, and doubling their completion time, and making Supply Crawlers cost 50 minerals with a Fusion reactor, I'm not technically out of the game yet?  And I've not built a single Condenser or Borehole, nor do I convoy anything with Supply Crawlers except 1 that was left over from something.

You just made me think about Supply Crawler costs again.  In the screenshot, none are visible, but Reveal Map may not show units.  I'll check whether any were produced.  I'm playing this game so I'm not going to cheat to stare at it.  We are allied, so I could get a unit up there eventually to look around, but I've got other game pressures.  Even if we weren't, I could eventually launch a Conventional Missile and use it as a scout, since in my mod they don't use fuel and stay aloft indefinitely.

Roze's quantum supply crawlers
Roze's quantum supply crawlers
even quantum crawlers cost roughly 50 minerals
even quantum crawlers cost roughly 50 minerals

Long story short, I have +1 INDUSTRY and am paying 45 minerals for a Quantum Supply Crawler.  Roze effectively has +4 INDUSTRY and should be paying 30 minerals.  She has only built 4 recently.  I don't know if she built more before.  Does your latest development version use supply crawlers to rush Secret Projects?
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 31, 2019, 08:14:41 PM
Thinker does not use supply crawlers or energy reserves to rush secret projects in any situation. It maybe occasionally uses artifacts to rush projects, but I'm not sure actually. It might also just attempt to connect them to the network nodes. Artifacts are handled by the default movement code. I've been thinking about implementing project rushing but it might result in run away AIs accelerating even faster, and maybe it is also annoying for the players to see the projects snatched away with little warning. It regularly completes projects with the overflow minerals though.

Regarding colony pod placement, I've actually red through thinker source and it seems that all necessary functions are already disassembled, below I propose changes to the code that should:
...
And again get rid of 2 tiles bases spread on jungle. Instead of using extra nutrients, to rapidly settle jungle and surrounding area ai gets clustered bases with too much food and too little production.

Jungle bases are packed densely because by the middle game they will max out the population cap so quickly with all the extra food. Also formers will not attempt to build boreholes on jungle tiles because it would waste the food bonus. Probably this is not even a big issue, but the initial placement could maybe follow 3 tile spread and later (after more bases are built) it could fill the gaps using the 2 tile spread. I have not evaluated the code in that post in detail because there's been some other issues to look at too.
Title: Re: SMACX Thinker Mod
Post by: bvanevery on March 31, 2019, 09:20:19 PM
It might also just attempt to connect them to the network nodes.

I saw the AI do that in an AI vs. AI test game.  I was surprised.  None of the AIs are consistent about it either, because I can readily see the AIs hoarding Artifacts even late game.  Sometimes I'm able to take them when I conquer a city.  Other times they just get destroyed.

Quote
I've been thinking about implementing project rushing but it might result in run away AIs accelerating even faster,

It's a certainty.

Quote
and maybe it is also annoying for the players to see the projects snatched away with little warning.

It is.  I already see that in mid to late game.  Secret Projects are born and die like mayflies, and I usually can't do anything about it.  I'm too busy trying to catch up on the most basic production, in the face of all the AI production spam.

I hope some day you accept that your AI has become competent enough, that the buffs given to the stock "stupid" AI, need to go away forever.  It's not an interesting game to be summarily clobbered by an AI endgame when I've only just gotten an empire together.  My current test game, is the last time I'm going to  play on Transcend with cost_factor=7.

It remains to be seen if even cost_factor=10, same as the player, is enough.  The AI still has the eco-damage abuse advantage, and there just might be that much potential in Condensers and Boreholes, even with all the delays I've implemented in 1.29 of my mod.  There's a point at which I can't make it any more painful for players who are only playing the stock game, and don't even know what Thinker mod is.

I could see raising the Weather Paradigm from 400 to 600 minerals, but I can't see moving it later than B3 Ecological Engineering, which is already much later than the stock game.  Half the point of the Weather Paradigm is giving you early access to all the nifty terraforming gewgaws.  600 minerals would make it a "double cost" Secret Project, as all my other early ones cost 300.  Aside from the Ascent to Transcendence, 600 minerals is the highest expense level I have in the game.  It's for the latest game techs, like the Cloning Vats, which I deliberately stuck near the end of the tech tree.

Now I could increase the cost of many Secret Projects, totally recalibrating them to have a much steeper progression, as I've otherwise done with weapons, armor, and chasses.  IIRC correctly Fission Armor went somewhat down this road, and Mart did it in his work as well, although he didn't change when you got the techs.

But if it's only Thinker mod that is breaking the enjoyability of the experience for the usual player, I question whether it's worth going down that design road.  Seems like it would be more rational not to recommend Thinker mod to anybody.  At least, not without huge caveats about what kind of game a particular kind of player is expecting.  People make highly qualified appraisals of 4X TBS games on /r/4Xgaming all the time, and they aren't shy or kind about it.  There's definitely a class of player represented, where right now I'd honestly have to say the experience of Thinker mod sucks rocks.  It's an interesting piece of technology that demonstrates the production potentials of the game, but it's just there to abuse you and make you lose.

The kind of player who wants Thinker mod as it currently stands, is the player who wants "monster" challenges.  I'm not into it, and I never needed an AI for that anyways.  I could have just cranked various resource abuse settings up to Eleven.

I don't like GNU Chess either.  I've never been able to do a darned thing against it, and I'm not that interested in flailing myself with Chess book strategies to figure out why it's beating me.  That's saying a lot because I have played a fair amount of computer Chess, am reasonably competent at it, and have beaten other AIs of lesser abilities from the early 90s.
Title: Re: SMACX Thinker Mod
Post by: dino on March 31, 2019, 09:33:31 PM
Initial 2sq spread hurts early, for benefits later, so I thought getting rid of it completely requires no work and is a slight improvement overall imo.

>Probably this is not even a big issue, but the initial placement could maybe follow 3 tile spread and later (after more bases are built) it could fill the gaps using the 2 tile spread.

That would optimal, but I thought a bit much work just for monsoon.

> I've been thinking about implementing project rushing but it might result in run away AIs accelerating even faster, and maybe it is also annoying for the players to see the projects snatched away with little warning.

Or, eventuall thinker will reach a point at witch you can play on lower difficulty, or less cost_factor cheat and it still will be competitive.
At wich point it will become even more enjoyable and you'll be able to win a race for a SP despite such features, if you sacrifice enough for it.
You can also make an ini switch for it and disable by default, if you are concerned that some gamers would not enjoy that.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 31, 2019, 10:12:34 PM
> Seems like it would be more rational not to recommend Thinker mod to anybody.  At least, not without huge caveats about what kind of game a particular kind of player is expecting.

Recommend it or don't, it's not really my problem. But if people do mention it, one could link to the earlier screenshot with the Data Angels terraforming efforts. Then the players will know what they're signing up to, at least on the highest difficulty. :D
Title: Re: SMACX Thinker Mod
Post by: Induktio on April 01, 2019, 07:17:06 PM
When one thinks about the game design, the main problem in SMAC balancing might be the lack of any effective mechanic to stop one faction from running away with the game. For example Civ 3 introduced an important change and made corruption affect the mineral production too. In SMAC, basically only the bureaucracy drone mechanic attempts to limit expansion, but the limit scales with the map size and efficiency, so the empires can grow pretty huge. Some factions can get really high efficiency bonuses too. Late-game features produce so much psych that even the drones can be taken out of the picture really easily.

Another compounding factor is that the tech costs scale only linearly (probably) while the production keeps increasing exponentially. Might be something to think about although stuff like that is pretty much out of the scope for the next release. I'm pretty much doing only bug fixes/some tweaks instead of new features now. At least one of the changes could be to remove Trance ability from the design_units created prototypes. Probe teams are already overpowered enough so no need to stack it further. I think the unit planner should only attempt to add Algorithmic ability on probes, but they can still keep the armor they were using.
Title: Re: SMACX Thinker Mod
Post by: dino on April 01, 2019, 08:25:17 PM
I think it's a problem mostly on big maps, on standard map factions will fill the land around 2200, end exponential growth ends there.

I think tech cost grows exponentially, but exponent is much smaller then exponential growth of competent player, or thinker.
I'm not sure, but I vaguely remember Ytzii posting tech cost formula somewhere, it was pretty complex. I think it wasmore  linear at the beginning and turned more exponential later.
I also remember year having an impact on the cost, the earlier year the higher cost. Thinker could definitely use rebalance of variables in tech cost formula.
Title: Re: SMACX Thinker Mod
Post by: Induktio on April 05, 2019, 03:45:16 PM
Looks like I've found a solution for the colony pod pathing issue. It seems the original movement logic was still somehow interfering with Thinker's commands but it should be dealt with now. The fix should basically eliminate early AI settlement issues but it might still take a little more testing. It really does seem to have a significant effect on the early game. Anyway, the state of the code is looking pretty good now.
Title: Re: SMACX Thinker Mod
Post by: Induktio on April 07, 2019, 12:15:40 PM
Thinker mod version 0.9 is now available from the project homepage (https://github.com/induktio/thinker).

A lot of effort and testing went into this version and the changelog reflects it too. Changes are listed relative to version 0.8 obviously.

* Thinker now supports formers based on all triads: design_units will also create gravship formers when the techs are available
* AI formers build less roads and other smaller tweaks to former priorities
* AI sometimes nerve staples bases after UN charter has been repealed
* Military unit production priority is notably increased from previous amounts
* Whenever AI loses bases to conquest, this also triggers an extra priority to devote more resources to building new units
* Tech balance prioritizes more early economic techs to ensure important items are not skipped
* Rebalancing of social_ai logic to match faction priorities more closely
* Alphax.txt included in releases to provide optional changes
* Trance ability removed from design_units created probe teams
* Major adjustments to faction placement to improve starting locations
* Possibility to select custom factions in smac_only mod
* Added command line parameter "-smac" to start smac_only mod
* New option: nutrient_bonus for use with faction placement
* New option: hurry_items allows AI to use energy reserves to hurry production (excluding secret projects)
* New option: cost_factor allows one to change AI production bonuses
* New option: max_satellites specifies how many of them AI will build normally
* Fix spawning issues on Map of Planet
* Fix sea bases sometimes not building enough transports
* Fix colony pods freezing in place or being unable to reach their destinations
* Fix stuff being built on volcanoes
* Fix smac_only showing the expansion opening movie
* Fix custom prototypes having incomplete names
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 18, 2019, 10:51:09 AM
Not much has been happening since the last release. There has been some requests in that the smac-in-smacx mod could be bundled with the release for easier installation. Maybe even dino requested it earlier in this thread, and it's also a good idea to include the other fixes in the smac-in-smacx alphax.txt. It's only going to require minor documentation changes anyway.

As far as the code base goes, I don't see it needing any major changes since v0.9 unless somebody reports something unusual. I'm not sure how much I'll be developing new features from scratch anymore but some bugfixes (if any) could be included. Long term I'm kind of wondering how this mod could be included with OpenSMACX. It would basically require OpenSMACX to provide a patched exe which keeps many offsets at their original values so it wouldn't break Thinker's patching method. It might still require some code rewriting but I haven't looked at it in detail. I would like to see OpenSMACX repo to include a clear build script to replicate the exe patching part, but I'm not sure what other plans Scient has here.
Title: Re: SMACX Thinker Mod
Post by: dino on May 20, 2019, 09:19:50 PM
Inspired by this project, I've returned to learning C++ and will try to implement few ideas I have, sometime next month.
If you are going to put this project on hold, or abandon it, it would be great if you could make your hooks to the exe Scient's way before you let it go.
So even unexperienced coders could continue to develop it and hopefully be able to port thinker to new opensmax releases without touching the exe.

I'm not even sure, if what I wrote makes any sense, I just want as much source code as possible to play with ;) while assembler and RE in IDA is out of my league.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 23, 2019, 07:40:06 PM
Inspired by this project, I've returned to learning C++ and will try to implement few ideas I have, sometime next month.
If you are going to put this project on hold, or abandon it, it would be great if you could make your hooks to the exe Scient's way before you let it go.
So even unexperienced coders could continue to develop it and hopefully be able to port thinker to new opensmax releases without touching the exe.

It's good to have others looking at modding as well, but as a word of caution it's not very simple to go on patching binaries without source code. That's why very early on I decided the project must be done in C++ for it to be maintainable except for some bugfixes that were done earlier. The code is still heavily coupled to the way game binary operates. Otherwise it's pretty standard style C code with the more complex C++ features used only sparingly (no heavy templating used here etc).

Now it's possible to override many parts of the game logic without having a deep knowledge of assembly, but if you need to go anywhere beyond the stuff Thinker currently does, then reversing game code with IDA is most certainly needed. There's no formal API when it comes to binary patching so it's hard to say at this point how easily this stuff could be ported to OpenSMACX without significant rewriting efforts. I don't consider this project abandoned or anywhere close to it, but sometimes one just has to do other stuff in the meantime.
Title: Re: SMACX Thinker Mod
Post by: dino on May 23, 2019, 08:46:45 PM
Good to hear you are going to return to this project at some point in the future.
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on May 24, 2019, 03:54:44 PM
I don't consider this project abandoned or anywhere close to it
Ooh, a great weight off my mind. You are a real knight of progress, good sir!
Title: Re: SMACX Thinker Mod
Post by: Liebestod on June 16, 2019, 02:54:40 AM
I made an account here just to comment on this mod.

Especially because there seems to be some negative feedback, I want to express my opinion. This mod is awesome! The AI is so much better!

My game was a normal world size on Thinker level. 70% land and average everything. I played a "balanced" Consciousness (no techsteal, -2 growth instead of -1, +1 research instead of +2).
Using Thinker mod and PRACX mods together. No crashes experienced and secret project videos play.
Usually I crush the ai and their empires are quite sad. Pleasantly, the AI produced empires that had MORE bases than me and even MORE pop than me, EVEN AFTER I POP BOOMED!
The Drones found the monsoon jungle and as of 2200 they STILL have more pop than I do. Zak was able to stay ahead of me in tech much longer than usual.

Of course it wasn't perfect competition. I was able to get Airpower/MMI before the AI and they can't really stop me now. Morgan never really got off the ground, and Yang is lagging far behind even though he has sizable territory (small pop in bases - never boomed).  The AI also isn't ruthless at acquiring secret projects so it's totally possible to get all the ones you want. I understand there's a pro and con there so it's not really a negative. But it does contribute greatly to my advantage that I can get all the good early secret projects.

I didn't find the AI too hard to beat but it's way better than default and thus for me the "fun" level is much higher. Thank you!
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 16, 2019, 11:35:32 PM
Especially because there seems to be some negative feedback, I want to express my opinion. This mod is awesome! The AI is so much better!
Well yeah, I think we can call mission accomplished on that one. Though it can be seen that most of the criticism comes from one source, so there's that. Beyond a certain point one just can't be bothered anymore.

Quote
My game was a normal world size on Thinker level. 70% land and average everything. I played a "balanced" Consciousness (no techsteal, -2 growth instead of -1, +1 research instead of +2).
Using Thinker mod and PRACX mods together. No crashes experienced and secret project videos play.
Usually I crush the ai and their empires are quite sad. Pleasantly, the AI produced empires that had MORE bases than me and even MORE pop than me, EVEN AFTER I POP BOOMED!
I assume you were using the new worldbuilder settings then. Do you think they made a significant impact on the gameplay overall? The AI is pretty adept now at economy building, so it can be much harder to acquire governorship and so forth. During development the economy building was the main focus in AI improvement, since I figured it was the obstacle that would have crippled AI challenge unless fixed somehow.

Quote
Of course it wasn't perfect competition. I was able to get Airpower/MMI before the AI and they can't really stop me now. Morgan never really got off the ground, and Yang is lagging far behind even though he has sizable territory (small pop in bases - never boomed).  The AI also isn't ruthless at acquiring secret projects so it's totally possible to get all the ones you want. I understand there's a pro and con there so it's not really a negative. But it does contribute greatly to my advantage that I can get all the good early secret projects.
On standard map sizes and below, almost always some faction seems to stagnate because of a lack of space, but probably it isn't a big issue if most of the time the factions develop pretty fast. I would call it an issue if it happened on huge maps instead.

What kind of early projects do you consider "good"? I would think it would be pretty hard to get all of the early good ones, since the player shouldn't be able to easily gain a significant advantage over the AIs early-to-mid game. Sure, it was a design choice not to have the AIs rush secret project production and I'll probably keep it that way. It might have a significant gameplay impact if it were changed from the vanilla behaviour.
Title: Re: SMACX Thinker Mod
Post by: Liebestod on June 17, 2019, 06:56:38 AM
I believe I was using the "new worldbuilder settings". Because the world looks like two giant continents rather than continents and islands of random sizes.

And okay I will try my next game on Large map.

I like the WP, Genome, Virtual World and Empath Guild. Was able to get all of them in my particular game. I don't prioritize Command Nexus, Citizens Defense Force, Planetary Transit System or Planetary Datalinks. (I think Transit System makes more sense for HUGE maps, not normal size). I also don't really start building any wonders until I have 10+ bases, supply crawlers to get 10-16 mineral production at most bases, and a few Rec Commons. So in other words I'm not rushing to get the wonders.

As for planetary council votes, I was able to get the governorship but only because things went my way. Someone voted for me instead of Domai, and then again someone chose me over Lal. I think being second on the power rankings for so long helped.

Title: Re: SMACX Thinker Mod
Post by: Induktio on June 18, 2019, 10:24:55 PM
By default the mod contains my Worldbuilder improvements in alphax.txt, so it looks like you were using them. With the original map generator archipelagos were pretty annoying from an unit movement point of view, and they also gimped the AI since it didn't understand how to populate islands. Though now it *does* understand how to do land/sea transitions, but it doesn't hurt to have more contiguous landmasses. I've had a kind of interest in procedural content generation algorithms, so tweaking this stuff was something I've done very early in modding this game.

If you come across some interesting gameplay moments, you could post some screenshots/reports of them too. Especially Thinker's endgame ICS builder empires are truly a sight to behold. Yeah, it's a little bit different than with the vanilla AI.
Title: Re: SMACX Thinker Mod
Post by: Rocky on June 22, 2019, 02:28:03 PM
I just want to say I'm really enjoying your AI. I used to only play AC with the Kyrub AI, and couldn't play SMACX anymore because of its vanilla AI. But thanks to your AI I can play the expansion now as well.

I like the different flavor in playstyle and terraforming. I really have step up my game not to get outpaced by the other factions. I can also notice the differences in build orders in comparison with the vanilla AI; they are more efficient and make more sense.

There are two things I noticed but you're likely already aware of.

1. There have been a few times some AI bases got stuck in a drone riot. I especially noticed it with Zakharov. The base still has food but it doesn't assign specialists to counter the drones. This can go on for a few turns with the base doing nothing. Then suddenly specialists do get assigned and the base continues operating. I'm not sure if this is related to your AI or was already in the vanilla AI.

2. The AI doesn't really take advantage of its industrial output to pursue Secret Projects. It happened a few times I was behind in the race for Secret Projects but still was able to catch up because the AI delayed building theirs.

Example: I needed a few more turns to get Pre-Sentient Algorithms. The Consciousness and the Gaians already had this tech but hadn't begun working on the Project (Hunter-Seeker Algorithm) yet. I immediately start building it when I got the tech. After a few turns the Consciousness begins building the Project and the Gaians follow soon after.

I was able to get the Project one turn before the Cyborgs. If the AI had initiated it earlier I would have had no chance getting it. I noticed this with other Projects as well but in this case it was especially noticeable.

Awesome work! I love how I can play both SMAC and SMACX now.
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 23, 2019, 01:37:08 PM
Hello there, nice to have more players.

> 1. There have been a few times some AI bases got stuck in a drone riot. I especially noticed it with Zakharov.

Yeah, it's somewhat of a known problem. There has been a couple of workarounds for this issue but the main problem is related to the way default governors assign specialists/doctors. Sometimes when the bases grow large enough, this problem starts to manifest when the base would have to keep many doctors to avoid rioting. Usually after a riot the governor allocates doctors, but after that it forgets about the issue and reallocates all the workers, causing a drone riot loop.

Unless we give AIs more bonuses (like free talents) it seems to me the only way to fix this would be to rewrite the worker allocation routine. No idea if it's going to be included in the next version, but should probably look into it more.

> 2. The AI doesn't really take advantage of its industrial output to pursue Secret Projects.

Not sure what you mean by that. Are you saying AI should rush secret projects or prioritize it more in the build queue? But if you got the project only one turn before the AIs, at least they put some effort into it? Here's a summary how the project queue works:

Each turn all the bases are ranked by the mineral output and SPs are only started in the top third output bases. Number of project building bases is always limited to three (to cut down the popup spam). Initially the AIs start building only SPs that match their research interests, but if they have overflow minerals they are allowed to start any available secret project. One of the main choices in the build queue is whether to build infrastructure or military, but if it opts for the peaceful option, SPs are really high in the build order, provided that the base meets the mineral output requirement and some SPs are available for building.
Title: Re: SMACX Thinker Mod
Post by: Rocky on June 23, 2019, 03:11:07 PM
Hello there, nice to have more players.


> 2. The AI doesn't really take advantage of its industrial output to pursue Secret Projects.

Not sure what you mean by that. Are you saying AI should rush secret projects or prioritize it more in the build queue? But if you got the project only one turn before the AIs, at least they put some effort into it? Here's a summary how the project queue works:


Thank you for the explanation. I appreciate it.

Sorry, I should have been more clear. I meant that the Gaians and the Cyborgs already had the tech to build the Hunter-Seeker Algorithm while I was still researching it, but they didn't start building it until later.

Example:  (I don't know the exact year)

2255: Two AI's obtain Pre-Sentient Algorithms. I'm still researching it.
2260: I complete Pre-Sentient Algorithms and start building Hunter-Seeking Algorithm.
2263: Both AI's start building HSA.

This is not meant as criticism. It was just noticeable because I'm used to the vanilla AI aggressively going after this project as soon as they research the technology.

Title: Re: SMACX Thinker Mod
Post by: Induktio on June 23, 2019, 09:42:39 PM
> I meant that the Gaians and the Cyborgs already had the tech to build the Hunter-Seeker Algorithm while I was still researching it, but they didn't start building it until later.

At least Cyborgs should go after the HSA since they have ai-tech focus, but the project might be delayed for example if military considerations override the build priorities. That usually means enemy bases are close or similar. Can't say for sure anything else without a save game to inspect.

> It was just noticeable because I'm used to the vanilla AI aggressively going after this project as soon as they research the technology.

The new build queue does not have any project specific special priorities. The project is just chosen by comparing the research priorities and ai-fight values. I think it's somewhat similar than what the vanilla AI did, but I never fully reversed the old process since the code was quite messy. It's possible the old AI had some project specific priorities though. Did you notice any other significant differences with old priorities then?
Title: Re: SMACX Thinker Mod
Post by: Rocky on June 23, 2019, 11:08:07 PM
I'm sorry, I don't have the save anymore. I was mostly going by memory. I've been making multiple copies of SMAC/SMACX so I can keep them separate with different AI's/mods, and I deleted the Thinker version by accident.  (I've re-installed a new copy with the Thinker AI)

However, I can tell you that my previous games were all on smaller maps (One map size below the Standard map) The factions expanded fast and hostilities often started early on. Now that you mention it, the Cyborgs had Hive seabases near their territory and the Gaians had the Believers pretty close by. So that could have been why the Secret Projects were delayed.

I've started a new game on a large map earlier today and I can honestly say I'm already noticing a difference. The AI started building Secret Projects not only earlier in comparison with the previous games, they're also competing over it.

The Spartans are hostile to me and are overwhelming the University. (despite Zakharov being in the lead with tech) The Gaians were the first to build the Weather Paradigm and their powergraph is skyrocketing. This is going to be an interesting game.

If I notice anything during this game I'll post here.
Title: Re: SMACX Thinker Mod
Post by: Rocky on July 02, 2019, 11:25:32 PM
I've been playing with your Thinker AI and I must say I'm really enjoying it. The factions expand on all available land quickly and they're able to field impressive early game armies that cannot be underestimated. I like how the AI is also adding Probe Teams to their attack forces and uses them relentlessly.

The AI is much more responsive to military threats. It also responds well to alien creatures, in contrast to the vanilla AI which would just stagnate because of one Spore Launcher getting in the way.

The only thing I noticed is that the AI does encourage excessive eco-damage with their Boreholes/Condensors. In the games I played eco-damage triggered rising sea levels around 2250-2280 and despite efforts most of the available land became submerged around 2300. I realize it's part of the game but it adds a lot of micro-management and at some point it becomes unmanageable, taking away some of the fun.

Other than that, I'm enjoying it.  Awesome work!

 

Title: Re: SMACX Thinker Mod
Post by: Induktio on July 03, 2019, 08:27:28 PM
Hmm yeah, nice to hear. Just before v0.9 I actually did a major fix on the colony pod pathfinding, previously the AIs had some issues where they often weren't able to reach their destinations. Now that the pods should move without issues, it's going to be visible in their growth rates too. It might increase the perceived difficulty.

The funny thing with probe teams is that now they also understand how to use them in defensive purposes, not just offensive. Usually after fusion reactors the prototype planner designes upgraded probe teams with armor, so they work pretty well as defenders too.

About that eco damage problem, I'm wondering whether you're playing on the default global warming setting or my recommended config. At the default settings the sea level rise is almost guaranteed to occur by the mid game, ensuring lots of micromanagement that does not add much to the game. Even for AIs, the eco damage gets really excessive. If you want the effects reduced, this line should be in alphax.txt. You cannot undo already occurred effects if you change it mid-game though. But this modified setting should push the effects to "late game" phase instead of "mid game".

Code: [Select]
1, 2 ; Numerator/Denominator for frequency of global warming (1,2 would be "half" normal warming).
Title: Re: SMACX Thinker Mod
Post by: Rocky on July 03, 2019, 08:57:33 PM
Thanks for the reply. I appreciate it.

I have multiple versions of Alien Crossfire with and without mods. I don't think I have installed your recommended config though, which would explain the higher eco-damage. I'll do a fresh install with the recommended config.

Looking forward to start a new game.

Title: Re: SMACX Thinker Mod
Post by: Rocky on July 04, 2019, 09:15:46 AM
Just wanted to let you know that after a fresh install, everything works perfectly now.

Thanks!
Title: Re: SMACX Thinker Mod
Post by: Induktio on July 13, 2019, 10:16:10 PM
A new develop build 20190713 is now available from downloads. (https://github.com/induktio/thinker) This update mostly streamlines the smac-in-smacx mod support.

Smac-in-smacx is now included in the default distribution. Due to some oversight, labels.txt was earlier included with the mod but it was not necessary as it contained no changes compared to the SMACX version. It was removed from ac_mod folder in this update. I also added some information about the custom faction support. They work in both game modes with this mod, unless some other non-Thinker mod interferes with that.

A new config option fast_project_start tells the Thinker AI whether it is allowed to start secret projects for which the human player doesn't have the techs. This was mostly added because in the original game on lower difficulties, the AI waited until the human had the tech requirements.
Title: Re: SMACX Thinker Mod
Post by: Jade Panther on July 16, 2019, 03:51:32 AM
Hi Induktio,
By coincidence, I played my first game using your 0.9 rules over the weekend. I think it's fair to say that difficulty 4 is now harder than difficulty 6 used to be! Awesome job  :D.

So now I'm going make some arguments for changes, but please keep in mind that I'm nitpicking.


First, I found an unusual situation which your social engineering AI doesn't take into account.

I'm playing the Gaians, and I'm fighting Morgan. [All is right in the world  ;)]  He has a small, compact nest of tightly packed bases, and he's running Police State-Free Market-Wealth, which gives him -2 EFFIC, which is a good choice for that tight nest of bases.

Then I take his capital. Both his energy income and his research instantly fall to 0, and stay there even after he signs a Pact of Submission and is at peace for some turns. What happened?

If you look at the rules for Inefficiency, they say:
Quote
The formula used to compute the energy lost by a base to inefficiency is:
Inefficiency = (Energy × Distance ÷ (64 - (4 - Efficiency) × 8 ))
Where:
Energy   = amount of energy produced by base this turn
Distance   = distance from Headquarters base (16 if no HQ)
Efficiency   = social engineering efficiency (+2 if Children’s Crèche)
If denominator reaches zero, all energy is lost to inefficiency.
Source: http://alphacentauri2.info/wiki/Inefficiency_(Advanced) (http://alphacentauri2.info/wiki/Inefficiency_(Advanced)) but the F1 Help in-game says the same thing.

Let's plug the numbers in for social engineering efficiency of -2 and 16 distance since there is no HQ:
Inefficiency = Energy x 16 / (64 - (4 - -2) x 8 )
  = Energy x 16 / (64 - (4+2) x 8 )
  = Energy x 16 / (64 - 48 )
  = Energy x 16 / 16

Oops.

Energy and research from things like specialists and biology labs would be immune, and creches would matter too, but this is early midgame and Morgan's surviving bases have none of these things.

Suggestions:
Title: Re: SMACX Thinker Mod
Post by: Jade Panther on July 16, 2019, 06:39:43 AM
In my playthrough I noticed that Santiago was running Knowledge values. I am going to make a case that this is a change to game rules, not just an AI change.

Before we go further, I'd like to establish that running Knowledge in that situation was absolutely how a competant human player in that situation would have run player-controlled Spartans. The Spartans hadn't researched the prerequisite tech for Power values yet, and even if they had they weren't actively at war and the bonuses from Knowledge clearly served them better. I'm not claiming that your algorithm is evaluating the choices poorly. I think it's evaluating them well. I'm arguing that the game rules prohibit AI-controlled Spartans from running Knowledge, the same way that they prohibit both human-controlled and AI-controlled Spartans from running Wealth.

To set the stage, let me repeat something from page 15 of this thread:

I notice the guide also states that "The Social Priority line specifies the social choice a faction will oppose and be unable to select in social. This has no effect for a human using the faction." This seems incorrect, it should refer to "Social Opposition line" and the opposition category value should also affect human factions equally.

IMO the guide is correct. Let me quote the relevant section in full, and then I will explain my understanding of it.

Quote
Social Priority
The Social Priority line specifies the social choice a faction will support (be more friendly towards factions that use it, less towards factions that use other models), and the social effect the AI will prefer to increase. This only affects AI playing a faction, not humans using the faction. It takes the form Social Category, Social Model, Social Effect. Example:
...
Social Opposition
The Social Opposition line specifies the social choice a faction will oppose and be unable to select in social. This also affects human factions. It takes the form Social Category, Social Model, nil.

The Social Opposition is straightforward, as we've all experienced that you can't run the SE choice your faction hates.

The social priority (Agenda) for the Spartans is Power. In my experience, "social effect the AI will prefer to increase" means that the AI will choose between its Agenda and the default option for that SE group, not even considering other options in that SE category. For example AI Lal chooses between Democratic and Frontier, ignoring the existance of Police State and Fundamentalist. Thus I've only ever seen AI Lal running Democratic, even though player-controlled Peacekeepers can also run Fundamentalist (which is what I think "This only affects AI playing a faction, not humans using the faction." means). Similarly, I've only seen AI Miriam running Fundamentalist, even though player-controlled Believers can also run Democratic and Police State. Etc.

I've collected a database of about 150 censuses of factions from multiple game years over several games, and in my previous experience the AI's behaviour has always followed this rule, so I noticed immediately when the rule wasn't followed in your mod. (At first it confused me. I thought "if Santiago is running Knowledge, I can run Knowledge without irritating her." After thinking about it more, I decided not to test this hypothesis!)

To test this as much as I could, I took an autosave from my game under your executable, a turn when I had both that turn and the next turn as autosaves. Santiago was running Knowledge in that autosave, and she was still running Knowledge in the next turn under your executable. If, when I had run that turn under the vanilla executable, Santiago had continued running Knowledge, it would have shown that my understanding of the rules for AI SE choices was incorrect. But, when I pressed "End Turn" instead of playing my turn, after the computer had played the AI turns Santiago had switched to Survival values, consistent with my understanding of the rules for AI's. Unfortunately, it's also consistent with the hypothesis "the vanilla AI is stupid", which is also without a doubt a viable hypothesis.

I could provide the saves, but given that they're consistent with two different hypotheses, I don't know how much use they really are.

Since probably some players prefer the AI playing like a human as much as possible, while others prefer it to play as it does in the original game, I think it would be reasonable to make this a configurable option.
Title: Re: SMACX Thinker Mod
Post by: Induktio on July 16, 2019, 08:04:11 PM
Hmm, let's see what we have here...

> If a faction doesn't have a HQ, it should value EFFIC from SE choices significantly more highly than a small faction with a HQ does.

Not sure if that's going to have much effect, it would be better to just have the new HQ built.

> If a faction without a HQ is at peace, one of its highest priorities should be building a new HQ. (Edit: perhaps factions without HQ's should treat HQ's like Secret Projects they can build.)

Thinker AIs should rebuild their HQs almost always. It may not happen immediately if there's some stuff interfering but it should be done eventually. Did you check if Morgan rebuilt their HQ sometime later? This one might actually need some more priority because it's really important it's rebuilt quickly.

> IMO the guide is correct. Let me quote the relevant section in full, and then I will explain my understanding of it.

I edited out a slightly incorrect phrasing from that guide long time ago. But now that I look at again, there's also another inaccuracy "The Social Priority line specifies [...] and the social effect the AI will prefer to increase."

Scient has also tried to decipher how social effect priorities work, and I think we came to the conclusion that the AI just ignores social priority effects (e.g. industry). When the parser reads alphax.txt this value in question is not parsed properly, so the vanilla social AI just assumes the value is undefined. Also Thinker doesn't try to reparse the files so the value is ignored in the mod too.

> The Social Opposition is straightforward, as we've all experienced that you can't run the SE choice your faction hates.

Yeah, I like to make the distinction here between "hard" and "soft" limits. Both the AIs and humans are not allowed to take social opposition model, so it's kind of a hard rule. Humans can make choices differing from social priority models but the vanilla AI most often tends not to. You might compare it to the fact vanilla AIs never rushed production until it was implemented in this mod (also a config option). Thinker AIs are biased to select the social priority model, but by design, sometimes other priorities can override it if the other choices provide vastly better benefits.

> Since probably some players prefer the AI playing like a human as much as possible, while others prefer it to play as it does in the original game, I think it would be reasonable to make this a configurable option.

Ehm, but it *is* a config option, and should not be even hidden in any weird place. If you set social_ai=0 in thinker.ini you should see exactly same social engineering choices than what the vanilla AI does, unless there's some indirect effect somewhere, which I'd doubt.

Title: Re: SMACX Thinker Mod
Post by: Jade Panther on July 20, 2019, 03:42:07 AM
I played my game (Librarian, large world, low erosion, 30-50% land) to 2261, at which point I won a diplomatic victory and did a post-mortem. I also downloaded k3v's game from post #96 for comparison.

Morgan lost his HQ, in my game, in 2219, and hadn't started rebuilding one by 2261. In k3v's game, both the Gaians and the Caretakers lost their HQ's and rebuilt them. So it's not that the function for the AI to rebuild its HQ doesn't exist, but that it specifically didn't work for the Morgans in my game. Possibly the issue was that it was Morgan: none of his bases were larger than 4 pop, and none of them had much in the way of infrastructure (why build recycling tanks when you can build another supply crawler?), so any code that started by saying "if the faction has no HQ and this is a decently developed base, consider building a HQ" would ignore all of Morgan's bases.

It took the Caretakers about 10 years to rebuild their HQ after the meteor took it out, half that for a base to decide to build HQ and half for the HQ to actually be built. I didn't check for his Gaians. So I still think that your SE AI should take into account whether the AI has a HQ or not.  It's not realistic to expect the AI to promptly rebuild lost HQ's unless you write code specifically for that purpose.

A second issue in my game was that the Believers and the Hive never ran "Planned" and never built Probe Teams. I eventually figured out that this was because both of them skipped researching "Planetary Networks" (as of 2261). Looking at k3v's save, I see that his AI Usurpers never researched Planetary Networks either.  I suspect that this trend is a side effect of your tech_balance code.

I suggest adding this tech that gives probe teams and the Planned SE choice as well as being a prereq for the tech for crawlers (and some minor obscure SP) to the list of techs your tech_balance code prioritizes.

The third issue was that practically none of the AI's in my game developed bases large enough to need hab complexes. Yang had built one hab complex by 2250, and Morgan had built one by 2261. Looking at k3v's game, it's not a general problem of the mod - the prosperous AI's in his game built plenty of hab complexes. Upon review, I think it's because I chose the "low erosion" and mostly land settings when I started the game. That meant there were a lot more rocky tiles than under other erosion settings and most bases did not have access to water tiles to compensate. Your AI's space their bases closely together, so if they have a lot of rocky tiles close together it's easy for them to have access to only 7 productive tiles in their radius (after you take into account that neighbouring bases want those tiles too).

You may want to consider teaching your terraformers to break up rocky terrain (the "level" terraforming command) when appropriate.
Title: Re: SMACX Thinker Mod
Post by: Induktio on July 20, 2019, 01:54:28 PM
> I played my game (Librarian, large world, low erosion, 30-50% land) to 2261, at which point I won a diplomatic victory and did a post-mortem. I also downloaded k3v's game from post #96 for comparison.

Just remember that k3v's game was played on a much earlier version of Thinker so there might be some differences. :) Can you upload your games somewhere and send the link to me? Preferably multiple saves at different points of time because some of that stuff needs a closer look.

> so any code that started by saying "if the faction has no HQ and this is a decently developed base, consider building a HQ" would ignore all of Morgan's bases.

It is possible sometimes the AI can fail to start the new HQ buildup. Basically I could write that particular piece of code in a different way so that it is guaranteed to start the new HQ somewhere if it ever loses the previous one.

> A second issue in my game was that the Believers and the Hive never ran "Planned" and never built Probe Teams. I eventually figured out that this was because both of them skipped researching "Planetary Networks" (as of 2261).

Currently Thinker does not prioritize Planetary Networks either way (on the default tech tree) but that might be changed. The priorities could be easily extended to include the prerequisities for the crawler tech. Though it does seem really strange Hive would not research Planetary Networks when that tech should match Hive's default Build priority. Are you playing with the default tech tree and factions?

Title: Re: SMACX Thinker Mod
Post by: Jade Panther on July 20, 2019, 06:52:47 PM
Zip file attached.

I was using vanilla files, because I wanted a control run of your mod so that I could understand what it does before I start modding it myself :). (The exceptions are that I turned used your SE choice algorithms until around 2235 and then switched to vanilla SE algorithms, and I played about 5 turns with borehole-drilling disabled, which I don't think that made any substantial long-term differences.)

Yang (and Marr) are build-conquer leaders, and the conquer value of Planetary Networks is 0, so they want it, but they want a lot of other things, too. I think what happened to them is that the focus on Gene Splicing opened up other options that the RNG normally wouldn't give them, plus bad luck, plus the settings of my map, which I'll get to in a few paragraphs. Miriam is build-explore, which means she hardly wants Planetary Networks at all, which is ironic since the Believers are built around the probe game. (I think I'm going to edit the conquer value of Planetary Networks to 3 in my house rules, since Planned and probe teams are both pretty useful to conquerors.)

In any case, I think that adding Planetary Networks to your prioritized techs makes sense, since it's a strong tech in its own right and, being a prereq for crawler tech, it doesn't hurt your other goals.

If you look at the base views for Sanctity Base, New Eden, and Sparta Command, they all have 9 or 10 rocky squares within the base radius. So leveling terrain is something that the AI's should know how to do in order to handle low-erosion maps. After examining the save games in more detail, I no longer think it key. (I eventually concluded that any rainy rocky square in the radius of one of my bases was going to get leveled unless it had a mineral resource, something I wouldn't do on normal erosion maps.)

I used the scenario editor to play as Hive in 2250 and discovered a few more things. Yang has a couple more bases that are excellent candidates for hab complexes, but he's overwhelmingly building military units. Well, I'm at vendetta with him, I'm next to him, and I'm much higher on the power graph than him (it is a Librarian game), so that makes sense. By contrast, k3v's AI's presumably felt secure, as they were either more powerful than or distant from the factions they had vendettas with. And they had +3 growth from the difficulty setting, unlike the AI's in my game. Lal was much the strongest AI in my game, but his bases could and did grow to size 9 without hab complexes.

Taking over from AI Yang, one of the first things I did was try to trade with the AI's for tech. I was able to pick up 8 techs by tech trading. So, why didn't the AI do that?

I think that the AI is triggered to talk to each other by their non-air units encountering each other (because normally that's when the AI starts conversations with the player). I noticed that the AI's expanded relatively quickly until they reached 22 bases, then they paused. Because your algorithm distributes factions evenly across the map, this meant that there were still substantial distances between the factions, and so their units would have rarely encountered each other, hypothetically resulting in less tech trading between the AI's than in a vanilla game. It's possible that the high land % of my map settings contributed to this as well. It's also possible that tech trading in a vanilla game masks Conquer factions not researching Planetary Networks, because the other AI's trade it to them, or they take it when they capture a base.

Also, I don't know whether you have control of this or not, but the AI's should build more cheap infantry units(!)

If you look at the 2184 save, AI Peacekeepers have 2 land combat units for 12 bases. (I left a couple of fungal towers on the border between myself and them, and I could see their units suiciding on the fungal towers, perhaps they don't distinguish between fungal towers and spore launchers?)

Edits in italics or struckout.
Title: Re: SMACX Thinker Mod
Post by: Induktio on July 21, 2019, 09:30:20 PM
> Yang has a couple more bases that are excellent candidates for hab complexes, but he's overwhelmingly building military units.
> Well, I'm at vendetta with him, I'm next to him, and I'm much higher on the power graph than him (it is a Librarian game), so that makes sense.

One of the newer features implemented in v0.9 was that if the AI loses bases to conquest, it triggers an extra priority to build more combat units. Some people observed previously the AI built too little defense so that thing was upgraded. Speaking of that, it seems Hive is really going nuts with that rover building, way over 30 impact+ rovers in some of the later saves. Though it would certainly build more needlejets instead if it just had the tech.

> I noticed that the AI's expanded relatively quickly until they reached 22 bases, then they paused.

That one is actually a self-imposed limit, the AI just stops building pods whenever it reaches the map size specific limit. It isn't even related to any lack of production lol. Maybe I should sometimes run a testing game with this limit removed and see what happens. Maybe this limit could even be configuration option.

> Because your algorithm distributes factions evenly across the map, this meant that there were still substantial distances between the factions, and so their units would have rarely encountered each other, hypothetically resulting in less tech trading between the AI's than in a vanilla game.

You seem to have a pretty detailed understanding on how the map layout might affect tech trading. I'm not certain on how the AI-to-AI tech trading works, since diplomacy code is still largely unreversed. But I could imagine something like this could be happening here.

> Also, I don't know whether you have control of this or not, but the AI's should build more cheap infantry units(!)

Those Peacekeepers have way less infantry than they should have, not sure even if those fungal towers can explain all of that. It seems like some kind of an anomaly. Generally the AI also needs to avoid building too much unneeded defensive untis that eat up support, that was also a major problem with the vanilla AI.
Title: Re: SMACX Thinker Mod
Post by: Jade Panther on July 22, 2019, 03:41:39 AM
One of the newer features implemented in v0.9 was that if the AI loses bases to conquest, it triggers an extra priority to build more combat units. Some people observed previously the AI built too little defense so that thing was upgraded. Speaking of that, it seems Hive is really going nuts with that rover building, way over 30 impact+ rovers in some of the later saves. Though it would certainly build more needlejets instead if it just had the tech.

He's already doing that buildup after I've started killing his units but before I take any bases from him. (See 2244 and 2250 saves.) Which is good.

> I noticed that the AI's expanded relatively quickly until they reached 22 bases, then they paused.

That one is actually a self-imposed limit, the AI just stops building pods whenever it reaches the map size specific limit. It isn't even related to any lack of production lol. Maybe I should sometimes run a testing game with this limit removed and see what happens. Maybe this limit could even be configuration option.

Don't worry about it. They paused when they reached approx. 22 bases. Then they resumed settling new bases. Santiago (for example) expanded from 18 bases in 2225 to 28 bases in 2250 and 30 bases in 2261.  At "Librarian" difficulty. Presumably it would be worse under Thinker or Transcend.

You seem to have a pretty detailed understanding on how the map layout might affect tech trading. I'm not certain on how the AI-to-AI tech trading works, since diplomacy code is still largely unreversed. But I could imagine something like this could be happening here.

I'm guessing.

For 20 years I've assumed that the SMAC/X AI's trade techs among themselves, because the AI's in other Civ games do that. Then a few days ago I used the scenario editor to take over and play as Hive, and I was able to trade for 8 techs in the first turn. "I shouldn't have been able to do that." So maybe the AI's weren't trading amongst themselves because of the map settings, or maybe they're not trading amongst themselves because AI's just don't do that in SMAC/X, or maybe who knows what?

The AI's do get techs faster than research alone would account for - I keep detailed enough stats that that much is clear. So they are getting techs from somewhere else too. The Hive and Believers didn't have probe teams, so that wasn't a source for them in this game. So - probably they're trading some? Not nearly as many as they could.

I've been paying more attention since then, and certainly the AI will talk to you without units meeting. Units meeting is one trigger for AI's to talk, there are others, and units meeting doesn't always trigger the AI to talk.

> Also, I don't know whether you have control of this or not, but the AI's should build more cheap infantry units(!)

Those Peacekeepers have way less infantry than they should have, not sure even if those fungal towers can explain all of that. It seems like some kind of an anomaly. Generally the AI also needs to avoid building too much unneeded defensive untis that eat up support, that was also a major problem with the vanilla AI.

I think it's more complex than that. (Although it's certainly true that that was an issue with the vanilla AI).

The factions fall into 3 categories: Morgan (usually running FM with negative Support), Peacekeepers and University (may be running FM or Planned, rarely have Support bonuses), and Believers/Hive/Sparta and, to an extent, Gaians, (rarely or never running FM, vanilla AI usually runs Power if they have that choice, except for Gaians they have additional bonuses to Police and/or Support.)  Ideally, an AI should look at a faction's SUPPORT and POLICE settings when it's deciding how many units to have sitting around.

Unless you're running Free Market, at least one of your units per base will function as a police unit. So you're getting some return on that mineral.  I noticed that your AI often had newly-founded bases without defensive units in them.

I'd guess I sniped about 5 over the course of that game. Those bases don't show on later maps because they went from pop 1 to pop 0 when I took them, which was fine by me: I wanted to deny the bases to the AI, not to acquire undeveloped bases in inconvenient locations. (There's a reason why the Believers in my game stopped expanding when they did, and it's not that they stopped sending out colony pods after reaching 22 bases.)  And, of course, when Lal only had two combat units, he wasn't getting the police bonuses in most of his bases.

I would suggest that if the AI doesn't send out military units specifically tasked with guarding its colony pods (which would be a nontrivial amount of code), the first item built at a new base should be a cheap defensive infantry unit, not a recycling tank or anything else.  I haven't checked what it does now, and it's possible that it would have promptly built a garrison unit at Thinker and Transcend difficulty but took a while because Librarian. At Transcend, with SMAC rules, a "cheap infantry" is 1-3-1 typically costing 2 rows of 7 minerals for 14, i.e. 4 above the 10 free minerals when founding a base. At Librarian, with SMAX rules, the AI's preferred "cheap infantry" is a 1-3r-1 costing 3 rows of 10 minerals for 30 minerals total.

Believers/Hive/Spartans all have bonuses to Police and/or Support, and they usually run Power when they have the chance. Take the Hive for example (I just played 20 turns with them.) Running Police State without Power, they have +2 Police and +2 Support, which gives them 4 free units per base and up to 3 units per base count as police suppressing up to 6 drones. So, I had, on average, 1 former per base, 1 at-large unit such as a rover or an assault infantry per base, and two or three (police) defensive infantry units just permanently sitting in the base. Under Power SE it's better.

My workhorses before fusion power are 1-3-1's, because they only cost 2 rows of minerals, not 1-3r-1's because they cost 3 rows of minerals. The present AI prefers 1-3r-1's, though, I presume because they're better once built. It'd be cool for Progenitor factions to use 1-3r-1's for thematic reasons, but I think the AI should ignore 1-3r-1's for the human factions, because they're too situational for the AI to use well.

There's a lot of synergies between the Power SE setting and the AI. The -2 Industry modifier for Power really hurts a player, but the AI has +2 or +3 Industry at Thinker or higher difficulty, so it can afford it. Having +4 support (Believers running Fundy/Power or Hive running Police/Power) allows the AI to keep massive numbers of units support-free at large bases, so it can defend in depth everywhere without having to think at all, really. The player, on the other hand, really doesn't want that -2 Industry modifier, which makes unit maintenance a scarce resource for the player, and means the player has to think about where to put their scarce units, which makes the game fun.

The vanilla AI has problems with never scrapping obsolete units and not putting non-lethal methods on any of their garrison units. But it doesn't have a problem with those factions that run Power having too many current-edge technology units.
Title: Re: SMACX Thinker Mod
Post by: Induktio on July 22, 2019, 03:19:52 PM
Don't worry about it. They paused when they reached approx. 22 bases. Then they resumed settling new bases. Santiago (for example) expanded from 18 bases in 2225 to 28 bases in 2250 and 30 bases in 2261.  At "Librarian" difficulty. Presumably it would be worse under Thinker or Transcend.

Actually that limit is the same for every difficulty level, it's only scaled for the map size. Whenever the AI reaches the maximum base limit, it simply stops building pods in all bases. Currently the upper limit is equal to min(40, MapSquareRoot/2) so that means it caps at 40 bases on huge maps. Usually it will stop expansion sooner if there's no unclaimed territory near its bases or it becomes involved in vendettas. Do you think this variable should be scaled for difficulty level too?

The AI's do get techs faster than research alone would account for - I keep detailed enough stats that that much is clear. So they are getting techs from somewhere else too. The Hive and Believers didn't have probe teams, so that wasn't a source for them in this game. So - probably they're trading some? Not nearly as many as they could.

I've been paying more attention since then, and certainly the AI will talk to you without units meeting. Units meeting is one trigger for AI's to talk, there are others, and units meeting doesn't always trigger the AI to talk.

I'm quite certain the AIs trade techs amonst themselves sometimes, but not sure about the details how it occurs since it's related to the diplomacy code. The factions have two main ways of initiating contact:

1) during turn_upkeep diplomacy phase based on some unknown variables
2) whenever their units meet and some variables indicate that contact should be initiated

So can't say for sure how that trading might occur unless somebody has more info here. Diplomacy code is still mostly unknown, not sure how much will get done about it.
Title: Re: SMACX Thinker Mod
Post by: Jade Panther on July 23, 2019, 05:24:36 AM
Actually that limit is the same for every difficulty level, it's only scaled for the map size. Whenever the AI reaches the maximum base limit, it simply stops building pods in all bases. Currently the upper limit is equal to min(40, MapSquareRoot/2) so that means it caps at 40 bases on huge maps. Usually it will stop expansion sooner if there's no unclaimed territory near its bases or it becomes involved in vendettas. Do you think this variable should be scaled for difficulty level too?

A good question.

For context, when I wrote my comment I thought that there was no limit on the number of bases, and I merely meant that the AI would have presumably created more bases if it had had the +Industry and +Growth bonuses that go with higher difficulty levels.

The cap of 40 seems arbitrary and obsolete. Scient's patch #21 increases the maximum number of units on a map from 2048 to many. When the maximum number of units was 2048, restricting any particular AI faction to 40 bases made sense. Now that that limit has been raised, and given that modders create maps significantly bigger than "huge", it seems reasonable to drop that limit.

As for theory about the limit:

So, if I were writing my ideal specs, I'd put a lower cap, but release the AI from that cap if the player built "too many" bases. And I'd probably give "conquest" factions a higher base cap than "builder" factions. (So how should the AI distinguish between "conquest factions" and "builder factions"?)  Etc.

But in practice I think the current rules are fine.



I've been looking at the code, and I think I understand it well enough to make a couple of simple changes. Specifically, I think that the "tech_balance" option should prioritize probe teams as well as formers and crawlers, and I think I understand how to code that. Secondly, I think that a base that has called the need_psych() function, and already has a rec commons and a holo theatre, should build a research hospital - that's what the vanilla AI does and that's what I do as a player - and I think I understand how to code that. Would you be interested in my opening a branch on Github and making those changes for your review?
Title: Re: SMACX Thinker Mod
Post by: Induktio on July 25, 2019, 07:26:16 PM
> When the maximum number of units was 2048, restricting any particular AI faction to 40 bases made sense.

The limit has always been 2048 units/512 bases in the game engine. Maybe you already realized by reading the patch notes, the cap cannot be lifted by applying any simple patches, so that feature was removed from Scient's patch.

> I've been looking at the code, and I think I understand it well enough to make a couple of simple changes.

Sure, go ahead and experiment with some new values. I did attempt to write it in a way it would be understandable without extensive reverse engineering knowledge. It's still possible to break things by applying new features if those don't interact well with the binary code. I don't promise to pull any changes but could do it if it's a really interesting feature or contributes new knowledge about the headers.

If you're familiar with IDA, you can find the reversing database stuff from the decompilation coordination thread I think. The most important thing there is to import the variable/function names to IDA.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 16, 2019, 01:58:43 AM
Disclaimer: I haven't played SMAC in a while now, but here are some unsolicited game-design thoughts anyway!

Do the Gaian's still use boreholes a lot in the latest version of the mod? If so, I think it would be a nice change to automate a decent strategy for them that makes sense in the lore, at least at the "Thinker" difficulty and below.

Slightly more sparse and less machine-like settlements might be more aesthetic, too.

But this might just be my bias: I get put off if I feel like an optimising machine when I'm playing a strategy game; I like to play a bit more loosely and narratively. If the AI look like they're just tessellating base grids with the same terraforming strategy across the map that takes away from the fun a little.

Again, I don't know if Thinker still does this or at what difficulty levels, but another potential issue if the AI has many bases that are all very good is that there may be less meaningful choice in what to attack. If some bases are producing loads of food and science and others loads of industry I can make a more narrative and strategic choice if e.g. I want to stop someone getting too far ahead in the techs or something.

For me, that will contribute significantly to war weariness (I really don't want to have to beat a long and tedious war through a large empire; I would rather do something smaller but decisive). I understand this is not how some other people play ;)
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 17, 2019, 10:43:22 AM
So what kind of a terraforming strategy do you suggest? No boreholes/more forests or something? I mean, the Gaian AI usually does really well in this mod, so they could even be "nerfed" to level the playing field with other factions. This mod doesn't hardcode any behaviour for any particular factions, so the change in terraforming strategy should be tied to positive PLANET rating or similar, with +0 rating or less staying like they are now.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 17, 2019, 12:47:53 PM
Yep, that's exactly what I'm getting at.

Make forests, go for the fungal resource bonuses, etc. I don't play enough to know whether that is actually a competitive enough strategy.

It would be real neat to just have eco-damage as a variable that pro-planet factions care about in all their key decisions (what terraforming to do, where to place workers, diplomatic relations, which bases to attack), but I think that's pie-in-the sky thinking.
Title: Re: SMACX Thinker Mod
Post by: dino on August 17, 2019, 02:11:28 PM
Nerfing Gainas would be wrong, fix other factions insead...

The only reason Gaians do so well is because they start with Centauri Ecology, and social_ai setting just multiply select few techs weights by 4, it doesn't ensure that factions with power, or tech focus will take it.
In fact it ensures the opposite. I have this setting disabled and use edited weights in alphax.txt instead.

But you could also change in HOOK_API int tech_value(int tech, int fac, int flag) function value *= 4; to value += 10; for example and other factions shouldn't be far behind Gaians with terraforming.

As for Gaian flavor I am personally not bothered much by them, but one could make them build half the boreholes, one condenser per base, plant forest and build hybrid forest, It'd nerf them a bit though.
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 18, 2019, 05:00:49 PM
> In fact it ensures the opposite. I have this setting disabled and use edited weights in alphax.txt instead.

I don't see how it could do the "opposite". It may not always guarantee the factions will research the techs quickly because of randomness, but it shouldn't cause any opposite effects.

Following my usual method of testing, I tried some 1vs1 AI test games to see what effects the various nerfs might have. When Gaians are playing with/without boreholes, they stay almost equal for the first 100 turns. After that the borehole building version will begin to gain an insurmountable lead because of the extra energy, and will just stomp the other faction. Heheh.

If the borehole building density is reduced by half, the effects are much more modest. The default Gaian AI will still remain somewhat stronger but not by a huge margin. In fact this kind of change would probably bring the Gaian AI to somewhat equal level with the other factions excluding the weakest ones.

Although I think this nerf would not change the look of Gaian territory much. They might build more condensers instead of boreholes and the bases have still the same spacing etc. Going for fungal bonuses would fit the theme for planet factions, but the most bonuses are locked in the upper part of the tech tree and then fungus will quickly become overpowered. So for the most part of the game, it's not very competitive.
Title: Re: SMACX Thinker Mod
Post by: dino on August 18, 2019, 05:39:56 PM
> I don't see how it could do the "opposite".

I've meant tech_balance instead of social_ai, my mistake but it should be obvious from the rest of the post.

Maybe opposite is the strong word, because with vanilla it's probably the same. If they don't get it early and trade some tech or pop a pod, they start to explore tech tree and can get CentEco with a huge delay. Additionally when they get it this late they often don't put formers fast enough since there is a lot of other stuff to build, especially if they're in war. I sometimes get factions that didn't start terraforming in 2150s with thinker tech_balance.

I use modified alphax.txt that ensures that everyone take CentEco as their first tech to research and Gaians have only few turns advantage in terraforming.
Using additive bonus, instead of multiplicative, like I suggested should assure that all factions will take selected techs asap, no matter what their ai weights are.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 18, 2019, 06:12:23 PM
If in AI vs AI games all the factions are staying competitive (averaging across several games), then I don't really see that a change is required to the priority for C. Ecology.

If the right choice for first tech really is always formers then that's a bit rubbish. There should be other valid options.
Title: Re: SMACX Thinker Mod
Post by: dino on August 18, 2019, 06:31:19 PM
> If the right choice for first tech really is always formers then that's a bit rubbish. There should be other valid options.

For humans you can prioritise getting free market, or planned first and do nothing but spam colony pods. In fact you need 2x bases ai have to get an advantage when playing thinker.
With vanilla starting locations and standard map size, you could consider impact speeder rush.

It's out of thinker scope to teach ai when the first one is safe to do, neither to perform second one sucessfully. So starting early terraforming is indeed the best choice for ai and the way the ai and  tech advancements works, if they don't get formers stright away, they will get them with a huge delay and got crippled. Gaians performance in thinker is all proof you need.
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 18, 2019, 09:17:58 PM
So starting early terraforming is indeed the best choice for ai and the way the ai and  tech advancements works, if they don't get formers stright away, they will get them with a huge delay and got crippled. Gaians performance in thinker is all proof you need.

I tend to think that the biggest long-term factor affecting the AI power in this mod is how well their research focus matches those techs that lift the resource production caps per square and provide advanced terraforming. Early terraforming is important too, but the faction that gets to build boreholes with no resource restrictions first tends to balloon really quickly from there. That extra energy is so important by mid game. The idea regarding additive tech_balance bonuses seems valid. In essence it would act as a floor for tech values, while a multiplier would not have a big effect if the base value was already really small (sometimes it is).

Also what do you think of the default tech cost formula (http://alphacentauri2.info/index.php?topic=3505.0) in the game? Should it be adjusted to deal with the much higher tech rate in the later stages in this mod? That might be one area where it would be valid to reconsider some of the AI bonuses or adjust it so that the tech rate will not get compressed to 1 tech/turn levels in the late game, for both human and AI factions alike. It should be possible to rewrite the tech cost function entirely if there's enough of a reason for that.
Title: Re: SMACX Thinker Mod
Post by: T-hawk on August 18, 2019, 10:31:18 PM
If you do anything with tech rate, I think it should just work like all the later Civ games, the cost of each tech is fixed depending on where it is on the tree.  Something like 20 labs for first-level techs, times 1.5N for a tech of level N, would add up to roughly (and of course you could calculate it exactly) the current total cost for the entire tree but scale up more smoothly throughout the game.  This would also reduce the impact of beelining restriction lifting, since the level 4 and 5 techs would be more expensive compared to filling in more early techs.

That's a major change and not at all something you'd put into an AI-only mod, but if you've decided to take on broader scope, that's one of the most fundamental improvements from SMAC to all the later Civs.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 19, 2019, 12:22:51 AM
T-hawk, what else do you think the later civs improved on that might be worth sharing?

Maybe it would be interesting to solicit game design thoughts more broadly? I don't know what kind of changes you feel like making, induktio.

SManiaC was very well received when released. I'm not familiar with the more recent mods like Binary Dawn and bvanery's one, but there could be some lessons to learn. Edit: Probably more from the multiplayer mods because so much of other mods is messing with the AI in ways that don't really apply any more for Thinker.

Interestingly, SManiaC's description explicitly mentions infinite forest as a common effective strategy in multiplayer. Perhaps we can teach the Gaians to use it effectively to give them that different flavour.
Title: Re: SMACX Thinker Mod
Post by: T-hawk on August 19, 2019, 03:31:26 AM
The big one Civ 3 players rejoiced over was unit support paid at the nationwide level rather than having to micromanage it per base.

The other big one in Civ 3 is that your units can't use roads in enemy territory, so building them isn't a huge potential liability.

The big one Civ 4 players rejoiced over was no riots - only the unhappy marginal citizen ceases to work, not the entire city.

The other big one in Civ 4 is tracking production and tech per item, so if you change production or research orders, the invested progress stays with the original item.  That would be quite a task to implement in SMAC, for sure.

The big one for Civ 5 is that cities have their own inherent strength and hit points, no more wiping out a civ's best base or capital with a single warrior.

Some less major stuff:

Scaling tech cost by tree depth applies to diplomacy too, starting in Civ 3, techs at the trade table are worth money roughly equal to the labs investment.

Civ 4 significantly downscaled the load of worker micromanagement, by increasing their costs but reducing the time to build improvements.  You have half as many workers but each completes things twice as fast, same results, half the micromanagement.

And of course the culture subsystem for borders, although I don't know how you'd invent that from scratch for SMAC.  Although one subtle but welcome tweak would be that a tile at equal distances from two competing bases should belong to the older base, not the newer.  It's stupidly easy to steal territory by aggressive settling in SMAC.  I think Civs 4+ outright disallow settling in someone else's owned territory, which is a good rule, although SMAC's 8-tile border distance is a bit too much range for that.
Title: Re: SMACX Thinker Mod
Post by: dino on August 19, 2019, 08:37:20 AM
> Also what do you think of the default tech cost formula in the game?

It's very needed, half of the tech three has almost no playing time. When you start geting new tech every 1-2 turns, it's best to just tech away and skip few tiers of units.

1)
The big offenders are parts of the formula that reduce tech cost as the game progress: with turns passed and with amount of tech owned by leading faction.
These are mechanics meant to ease casual player. The second one could be left in place for ai, but removed for human player.

2)
The cost could use, some adjustable through ini file exponential modifier to number of techs count impact on the cost, to match exponential growth of thinker ai, or competent player.
So at the beginning it would be the same as vanilla and at the end of the tech tree cost could be few times higher ( lets say 2x, but adjustable variable would make it easy to playtest, adjust to personal preferences ).

Tech cost dependant on tech tier is an excellent idea, that would help ai, that can't consciously beeline the most necessary tech, but it's probably difficult to implement.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 19, 2019, 11:28:07 PM
Thanks for the response, T-hawk.

I'm not sure I'd want all of those, but it's interesting to hear your perspective.

Continuing to muse on SMAC game design, I'd like it if supply crawlers made a bit more sense, too. Perhaps more like the caravans that continue to move around the map. Obviously one would hope that it leads to interesting piracy opportunities and territory control issues, but I kinda doubt it would really make much difference.
Title: Re: SMACX Thinker Mod
Post by: dino on August 19, 2019, 11:39:15 PM
Crawled resources could be divided by a calculated by pathfinding algorithm amount of turns it would take a crawler to reach a home base.
Would make crawlers on better chasis, or building roads/magtubes to crawled tiles useful.

Interrupting supply line with ZOC of enemy unit, would lenghten calculated distance, or even cut out resource.
Crawlers sitting on resource are even easier target than travelling ones, so actually travelling them on the map wouldn't bring much to the table.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 20, 2019, 12:01:44 AM
I was thinking of a bigger departure from the system with a crawler going to an area, sitting there statically and sending resources back in caravans.

Anyway, I think it's a pretty off-topic thought ;)
Title: Re: SMACX Thinker Mod
Post by: Vidsek on August 20, 2019, 05:56:18 PM
   Interesting crawler ideas.

  I've been wishing that there could be an option to give crawling resources a cost based on the distance to the base receiving, but a cost in *energy* (meaning fuel) not the resource being harvested.

  Having the crawlers actually moving about might run into one snag: they can send home stuff across water gaps they themselves cannot cross.  I usually just imagine invisible trucks and ships handling the relay :D
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 20, 2019, 09:31:12 PM
If you do anything with tech rate, I think it should just work like all the later Civ games, the cost of each tech is fixed depending on where it is on the tree.  Something like 20 labs for first-level techs, times 1.5N for a tech of level N, would add up to roughly (and of course you could calculate it exactly) the current total cost for the entire tree but scale up more smoothly throughout the game.  This would also reduce the impact of beelining restriction lifting, since the level 4 and 5 techs would be more expensive compared to filling in more early techs.

That's a major change and not at all something you'd put into an AI-only mod, but if you've decided to take on broader scope, that's one of the most fundamental improvements from SMAC to all the later Civs.

Lots of replies here it seems, so this tech rate issue has been bothering other players too. It does feel somewhat broken if the end game techs get compressed into only 10 turns of gameplay or similar. I would also identify the tech cost function as the main point of interest for inclusion in the next Thinker release.

I've been digging through the relevant parts of code and it seems implementing the tech cost change shouldn't be too difficult. After all, we're just reimplementing a function that returns a simple integer. Of course, this change hasn't been implemented yet in the develop builds, and I don't generally promise to implement any particular things because motivation lol. Just to note, this mod isn't "only" about AI, it has also a rewritten random map generator, so this kind of change isn't entirely off the theme.

Later Civ games changed some fundamental game mechanics mainly for balance reasons and also to help the AI. Coindicentally T-Hawk also mentioned some of those mechanics which have been talked in this thread previously. Nationwide unit support to name one of the most important ones. But now I'm probably going to look mostly into the tech cost issue when I'll have more spare time to dig through the code. I kind of prefer the idea that costs should follow a formula like 20 * 1.5^N, scaled for map size (square root?) of course.
Title: Re: SMACX Thinker Mod
Post by: Rocky on August 23, 2019, 04:01:50 PM
Induktio, would it be possible to add a setting in the AI config files that allows the player to set the amount of bases the factions can build?

Your AI does an amazing job with expanding but on larger maps it gets so many bases that any kind of war becomes a drawn out fight with lots of micro-management. Several times I considered trying to stop a neighboring faction from becoming too powerful by invading them, but at that point they have so many bases (somewhere between 20-40) that I end up going for a more peaceful builder-game instead.

I like the option/idea of the Gaians having a different terraforming process as was discussed earlier. With the Gaians having fewer Boreholes, would it be possible to encourage the AI to place higher priority on building Tree Farms/Hybrid Forests? (Unless that was already the case) It would fit their nature theme.
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 24, 2019, 03:53:25 PM
Well good news, it seems it is very feasible to rewrite the tech cost function. As a proof of concept, I implemented a patched version of tech_rate function that can change the costs for any tech. Changes are immediately displayed in the infiltration window etc. Now the main thing remaining is to decide how to do the cost scaling in this new version.

On a standard sized map with default tech rate, the first tech costs normally 14 labs. Using T-Hawk's formula the first one would cost 20*1.5^1=30, so not sure what to make of that. Level 16 Transcendent Thought would cost 13 thousand labs. That's maybe too much. There's also some other mechanics that could be used here:

1) Tech costs can be combined from a linear and an exponential factor. The latter should become more relevant towards the end of game to account for all the energy increases.
2) Use tech costs as an anti-runaway faction mechanic. Researching a tech for the first time should be much more expensive than researching it when all the other factions already know it.
3) Should we equalize tech costs for human and AI factions or keep them somehow dependent on the difficulty level?

In any case the new system should probably be based on these elements: 1) tech costs are mainly dependent on the tech's level, 2) map size scaling should stay the same as previously.


> would it be possible to add a setting in the AI config files that allows the player to set the amount of bases the factions can build?

Well sure, I've been thinking about that. But the main thing is that the bases have both an upper limit (40 bases on Huge) and another scaled on map size. It might need two different config options to have it adjust sensibly on different map sizes. Maybe a percentage multiplier for the default map scaled limit and another value to set the global upper limit?
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 24, 2019, 08:30:49 PM
I think the base limit setting could be the number for standard size maps with a comment explaining how it is scaled with map size.

Re: tech costs, I think techs get shared around OK already through trade, so if everyone else knows a tech it is cheaper to get it.

I think bonuses for the AI should be decided experimentally, it's just about getting a good play experience.
Title: Re: SMACX Thinker Mod
Post by: T-hawk on August 26, 2019, 03:33:08 PM
The factors of 20 and 1.5 were just an off-the-cuff guess, adjust it however you want for the higher tiers to come out right.  Or never mind a formula and just specify some reasonable sequence directly like 20, 30, 50, 80, etc.  Do remember there's often only about two techs per tier up at the high end, unlike the later Civs, so it could be okay if they cost quite a bit each.

The existing formula already includes discounts for a faction trailing in tech and for AI difficulty level.  I think those are good enough to just keep the same rather than mod.
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 27, 2019, 05:37:35 PM
> I think the base limit setting could be the number for standard size maps with a comment explaining how it is scaled with map size.

In the next update, base limit setting will get a new configuration option called expansion_factor. It multiplies the default expansion limit by a percentage. Default limit will now be scaled proportional to (MapWidth*MapHeight)^0.4. Smallest map sizes will get some additional scaling because otherwise space would run out so quickly. It will be a very nice addition to the other difficulty config options. Planet factions will also build less boreholes in the next update.

However, the main thing I've been thinking is of course the tech cost update. It requires some more number crunching before I'll deploy a new version. One of the oddities of the default tech costs is that the first tech is dirt cheap, and then it multiplies very quickly after that. I might even try to replicate the same costs for say first 3-4 techs in the new formula. Level 1-3 costs should probably stay close to their previous amounts, but it might be hard to factor in various tech beelining tactics that were used with the old formula. First notable cost increases should appear on levels 4-5.

> The existing formula already includes discounts for a faction trailing in tech and for AI difficulty level.  I think those are good enough to just keep the same rather than mod.

But there's one gotcha here: human players could purposefully avoid learning redundant techs because having a lower known tech count, they would gain an advantage in "trailing" tech level mechanics. If the discounts are only tied to how many factions know a particular tech, then it might be harder to exploit.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 27, 2019, 06:39:51 PM
Those sound like good changes :)

Did you explore the effectiveness of a forest-heavy approach?

I wouldn't worry too much about exploits, but decreasing cost by number of other factions with tech does make more sense.
Title: Re: SMACX Thinker Mod
Post by: dino on August 28, 2019, 08:05:21 AM
I'd be vary of overdoing various anti "runaway" mechanics. The whole point and fun of the game is to either runaway, or to not let runaway the ai, depending on difficulty and player skill.
The fact that tech cost raise exponentially is an anti runaway mechanic in itself.

This could also be an occassion to give diplomacy more meaning:
No contact, no bonus. For each faction in contact, that own the tech:
1) informal truce, truce, or war: -2% ( infiltration -4%)
2) treaty: -4%  ( infiltration -6%)
3) pact: -8%

It's too easy for a player to exploit certain mechanics and negate ai tech advantage, so some other mechanics from later civs could be useful ( I understand that, these ideas may be difficult to implement ):

Make it impossible to trade/steal tech you don't have prerequisites for. It's reasonable in itself, but additionally if we went for fixed tiered tech costs, it'd prevent ai to some extend from trading away high end techs easily. Or better yet make ai refuse to trade tech with too high tier difference.

Make tech trade, probe steal, or spoils of war, reduce cost by 50%, instead of just giving tech. You could hold a separate list of traded/stolen techs and it should override diplomacy bonus, not add to it.
Eventually you could display these techs in tech report screen in brackets, so player could track the techs he already has traded/stolen.

Make stealing a unit, don't give prototype, but cause all unknown techs required for stolen unit, to be included in traded/stolen list ( if the player has prerequisites for them of course ).

Increase ai weights for research selection of lower tier and traded/stolen techs.

Title: Re: SMACX Thinker Mod
Post by: Induktio on August 28, 2019, 07:55:25 PM
Hmm :) Been a little busy lately with other things, so this is still under consideration.

> This could also be an occassion to give diplomacy more meaning:
> No contact, no bonus. For each faction in contact, that own the tech:

Something like this could be done quite easily, but I'll probably first try a simple version where the costs are reduced by how many factions know the tech, regardless of diplo status. The later items you mentioned are getting more complicated. I'd like to adjust how much energy the AI demands for techs in trades, but not sure if there's any simple way of doing that. Plus some of those other items might require changes to the save game format, which is something not to be taken lightly.

> Did you explore the effectiveness of a forest-heavy approach?

I did test factions with/without boreholes but that's about it. The latter would just get stomped by the end game because of the energy difference.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on August 28, 2019, 08:30:15 PM
I think the point of the forest strategy is to save money on formers and expand more in the early and mid game.

Also, I guess if you play with default climate change and native life it can make a difference.
Title: Re: SMACX Thinker Mod
Post by: Induktio on August 31, 2019, 08:46:07 PM
Okay, finally an update. Develop build 20190831 is now available from downloads (https://github.com/induktio/thinker). This update features a new tech cost implementation in addition to the features I posted before (config option is revised_tech_cost). In the end it was a tricky feature to implement, so for the first time ever, Thinker also stores some variables in the save game to manage the game state. The save games should be fully compatible with non-Thinker versions of SMACX.

The main formula for new tech costs is:
2 * Level^3 + 98 * Level

So it results in this kind of cost progression on standard sized maps:
(click to show/hide)

It seems a cost formula with an exponential term is not needed, because a cubic term will increase the costs quite quickly. I'm still totally undecided on what kind of constants to use in this formula or how to do the difficulty scaling. These kind of factors are multiplied with the base cost:

* For AIs, one unit of cost_factor below/above 10 equals a 5% bonus/penalty
* For humans, cost discount is 7% * (Transcend - current difficulty)
* Map size scales according to the square root
* All other faction/alphax.txt factors should work as before
* Tech stagnation is the same as before, but it could changed
* If 2 or more factions with commlink has the tech, discount 25%
* If only 1 commlink faction has it, discount 15%

For example, if you play on Transcend with cost_factor=10, then you are on equal footing with the AIs.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 02, 2019, 07:59:59 PM
One more factor that I forgot to mention on the list:

For the first 10 techs a faction discovers they get decreasing cost discounts. So on a standard map, the first tech will cost 14 labs instead of the 100 labs default price. This approximates the tech costs in vanilla game mechanics for a couple of first techs.

The idea here is that level 1-3 costs stay relatively modest and the big cost increases should begin from level 4 onwards. I was also considering using 3*Level^3 instead of 2*Level^3 as the cubic factor, but there might be some issues how that will scale on huge map sizes, because then the later techs would get really expensive. On huge maps techs cost 90/56 = 1.6 more than on standard maps.
Title: Re: SMACX Thinker Mod
Post by: dino on September 03, 2019, 10:17:10 AM
I'm not in the mood to reach the end game currently, but early to midgame works fine.

As for tech for energy trade ai should only accept an energy equivalent of tech cost, adjusted by some modifier based on commerce difference betwean factions.

If we are at diplo, the minimum bribe ai should accept when it threatens you, should be based on your highest owned tier tech cost.
If you can't pay and don't have any tech, they should demand a base that is nearest their territorry.
If their military score ( not power score ) is 2x, 3x, 4x for ai_fight 1/0/-1, this demand should never be an empty threat and always result in vendetta if refused, even when original code would back off.

This new tech cost mechanic will be very easy for a player to abuse by saving money on research and stealing techs with probes.
The only reason it's not a problem with vanilla game, is because player can easily be a tech leader himself instead.
With super high tech costs in the endgame, probe teams will be extremely unbalanced. So my proposal to solve this issue is:

Make a successful tech steal attempt cost half the research cost in energy, adjusted by PROBE social effect.
The part of the original code used for base mind control could be repurposed to display an appropriate dialog window.
If we are at it, the amount of money required for mind control and diplomacy base trade could be given a multiplier.

These ideas are based on the code that is already there and should be easier to implement, then my previous proposals regarding tech trade and probes balance.
I understand the diplomacy code is not dissassembled yet and these ideas won't happen probably, but you've said you'll be looking at diplomacy tech trade, so I threw some more ideas worth looking at when you'll be at it.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 03, 2019, 12:49:10 PM
Glad to see someone playtest it. Do you feel that the revised formula is an improvement in the early and mid game?

I disagree that militarily stronger factions should never make empty threats. I think it should still be probabilistic.

Re: probes, maybe we can just teach the AI to keep their bases defended? Unescorted probe teams are quite easy to deal with and escorted ones can be defeated by probe defences or by destroying their escorts. I don't know how you balance this game mechanic effectively, keeping it not OP and also not tedious or useless. Probably requires some experimentation.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 04, 2019, 08:04:46 PM
Actually some parts of diplomacy are known. For example, there are two separate functions for deciding how much the AI will bid/ask for techs in trade. They are not even very long functions. The right approach here would be to rewrite them in C++ and just redirect the calls to Thinker.

If there's some place where to start rewriting the diplomacy code, that would be a good choice. Only obstacle I see is that some stuff needs to be figured out so that the dialog box code can be called from C++. Now it's just a question of finding enough time to code such a thing.
Title: Re: SMACX Thinker Mod
Post by: Rocky on September 04, 2019, 09:24:39 PM
Does this version also have the option of setting the amount of AI bases? Or is this planned for a later update?
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 05, 2019, 07:34:24 PM
> Does this version also have the option of setting the amount of AI bases? Or is this planned for a later update?

That change was already committed over a week ago, it's in the newest config file.
Title: Re: SMACX Thinker Mod
Post by: Rocky on September 07, 2019, 01:17:04 PM
> Does this version also have the option of setting the amount of AI bases? Or is this planned for a later update?

That change was already committed over a week ago, it's in the newest config file.

Thanks! I somehow totally missed it. I'm looking forward to try it out.
Title: Re: SMACX Thinker Mod
Post by: silva on September 16, 2019, 01:53:09 AM
Hi there folks. First post here.  :D

Alpha Centauri is my favorite strategy game of all time, and is the first game I install in every new PC I buy (the second being King of Dragon Pass). It seems we've finally found a way to improve the AI. So thanks very much to Induktio for this project.

BUT I have this worry that is more or less reflected in the following comment..

Please try to remember that there are a lot of Narrativists playing SMAC.  Narrative is the reason that people are still playing and talking about this game 20 years later.  When I post on /r/4Xgaming that GOG is having another $1.49 sale, it gets 93 upvotes.  That's the highest number of upvotes for any discussion subject right now, and it's the highest number of upvotes of the past three months.  That pattern has been generally true in the past as well, for that 13.5k subscriber forum.  SMAC in its own weird way is badass like that, or at least $1.49 SMAC is.
..pretty much this! SMAC/X is not only a pure logical challenge for me, but also an opportunity to role-play a leader in a ideological conflict in an amazingly evocative futuristic setting. So my question is: Do the patch upgrade the AI while also respecting the planet and factions original personalities? I mean, will Morgan still pursue the more economic enabling techs, or Deirdre pursue environmentalist ones, etc? Or will Deirdre build thermal boreholes left and right and Morgan become a warmonger just because it's more "efficient" from a pure gameplay standpoint?

I intend to give the patch a try anyway, but this is an important question to me.

Thanks again Induktio for the great work.  ;)
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 16, 2019, 02:30:20 AM
In the latest beta, at my suggestion ;p, PLANET factions will build fewer boreholes.

Thinker makes some small changes to AI tech selection: https://github.com/induktio/thinker/blob/de26192bfa0c600d7bb2580a0a30176938971ef2/src/main.cpp#L329

If tech_balance is on in thinker.ini, the ai will prioritise techs that provide certain important benefits, if any of those techs are in the available panel of techs (The AI will not beeline to any techs). In my opinion, these do not affect the lore of the factions.

Thinker optionally also provides a changed tech cost progression formula which makes the late game techs come slower (by default they come all at once at the end, if you have an efficient empire, so you never use a bunch of them).

As far as I remember, thinker makes no changes to faction strategic or diplomatic choices.

Thinker improves the AI's tech selection, terraforming, tactical combat and more. Overall it moves them from "pretty useless" to "quite challenging".

Overall, I find it less immersive to eventually find the AI scrubbing about with completely undeveloped territories and tiny bases than it is to see Gaians with a few boreholes. I would recommend that you use this mod.
Title: Re: SMACX Thinker Mod
Post by: silva on September 17, 2019, 02:07:09 AM
That's great to hear DrazharLn! You just made me more anxious to try this mod.

Are there any options that should set to an .ini file or something to have this more "role-playing inclined" experience?

And what difficulty level is recommended with Thinker? I used to play Thinker level (duh) Ironman in original SMAX as it gave a me a mix of fun and challenge, but an I right to infer that would be too tough in Thinker mod ?
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 17, 2019, 12:27:25 PM
Glad to hear that you are excited :)

Get the latest develop build from here (bottom of page): https://www.dropbox.com/sh/qsps5bhz8v020o9/AADv-0D0-bPq22pgoAIcDRC3a/develop?dl=0&lst=

(That link is from the github project page)

If you're used to Thinker difficulty and don't want a tough challenge, you might like to drop down two difficulty levels or stay on Thinker difficulty and adjust the cost_factor in thinker.ini

No changes are required to get the experience I described in the latest development builds, though you should be aware that the revised tech cost formula is enabled by default (disable in thinker.ini if you like)
Title: Re: SMACX Thinker Mod
Post by: Nevill on September 17, 2019, 09:46:27 PM
I've been away from the SMAC community for a year and a half, and it seems like I've missed some major developments.

Will definitely be trying this out. However, when reading the "State of affairs" thread I noticed DrazharLn mentioning something about Thinker not working in Multiplayer properly? Could anyone please elaborate what issues currently exist? I don't think anything of a sort is mentioned in the readme. Did anyone try a multiplayer game?
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 17, 2019, 10:05:04 PM
Hello to new players. :)

Multiplayer support (or lack of thereof) is mentioned in Details.md. It's maybe easy to gloss over if you just glance over that page, but one has to put all the details somewhere. It should only affect network multiplayer because in those situations, the game has to continuously synchronise data over network. Thinker works by patching lots of stuff in game memory and that would cause a network desync unless some extra large development effort is spent on implementing that feature. I'm not currently planning on doing that because network desyncs are really annoying to debug.

The two main variables that affect the difficulty level are cost_factor (of course) and expansion_factor. The latter decides how many bases the AI wants to build before it stops expansion. On large maps, Thinker AIs can expand *a lot* unless it is limited. Recommended values range from, say, 70 to 140. Anything over that is probably in the extreme challenge territory.

Latest development build also enables a new tech cost algorithm, but that itself shouldn't increase difficulty level. It's more like supposed to slow down the late game tech race. It is also in an experimental phase, so the various factors in the formula might get readjusted before v1.0 based on playtesting. I'm also considering if expansion_factor should be tied to the difficulty level somehow, but now it's just a constant variable that gets applied on all levels.
Title: Re: SMACX Thinker Mod
Post by: DrazharLn on September 18, 2019, 12:46:58 AM
I should have been clear that Thinker works with PBEM/hotseat games, I'll edit the post :)

I think Thinker would work well for PBEM/forum games and I would be interested to see how our MP regulars fare against the enhanced AI :)
Title: Re: SMACX Thinker Mod
Post by: Nevill on September 30, 2019, 10:57:23 AM
Been playing a multiplayer game with the mod enabled. Could probably attach screenshots or files if need arises.

AI still defends their bases with scouts while having access to better armor. No, it builds armored units too, but it is strange how a size 6 base building a secret project is only defended by a scout. And it's Sparta of all factions! Was something done to tackle AI building priorities?

It got somewhat better at expansion, but sometimes the logic gets wonky. I conquered PeaceKeepers and had them left with 2 bases, both in the Moonson Jungle. I figured they'd recover quickly, as usually the one with the Jungle gets an enormous advantage. Nope, built nothing but units for the next 20 years, and the first Colony Pod he produced was a sea one! Why? You have all this unclaimed land with insane bonuses, why are you going for the sea? The sea pod got sent to the nearby shore in the vicinity of a Nutrient bonus on a shelf... which was in Gaian territory, since they had one of their starting bases on a shore. So now Lal's newest base is working a shelf square which gives it 1-0-0. Why, just why?

The conquest happened in 2120, and it's 2175 now, yet Lal only has 3 bases one of which is completely useless. He is building a colony pod now, thankfully, but I wonder what's been stoping him the last 50 years.

Also something I noticed in the mod was... an inconsistency when it comes to finishing production. It is not rare to see an AI fill the mineral rows necessary to build a unit... only the unit isn't built next turn. The rows are filled, and there are even red minerals there indicating wasted production, but the unit fails to materialize. This can go on for several turns before the AI decides that yes, it's okay to come out now. It's all very bizarre.

I know AI can switch prioduction at will with no penalties, so something like this could be going on (switching to a more expensive unit, then switching back). I can't remember things like that happening in vanilla, though. Could it be a side effect of hurrying somehow?

If you aren't sure what I am talking about, I have 2 (or possibly 3) consecutive turns of Lal having a base with an armored sentinel in production. All production rows are filled, and the F4 base production screen for his base reads: Sentinels (0 turns). This happens for several turns. Units just do not appear.

No events were observed that could make him switch production or otherwise delay it.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 30, 2019, 08:13:23 PM
Been playing a multiplayer game with the mod enabled. Could probably attach screenshots or files if need arises.

So do you mean you're playing this in PBEM mode then? Potential bug reports dealing with this kind of low level stuff definitely need a save game to inspect. PBEM mode has received very little testing, but first thing I would verify is whether both players are running the same version of Thinker with the same settings. Otherwise AI behaviour might be very inconsistent, worse still, if the other player does not have Thinker AI enabled. So this kind of thing can't be debugged without a save game in any meaningful way. There might some things in your description that can be looked at for the next version, though.
Title: Re: SMACX Thinker Mod
Post by: Nevill on September 30, 2019, 08:19:01 PM
I can't imagine why would anyone download Thinker AI mod and then disable Thinker AI. We are both running the latest dev version with default settings except for SMAC-in-SMAX (smac_only=1).

I suppose I can give you the saves, and we both could give you passwords in PM? The game is still ongoing, which means we don't have access to each other's saves, and can't really do much testing.

You know the Codicil utility, the one that allows you to substiture a player with an AI and vice versa? The MP game can be converted to SP that way. The first thing I'd do would be checking if the behavior persists in SP, but Codicil requires all passwords to work.
Title: Re: SMACX Thinker Mod
Post by: Induktio on September 30, 2019, 08:31:46 PM
You can keep playing the game normally, if you've got this far I doubt there's any show stopper bugs that would prevent all progress in the game etc. Just remember to store some save games to inspect afterwards. :)

Sometimes the AIs might do silly things anyway even if on average they expand much faster than in the vanilla game. They might also appear to be stuck in military building mode if there's lots of enemy bases nearby. Happens more often on smaller maps. At least what could be checked afterwards is if there's some kind of a bug in the production queue, it might be possible.
Title: Re: SMACX Thinker Mod
Post by: paul7 on October 01, 2019, 10:08:51 PM
Well, this looks very promising! Haven't really tried this mod yet, but I feel I must.
There has been an argument in this topic regarding narrative vs. AI performance. Well I do value the narrative part of SMAC very much, but I personally feel that a competent AI is really important to support the narrative. So I'm really excited about this mod. Induktio, thank you for your work!

BTW, it looks like the asterisk in "*Sea Formers" in alphax.txt was there for a reason after all. Probably some kind of weird bug that Firaxis never got to fix causes it to become "ea Formers" in datalinks without the asterisk (see the screenshots).

And could you please tell, do you plan to include V2.1 of the Scient's patch?
Title: Re: SMACX Thinker Mod
Post by: ocelotter on October 05, 2019, 10:10:27 AM
I played a game with the 20190831 dev build and figured I'd post my feedback. I used default settings with no other mods (PRACX installed but disabled), playing as the Cybernetic Consciousness. Custom map settings:

Large (50x100)
50-70% ocean
Weak erosion
Abundant native life
Average cloud cover
Librarian difficulty
Directed research, iron man, do or die, pod scattering on

For perspective, this is only the second game of SMAC/X I've played since I played the game as a kid, so I imagine I'm pretty bad at the game.

I found the updated tech_cost function either worse than the original or of negligible impact. Granted I was playing as the Consciousness, so I eventually reached +6 research (and Free Market), but as soon as I switched to market I was getting a new technology close to every turn (I transcended in 2266, though I probably could have been elected to Supreme Leader 30 turns earlier), eventually multiple per turn. I suspect the way it's set up actually accelerated my rate of tech acquisition at the beginning of the game, leading to me rapidly running away with things while the AI sat there wondering what was happening.

Here's a screenshot to illustrate the situation (https://imgur.com/a/8Fmq4CS). This is the 62nd tech I'm researching, so per the original tech_cost formula (http://alphacentauri2.info/index.php?topic=3505.0) the base cost should be 20*20*58=2320, if I read that correctly. This is multiplied by something for world size adjustment (sqrt((50*100) / (40*80)) = 1.25?), then presumably 0.4 for +6 research, and 2320*0.4 = 928. So the base cost should be 928*(worldsize adjustment >1) for this tech.

So... I'm not too sure how to get 971 out of your formula (1808*0.4*1.25 is already 904, not counting the difficulty adjustment), but it seems too low. Furthermore, I'd recommend Librarian as the equal-to-the-AI difficulty, not Transcend, though that's probably besides the point here.

I checked starting a new game, same settings, with revised_tech_cost=1 and =0, and with it on, Centauri Ecology required 12 cost to research, while with it off it required 17 cost to research. That's a pretty substantial acceleration right off the bat, and probably a problem.


Other feedback:

1) I cycled through a few map generations with different settings just to test out your Worldbuilder update, and I'll probably reset it back to the original version. I imagine it does a great job of balancing faction starting locations, but it creates a world that looks too similar all over for my taste: large squarish blocks of land bolted on to other large squarish blocks of land. Archipelagos, peninsulas, isthmuses... these features help break up the monotony and make Planet feel like a planet, even if perhaps balance suffers for it.

2) The AI seemed to constantly suffer from drone riots, especially--and ironically--the Free Drones. Not sure what's going on there, but they should probably do a bit better at avoiding that.

3) Despite having the Hunter-Seeker Algorithm, the AI constantly suicided probe teams into my bases.

4) It seems like an intended rubberband mechanic in the game is "gang up on the leader." Yet, even when it was clear the AI had no chance unless they all banded together in vendetta on me, the Spartans came over and donated 15-20 units to my cause, while only under treaty with me. Seemed odd, though I doubt it was Thinker that was responsible.


Let me know if you want a saved game or something to look at. I'm not sure exactly what files to give you, but I'll figure it out.

I'll probably try Thinker 0.9 on Transcend difficulty at some point to see how that goes. Probably on a much smaller map, managing anything more than 10-15 bases feels awfully tedious.

Thank you for creating this, hopefully I can eventually figure out the right settings to muster a challenge from the AI.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 05, 2019, 06:58:48 PM
And could you please tell, do you plan to include V2.1 of the Scient's patch?

Short answer - Scient's patch v2.1 is already included because it had no changes *binary-wise* compared to the v2.0 version. The only changes there related to txt files which needed a fix to prevent the game from crashing on certain datalinks pages. You can copy the txt files and use them with Thinker mod (but this is not required in any way). Also PRACX can be used together with this mod, but it isn't required in any way. Especially for bug reports, it would be preferable if people just use the default binary of Thinker.

I found the updated tech_cost function either worse than the original or of negligible impact. Granted I was playing as the Consciousness, so I eventually reached +6 research (and Free Market), but as soon as I switched to market I was getting a new technology close to every turn (I transcended in 2266, though I probably could have been elected to Supreme Leader 30 turns earlier), eventually multiple per turn. I suspect the way it's set up actually accelerated my rate of tech acquisition at the beginning of the game, leading to me rapidly running away with things while the AI sat there wondering what was happening.

Here's a screenshot to illustrate the situation (https://imgur.com/a/8Fmq4CS). This is the 62nd tech I'm researching, so per the original tech_cost formula (http://alphacentauri2.info/index.php?topic=3505.0) the base cost should be 20*20*58=2320, if I read that correctly. This is multiplied by something for world size adjustment (sqrt((50*100) / (40*80)) = 1.25?), then presumably 0.4 for +6 research, and 2320*0.4 = 928. So the base cost should be 928*(worldsize adjustment >1) for this tech.

Lots of detailed feedback there, that will be useful when I'll try to figure out how to set up this tech cost mechanic in v1.0. Earlier I described the new costs in this post (http://alphacentauri2.info/index.php?topic=21013.msg121462#msg121462) in case anyone wonders. The discrepancy with your numbers can be explained quite easily.

The base cost for level 8 techs is 1808. The other modifiers applied in this case include a 2*7% = 14% discount on all techs because you're playing 2 levels below Transcend. Also Research SE is modifier is capped at +5/-5 according to the documentation in alphax.txt. That gives a final cost of 1808*1.25*0.5*0.86 = 971 as it is visible in the screenshot (decimal values truncated).

Probably some of these modifiers should be adjusted further. I'm not exactly sure which number the original tech cost formula would give here because it has some situational variables, and also it was described in the post in a non-exact way, imho. That kind of formula would be just better described in C++ code. We could remove the 7% discounts and adjust the base costs slightly higher for example. It may be that the AI is at too much of a disadvantage on levels below Transcend now.

I could have increased the costs even further but I avoided it so far, because then it would balloon the high-end tech costs on huge maps to very large proportions. How much do you think the Threshold of Transcendence tech should cost on standard maps for example?

1) I cycled through a few map generations with different settings just to test out your Worldbuilder update, and I'll probably reset it back to the original version. I imagine it does a great job of balancing faction starting locations, but it creates a world that looks too similar all over for my taste: large squarish blocks of land bolted on to other large squarish blocks of land. Archipelagos, peninsulas, isthmuses... these features help break up the monotony and make Planet feel like a planet, even if perhaps balance suffers for it.

Well, uh, if you like lots of small islands then it might not have been what you wanted. You can still use faction_placement regardless of WorldBuilder settings though.
Title: Re: SMACX Thinker Mod
Post by: ocelotter on October 05, 2019, 11:00:31 PM
I could have increased the costs even further but I avoided it so far, because then it would balloon the high-end tech costs on huge maps to very large proportions. How much do you think the Threshold of Transcendence tech should cost on standard maps for example?

I don't know, but at that point in my game I doubt any change in the cost of Threshold of Transcendence would have made any difference. Multiplying its cost twice or even thrice would just mean an extra turn or two while the AI did nothing.

I think it's probably worth investigating the total tech tree cost created by the original formula in the early (tiers 1-4?), mid (5-9?), and late game. In the early game, overall tech tree cost should be about the same as before, but with stronger differentiation between the tiers to discourage beelining for key techs. In the mid game, overall tech cost could inflate a bit to account for geometric inflation caused by lab facilities + free market + uncapped energy terraforming + social engineering. Non-researchers can still use probe teams to catch up, of course. In the late game, tech costs should probably be much higher than they are right now in both Thinker and the base game.

I don't know how easy it is to do, but it might be worth simulating an AI University/Consciousness playing through the game with and without Thinker, trying to match the pace of tech acquisition in the base game (original tech costs, bad AI) to the pace in Thinker (revised costs, good AI).

I do like the idea of using an analytic function to describe the costs per tier, but something less continuous might be a better fit for SMAC/X.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 06, 2019, 08:47:32 PM
I think it's probably worth investigating the total tech tree cost created by the original formula in the early (tiers 1-4?), mid (5-9?), and late game. In the early game, overall tech tree cost should be about the same as before, but with stronger differentiation between the tiers to discourage beelining for key techs. In the mid game, overall tech cost could inflate a bit to account for geometric inflation caused by lab facilities + free market + uncapped energy terraforming + social engineering.
Well, I agree with the basic premise here. Increasing the tech costs significantly from levels 4-5 onward is also a design goal here since many powerful items become available by then. But it does also matter how much the most advanced techs should cost since the tech tiers should form some kind of an intuitive continuum. Probably the highest-tier tech costs should be bumped beyond 10k even on standard maps anyway.

I don't know how easy it is to do, but it might be worth simulating an AI University/Consciousness playing through the game with and without Thinker, trying to match the pace of tech acquisition in the base game (original tech costs, bad AI) to the pace in Thinker (revised costs, good AI).
This one is really easy to do because you can run Thinker/non-Thinker AIs side-by-side with the factions_enabled setting. It does not affect tech costs though, to do that one would need to compile a slightly modified version of Thinker. I'm not providing an update with the new tech cost values just yet, but the consensus here seems to be that they should be increased.
Title: Re: SMACX Thinker Mod
Post by: ocelotter on October 07, 2019, 01:17:03 AM
Well, I successfully managed to get crushed by the AI in a game with completely different settings: smac_only=1,  revised_tech_cost=0, Transcend difficulty, small map, blind research on. The Spartans and Hive rapidly pincered me and cut me to pieces. So that's a good sign.

Does Thinker include scient's fix to the energy stockpile bug/exploit? I see it on the download page for scient's v2 patch (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=364) but not in the details for Thinker on github (https://github.com/induktio/thinker/blob/master/Details.md).
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 07, 2019, 07:55:43 AM
Is it feasible to expose in thinker.ini some exponential coefficient for tech costs calculated by standard algorithm (revised_tech_cost=0), based on number of accrued techs? So as users could experiment with the curvature.
Title: Re: SMACX Thinker Mod
Post by: ocelotter on October 07, 2019, 11:54:08 AM
nutrient_bonus seems potentially unreliable when used with the original Worldbuilder settings, unfortunately. Using nutrient_bonus=2 on a small map with 50-70% ocean, 4/7 factions started with zero bonus nutrients (first screenshot). The very next map gen (second screenshot), again 4/7 factions started with zero bonus nutrients (University started with one in the ocean I guess).



Title: Re: SMACX Thinker Mod
Post by: Induktio on October 08, 2019, 12:47:50 PM
> nutrient_bonus seems potentially unreliable when used with the original Worldbuilder settings

The main issue here is that a small map with high water content is really small. There won't be that many ideal spawn locations to choose from, although some adjustments might be made in the algorithm. Some factions just won't have enough room there.

I didn't quite get what PvtHudson was asking here. Do you want to see a table on how the tech costs change with the number of researched techs? It's possible to run some simulations with it by spawning the factions on a random standard map, then continuously marking one tech more researched and calling the original tech_rate function to see how the costs change. But there's probably some factors that are not taken into account in that test (number of turns elapsed etc).
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 09, 2019, 07:56:22 AM
I didn't quite get what PvtHudson was asking here. Do you want to see a table on how the tech costs change with the number of researched techs? It's possible to run some simulations with it by spawning the factions on a random standard map, then continuously marking one tech more researched and calling the original tech_rate function to see how the costs change. But there's probably some factors that are not taken into account in that test (number of turns elapsed etc).
I'd like not to see, but to have an ability to change costs returned by standard algorithm. So as each cost returned by standard algorithm is multiplied in game by the result of some_func(number_of_techs_known, some_coefficient_taken_from_ini), and the some_coefficient_taken_from_ini governed the curvature of some_func. This will allow to experiment with different speeds of tech cost rise.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 09, 2019, 09:00:34 PM
I'd like not to see, but to have an ability to change costs returned by standard algorithm. So as each cost returned by standard algorithm is multiplied in game by the result of some_func(number_of_techs_known, some_coefficient_taken_from_ini), and the some_coefficient_taken_from_ini governed the curvature of some_func. This will allow to experiment with different speeds of tech cost rise.

Well yeah, I suppose I could add some options to configure stuff like that. Let's assume the cost formula is something like x * Level^3 + y * Level. Those factors x and y could be read from the config file and I could add them to the next develop build for testing purposes. Changing the exponent value wouldn't be recommended though since it would have drastic implications towards the end of the tech tree.

I realized some of the difficulty scaling calculations were a little bit off in the current version so I'll adjust those too. In the original game at Transcend level, the first techs are roughly equally expensive for human/AIs but after that the AI gains up to a 50% discount for all techs. That's much bigger than the industry discount actually (30%).
Title: Re: SMACX Thinker Mod
Post by: PvtHudson on October 10, 2019, 08:35:08 AM
* Level
I'm not so sure the tech cost shall be based on level of the tech in question. Of course, this spawns issues with beelining. But it seems SMAC creators were much more concerned with preventing tech runaways. And it mostly works, except they hadn't envisioned the level of energy runaway players could accomplish.
I had adjusted (with the combination of alphax.txt/thinker.ini edits, starting conditions, and handicaps) my copy of ThinkerMod so that in almost every game tech parity with 1-2 top AIs continues well into and beyond quantum era, thanks to vastly different costs of the same techs for player and AI. Actually, I'm fairly satisfied with the behavior of standard tech cost algorithm (standard map, tech stag) except too costly early techs and too cheap late techs.
Hence I'd vote for adding means to adjust standard algorithm alongside with rewriting it completely.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 11, 2019, 06:40:53 PM
If SMAC creators were concerned about tech runaways, it certainly was not reflected in the tech cost mechanism. It doesn't really do anything to prevent those, more like it does the opposite. I put some thought into what could be with the old tech cost mechanism, but I don't see any meaningful way to adjust it without rewriting something.

The advantages of basing the costs on tech ranks are significant, and these kind of mechanics were incorporated into later Civ games too. In the vanilla game, the AI tech discounts are so large on higher levels that it's no wonder if it manages to keep tech parity most of the time. It doesn't really mean the tech cost mechanic "balanced" things in any way though. But I need to do a little bit more play testing before releasing the next build.
Title: Re: SMACX Thinker Mod
Post by: ocelotter on October 23, 2019, 12:17:20 AM
I've played more with Thinker, this time on Tiny maps, and have a bit more feedback. Non-default settings:

Transcend difficulty
directed research
iron man
base game Worldbuilder settings
revised_tech_cost=0
smac_only=1
nutrient_bonus=0
jungle=0

The first half of the last game I played as the Spartans was really tense and interesting. I hamstrung Morgan early and took most of his territory, but once war broke out with the Believers, things started to fall apart. They pressured me heavily for a long time, trading a few bases back and forth, and diplomacy with the other factions felt important to avoid elimination. Each turn had interesting problems, and since the map was so small, base/former micromanagement was not burdensome.

Unfortunately, once needlejets started to take over, the AI seemed to lose confidence in their ability to attack me. They got air power before me, and so even though I pretty quickly fortified my bases with AAA troops, they still should've been able to mount a strong offensive, or at least take out most of my formers/crawlers. I went back and checked a save (see the attached) from around this time, and you can see that Far Jericho is stacked with 12 missile needlejets; if you end the turn, they just fly them around between a couple of their bases, doing nothing unless one of my units enters their immediate vicinity.

Eventually I got copters, cleaned up the Believers (who seemed mostly helpless against them), and then the game gradually slipped away from the AI from there. The smaller AI factions mostly squabbled amongst themselves, despite clearly needing to gang up on myself or the Gaians to have a chance. The Gaians seemed to suffer from a similar air AI problem with handling interceptors, stacking them all in one out-of-the-way base where they couldn't protect any of their workers or bases.

So I think the AI needs improvement with handling air units to stand a chance in the mid game. At least with ground units they make aggressive moves, even if they often leave them vulnerable. Any offensive military unit that just sits around without attacking is an opportunity cost that drags the AI down.


I also noticed a few issues in the game that might be worth fixing, though they could be considered out of scope for this project:

1) The stockpile energy exploit is indeed in the game, I checked on some turn in the middle. I had hurried a bunch of facilities, and the next turn I ended up earning double my predicted income in credits due to the exploit, without even taking advantage of adding stockpile energy after unit production. I don't imagine the AI benefits from this, so this amounts to a substantial one-sided advantage for a human player, even one who isn't trying to use it. I think scient removed it from his patch because kyrub's fix had unintended consequences, but it's still worth fixing in my opinion.

2) I'm not sure if this is actually a bug or intended behavior, but it looks like interceptors still fight bombers with attack vs. attack when scrambling defensively, when it seems like it should be attack vs. armor. If this is "fixed", it might give needlejets and copters a bit more counterplay than there seems to be at the moment.


Questions about smac-in-smax:

1) If I add the Algorithmic Enhancement ability back in to the game in the smac alphax file, will the AI use it? Hunter-Seeker seems too strong in base SMAC.

2) Is there a way to add back in the SMAX alternative native units?
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on October 23, 2019, 08:12:53 AM
G'day. I've been playing a few games with this mod, trying it out with the SMAC and Sigma factions, and the improvement in the AI's performance is like night and day. Excellent work.

Other people have covered most of the issues I have, so I'll just mention a few.

There is a major bug in Thinker: the orbital attack view in F6 menu does not work properly. The faction and target selection appears normally, but when you press the "ATTACK" button, nothing happens - the code to process the attack doesn't get called. This is pretty bad when I have a force of planet busters ready and I want to take out my enemy's defense pods before I launch.
It's a simple workaround to just load the save in the default terranx.exe, make your attacks, and then switch back to Thinker, but having a vanilla mechanic be straight-up broken isn't great.
(Incidentally, it turns out that ODPs intercept PBs everywhere on the map, not just against the owner's units.)

Speaking of satellites, I've noticed in my games that only one AI tends to build them, both SMAC and Sigma. In my Sigma game, by 2289, Navarro had 10 of each, and Fedorov had only built a single ODP. They were both at war for most of the game, so it could be that Fedorov's build orders prioritized more units to defend himself.
Given that the AI benefits a lot more from satellites now due to having many bases, they really should build more.

Another thing the AI could do with is some better defenses. They already build a lot of sensors, AAA defenders, and some Aerospace Complexes; but not many of their bases had Perimeter Defenses, and they built zero Tachyon Fields despite having the tech for many turns. I think they should especially prioritize building the latter as they become available: they will help to blunt the impact of the player going all-out on the chop-and-drop.
(Ideally defenses would be buffed across the board, but that's out-of-scope for Thinker.)

Lastly: the AI does not react to an Economic Victory being triggered, making it simple to win just by hitting next turn 20 times (although Econ Victory is so painful that this will not be relevant very often). Both Navarro and Fedorov were building the Ascent to Transcendence, but it would have been trivial for me to stop them by nuking their bases.
They also had Planet Busters built, but never used them despite the charter being repealed. This may be a function of their aggressiveness settings (both had 0).
It would be nice if the AI could somehow adjust its tactics and strategy in response to these events. I'm not sure what rules should be used to make that happen, though. At the very least, it should attempt to nuke your HQ and/or project bases if it detects you are nearing victory (and, obviously, you are not pacted with them - treaty is debatable).

I realize this is a lot, so I just want to say thanks again for all your hard work. Thinker mod has really given new life to the game for me.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 26, 2019, 10:03:15 PM
Time to post a new develop build of Thinker (20191026) (https://github.com/induktio/thinker). Time allocation for this project vs. other stuff I've been doing has been problematic, but nevertheless today's update changes a couple of things:

* Fix long-standing bug where AI sometimes ignores undefended enemy bases next to them (reported by DrazharLn)
* AI should now rebuild HQs faster than was the case before
* revised_tech_cost values are increased from the previous version, difficulty scaling is also modified

For AI factions, each unit of cost_factor applies a 10% bonus/penalty. 10 = 100% of human cost on Talent/Librarian level.

For human factions, difficulty level applies a multiplicative modifier based on this list:
(click to show/hide)

The baseline tech cost function is also changed to the form: 3 * Level^3 + 117 * Level. All other modifers are applied on this number to determine the final tech cost. With these settings, AI bonuses shouldn't differ too much from the values in the vanilla tech cost formula.
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 26, 2019, 10:23:51 PM
> If I add the Algorithmic Enhancement ability back in to the game in the smac alphax file, will the AI use it? Hunter-Seeker seems too strong in base SMAC.

I can't say for certain without testing, but it might work. At least design_units planner will attempt to add the enhancement feature if it is just available.

> Is there a way to add back in the SMAX alternative native units?

That would require some kind of new binary patching, so it's not available for now.

> At least with ground units they make aggressive moves, even if they often leave them vulnerable.

That's great to hear. At least the AI is supposed to be making more attacks with the new land-based combat AI. But as you can imagine, air unit handling is still just the vanilla AI, so it is what it is. Some air units are just inherently overpowered when micromanaged properly, so in the end I'm not sure what could meaningfully be done there.

> There is a major bug in Thinker: the orbital attack view in F6 menu does not work properly.

I couldn't verify this bug at all. Is it maybe related to some game settings or maybe smac_only mode?

> Speaking of satellites, I've noticed in my games that only one AI tends to build them, both SMAC and Sigma.

That's also strange. Usually all of them should start building satellites as soon as they get the prerequisities, so not sure what might be happening there. Would need a save game to look at.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on October 27, 2019, 01:00:49 AM
>I couldn't verify this bug at all. Is it maybe related to some game settings or maybe smac_only mode?
I turned off smac_only mode, and I was indeed able to shoot down satellites again. Some sort of binary weirdness?

>That's also strange. Usually all of them should start building satellites as soon as they get the prerequisities, so not sure what might be happening there. Would need a save game to look at.
No problem. Here are all the saves I kept from that Sigma game. Uses the latest Sigma factions (included for completeness).
Navarro starts to build satellites sometime between 2240 and 2251. Fedorov built his single ODP around 2283 to 2286.
Mind you, those two were at war for almost the whole game...
Title: Re: SMACX Thinker Mod
Post by: tnevolin on October 29, 2019, 12:38:14 AM
Hi, Induktio.
Nice to see you are still on it and released new version while I was away.

Blunt question. Did you manage to encourage AI to equip units with Soporific Gas Pods?
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 29, 2019, 05:53:20 PM
> I turned off smac_only mode, and I was indeed able to shoot down satellites again. Some sort of binary weirdness?

Okay, this issue is confirmed now. Having smac_only enabled seems to break the orbital attack selection. Probably it's some kind of a binary issue since enabling that flag toggles a bunch of stuff in the binary. It's possible this issue has been discovered earlier since Yitzi et al. did some modding using this same flag to toggle the smac-in-smacx thing. Let me know if anyone has info on this.

> Navarro starts to build satellites sometime between 2240 and 2251. Fedorov built his single ODP around 2283 to 2286.

Not sure about this one. Having lots of wars with nearby neighbors might also mess up the build queues somewhat. In the previous version, the priorities were tweaked to emphasize unit production when there are enemies nearby.

> Blunt question. Did you manage to encourage AI to equip units with Soporific Gas Pods?

I haven't changed anything in that regard. Design_units planner will only create a couple of custom units which will not have that capability.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on October 29, 2019, 06:29:09 PM
> Blunt question. Did you manage to encourage AI to equip units with Soporific Gas Pods?

I haven't changed anything in that regard. Design_units planner will only create a couple of custom units which will not have that capability.

Pardon my ignorance in this area. Does AI design custom not predefined units at all? If so, how adding different abilities and other features is controlled in general? Is it just random or in response to the game state? Could it be that frequency of adding features is controlled by each feature individually? Like Soporific Gas Pods just turned out to be off all the time?
Title: Re: SMACX Thinker Mod
Post by: Induktio on October 30, 2019, 05:26:50 PM
> Does AI design custom not predefined units at all?

Eh? I mean it should be obviously visible the AI designs some custom units, when new garrison units and so forth appear on their prototype lists.

> If so, how adding different abilities and other features is controlled in general?

The game binary has its own complicated functions that decide what kind of prototypes are created. Apparently soporific gas pods and some other abilities are not on their list. Just to clarify, design_units is a completely separate feature from the game binary's prototype creator. It just creates a couple of extra prototypes that the vanilla binary does not do. If somebody wants to reverse how the vanilla binary designs the prototypes, then be my guest.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on October 31, 2019, 12:09:54 AM
Ah, one more thing I wanted to ask. Sorry, if I asked this already.

Did you tweaked unit cost calculation? There is one rule in unit cost calculation that sets attack value to 1/2 of armor value for cost calculation purposes only. I understand it stems from previous civilization versions where all defensive units have attack value at least half of their defense. I guess AC designers wanted to encourage players to follow the same unit design. However, cost formula multiplies attack and defense. Thus making defensive unit cost growing quadratically by its defensive value even if you don't invest in their attack value. And there is no way to make it less expensive!!! Whereas attack unit cost with minimal defense growths linearly proportionally to their attack value (as anyone would expect).

Would you mind dropping this rule if you are able and willing to? Thank you.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 01, 2019, 08:03:59 PM
Actually, Induktio,
I am up to modify in game unit cost calculator myself if you let me be a co-author. I can do it either in stand-alone fashion to provide you the modified code or you can share yours with me so I can build on top of it if you prefer this more. Either way I'm eager to contribute. In game cost calculator annoys me so much and long already that I don't see other choice to deal with is besides code modification.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 02, 2019, 10:32:22 AM
> Did you tweaked unit cost calculation?

I don't know if you had some reason to think there were some differences, but Thinker should not include any kind of changes to vanilla cost mechanics unless the documentation says so. For the most part, my priorities weren't in rebalancing existing mechanics since that tends to be an endless endeavor, and some players would not like to see the game diverge too much from the original settings.

> In game cost calculator annoys me so much and long already that I don't see other choice to deal with is besides code modification.

Have you looked at how the calculation works in the binary level? Using Scient's IDA database it seems there are mainly two functions dealing with this, consider_designs and proto_cost. They are very closely linked to another when the AI uses them to design units. Just saying I am not actively developing any changes to this part. I would say fixing the orbital attack bug would be a priority before next release, but dunno about adding any new stuff that requires extensive reverse engineering and then more testing to make sure it doesn't break any existing game logic.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 02, 2019, 03:07:14 PM
No worries. I won't include this logic into your mod if you don't like to. It this case I'll ask permission to fork your mod and add these changes on top of it. Or maybe I will be able to patch the original executable that your mod uses. Then there won't be need for forking. Don't know yet.

I don't understand "not altering game mechanics" while designing mod(ifications). You are altering something anyway. It may be not in line of your mod targeted changes, though. That's another story.

Thank you for sharing functions names.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 02, 2019, 04:19:22 PM
No worries. I won't include this logic into your mod if you don't like to. It this case I'll ask permission to fork your mod and add these changes on top of it. Or maybe I will be able to patch the original executable that your mod uses. Then there won't be need for forking. Don't know yet.

I think the word you're looking for here is "pull request". You might rebase the changes on top of the master branch and then submit a pull request. Something along the usual procedures for accepting external contributions on git projects. Then we can evaluate how it might work. I doubt you would want to maintain a fork of Thinker with divergent features over long term. And then any forks would have to be renamed to something else.

About patching the binary directly, it's a serious problem for maintenance and mostly unnecessary. Nobody wants to maintain patches that are described only on a binary level. For several releases now, Thnker has not featured any changes to the game binary because the patches are loaded dynamically at startup.
Title: Unit cost calculation formula
Post by: tnevolin on November 18, 2019, 02:31:50 PM
I am planning to mod unit cost calculation. Here is the formula I currently programmed. I focused mostly on chassis, weapon, armor, reactor involvement. Abilities were secondary concern. However, since I've rewrote a complete function I had to include them too.

Formula
==============================================================

UC = ([max(WC, AC) + (WC + AC)] / 2) * (CC / 2) * (1 + PAC / 4) + FAC

UC = unit cost
WC = weapon cost * reactor level (for weapons), module cost (for modules)
AC = armor cost * reactor level
CC = chassis cost, it is divided by 2 to allow 50% step increase in unit cost
PAC = proportional ability cost (positive ability cost value)
FAC = flat ability cost (negative ability cost value)

Title: Unit cost calculation formula - description
Post by: tnevolin on November 18, 2019, 02:32:47 PM
And here is the complete readme for the unit cost formula. Just in case anyone is asking questions.

Modification to SMACX unit cost calculation
==============================================================

Unit cost plays a role in economics of the war. However, slight modifications to unit cost does not change war outcome that much comparing to other factors like overall economics advantage, aliances, technology advantage, terrain, prepared defense, etc. Therefore, I din't bother balancing unit cost with utmost precision. Such fine grained tuning is not required. Rather I just fixed major SMAX unit cost problems by revising basic principles.

I based these principles mostly on Civ 1 and 2 unit pricing model since they seem to be quite nicely balanced already.

Chassis and movement speed
--------------------------------------------------------------

Movement speed privides two major advantages: shorter relocation time accross the globe and tactical advantage. With faster unit you have flexibility of choosing between attack/chase or retreat/escape. It also gives you longer reach range protecing more territory around your bases. All the above multiplies unit value regardless of its battle statistics (weapon and armor). Therefore, speed and chassis type should be a simple multiplier to unit value. The exact chassis value can be set in text configuration.

Weapon vs. armor cost
--------------------------------------------------------------

In Civ 1 offensive units are 50% stronger than same speed and cost defensive ones. That is probably because Civ 1 and 2 have large number of defensive bonuses starting from fortification - a free defense multiplier available for all units. Since SMACX doesn't have such bonus I propose to treat same weapon and armor values equally.

Technology advantage
--------------------------------------------------------------

Naturally attack and defense rating grows exponentially in such games so that each next gadget is proportionally stronger than its predecessor. Even when cost should follows the rating increase there is no strict need for it to grow equally fast. In fact, Civ 1 and 2 unit cost grows slightly slower than its strength. This pattern gives slight economical advantage to more advanced faction. In Civ 1 more advanced units have about 20% reduction in price. I think such reduction can be implemented by assigning costs to individual weapon and armor types. Such costs do not need to be equal to weapon/armor rating but can progress somewhat slower toward higher end of the spectrum.

Mixed units
--------------------------------------------------------------

Units fitted with both weapon and armor provide definitive tactical advantage. They are versatile and are more survivable then pure attackers and defenders. Obviously, they should be valued more than single purposed unit with same primary battle statistics. They should not be priced higher than combined price of two single purposed attacker and defender with same primary statistics. Otherwise, it would be cheaper to build single purposed units only as in vanilla SMACX. I decided to price them exactly half way between max(weapon value, armor value) and sum(weapon value, armor value). As I pointed earlier unit pricing fine tuning is not needed as long as it makes generic sense.

Reactor
--------------------------------------------------------------

Reactor increases unit attack and defense values proportionally. So it should do to the cost. Even proportionally more expensive stronger unit has an advantage due to increased survival rate and later healing.
Reactor should not increase cost of non combat moudles as they do not benefit from increased health.

Abilities
--------------------------------------------------------------

Some abilities normally improve battle statistics. Those should proportionally increase unit price as they are now. Others provide benefit unrelated to unit statictics and should be priced flat. I'll implement those as negative values.

Formula
==============================================================

UC = ([max(WC, AC) + (WC + AC)] / 2) * (CC / 2) * (1 + PAC / 4) + FAC

UC = unit cost
WC = weapon cost * reactor level (for weapons), module cost (for modules)
AC = armor cost * reactor level
CC = chassis cost, it is divided by 2 to allow 50% step increase in unit cost
PAC = proportional ability cost (positive ability cost value)
FAC = flat ability cost (negative ability cost value)

Unanswered questions
--------------------------------------------------------------

Any special treatment of chassis for speicial units: colonies, formers, supply, probe. They all have different usage and differently benefit from chassis speed. Should their speeder version be more expensive than infantry? Should their foil version be same as infantry or more expensive?
This is all very subjective and can be done either way without much game impact. However, there is still small impact on playing style and tactics.

I personally don't see point in pricing worker vehicles (colony, former, supply) sea versions higher than their land counterparts. What significant point does it achieves? Naturally land bases build land units and sea bases build sea units. It is not like there is much choice. Therefore, such units are not directly comparable and should not be priced differently. I'd say foil units at sea are same as infantry on land. Whereas cruiser units should be logically priced higher. Same way as speeder units do comparing to infantry.

Moreover, generally I think we should not increase unit cost without compelling reason. Otherwise, game becomes unit poor and, therefore, tactically poor as well.

Probe teams are special case. Their speed is an important quality that factors into their primary performance rate. That is why they are created on speeder chassis by default. Does it make sense to create infantry probe teams for defensive purposes? Should it be cheaper? What about foil probe team - should it be priced same as speeder or infantry one?

Title: Unit cost calculation formula - abilities
Post by: tnevolin on November 18, 2019, 02:51:16 PM
Yitzi introduced different formulas for abilities as proportions between different statistics. Personally, I don't believe we should go into such complication as exceptionally fine tuning game parameters is not needed. It is much better to give player a clear and uncomplicated picture of rules and let them decide what is good for them.
I prefer to keep either a vanilla simple cost multiplier only or to add a flat row cost as an additional option. However, I am open for discussion and ready to listen to opinions if any.
Title: Re: SMACX Thinker Mod
Post by: T-hawk on November 18, 2019, 03:52:56 PM
Sea units do cost more for significant reasons.  A base founded by a sea colony pod includes a pressure dome facility for free, which counts as recycling tanks for 1-1-1 production.  A sea former is more productive than a land former, both because it doesn't consume a turn moving into a new space, and because sea improvements (kelp and tidals) yield more per former-turn of labor than equivalent land improvements.  A sea crawler is slightly better than a land one also because of the mobility, in consuming fewer turns of movement to reach the tile it wants.  Same goes for sea probe teams; they are more similar to a rover-chassis land probe, because the movement allows the capability to threaten multiple cities at once.

I don't really have any overall opinion on redesigning unit costs, but that's one point to make.  Oh, one more point: upgrading is a factor for high weapon/armor units.  You can't price them too high, or it becomes more cost-efficient to build cheap basic unit shells and upgrade them instead.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 19, 2019, 12:01:38 AM
Sea vs. land is heavily opinionated discussion. That is why I welcome different opinions and thank you for expressing them. Even if we cannot prove anything we can at least build something that most people would like.

So you believe foil units should be priced similar to speeder one? That makes sense to me on some accounts. In my mod I price speeder units 50% more than infantry ones. Let's see how does it turn out for foil units if I price them same as speeder based units.

Colony
In my mod I set colony cost to 6 to reduce infinite colony spawn exploit.
infantry: 6, speeder: 9, foil: 9
Generally I agree with you that sea colony should be more expensive than land one. Is 3 rows of minerals too much a difference for you? I think I can live with that.

Former
infantry: 2, speeder: 3, foil: 3
Fine with me. They are very cheap. Nobody will notice the difference.

Supply transport
In my mod I set supply cost to 8 to reduce supply spawning a little.
infantry: 8, speeder: 12, foil:12
I don't think I agree on higher priced foil supply. Yes, it is faster but once it reaches the destination it just sits there for eternity. Moreover, sea mineral squares are usually poorer than land ones. You can build enormous amount of mines on land and create the huge supply of minerals without any spare resources. Nothing like this is possible on sea.
For me foil supply is kinda correspond to infantry one, not the speeder one. That is actually why there is no much sense in building speeder supplies at all.

Probe
In my mod I set probe equipment cost to 4 to reduce probe spawning by AI.
infantry: 4, speeder: 6, foil: 6
Makes sense to me. One can as well build cheaper probe teams for defense purposes.

Combat units
Sea units meet land units only attacking ports. They mostly fight with each other. Considering that base foil cost makes no difference when you compare sea units with sea units. They just will be all proportionally cheaper or expensive.
In my mod mixed unit (with both high weapon and armor) is 50% more expensive than single purposed one. Sea units are usually mixed (fully armored). If we also increase foil cost by 50% comparing to infantry than fully armored foil would cost twice more than pure infantry defender in port. That is a huge disadvantage for attacking ports with sea units comparing to attacking land bases with land units. Although, sea bases do not benefit from sensor which equalize above disadvantage a little. Besides, sea bases are more vulnerable to sudden attack. There are no ZOC there.
Overall I agree that sea combat units should be more expensive.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 21, 2019, 08:54:44 PM
Based on above discussion I plan to do just one change: price foil supply as if it had infantry chassis, price cruiser supply as if it had speeder chassis. Not that anyone would want to build speeder and cruiser supplies for harvesting but they can build them for project building since they are more expensive and faster.
Title: Reactor
Post by: tnevolin on November 22, 2019, 02:04:05 AM
I found where the reactor level is used to check whether unit lost all HP during the battle. The code uses reactor id/level directly, not the value. Then it multiplies it by 10 inline constant. This is completely hardcoded. There is no any function or configuration variable to modify - only the code itself. Even though, I think I can track all usages of this and still modify inline.

Modding wise, I also think it may be possible to 1) set the reactor value, not the level to the prototype reactor field and 2) use this reactor value as a direct amount of HP without any transformation and use it in the code like that.
This way anyone can just put an amount of HP per reactor right in the text configuration and be done with reactor imbalance nightmare.

Other reactor use such as needlejet extra range or planet buster blast radius can be left intact. They have pretty interesting uses and do not break game that much.
Title: Reactor value
Post by: tnevolin on November 22, 2019, 02:33:33 AM
Now why do I bother with reactor HP value since I've factored it into unit cost already thus fixing infamous reactor game break? Well, now when I made unit cost proportional to its health, I am thinking - whether I actually need to quadruple both health and the cost by the end of the game. Top level units already cost like 200-300 there is no need to raise it significantly any more. So I was thinking to give each reactor a health boost but not too big. Maybe by 10-20% for every level?
Now if the health increase is not that big, would it make sense not to increase price as well. That effectively makes reactor upgrade an improvement. However, 10-20% improvement is something worth putting on single technology without breaking unit effectiveness progression too much. What do you think, guys?
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 23, 2019, 06:08:43 PM
I've analyzed reactor usage in the code and it looks pretty gloomy. There are hundred places where unit reactor power is used and all for different reasons. Some just multiply it by 10 to get the total health, I guess. However, other usages are completely different. They may use reactor power directly comparing it to something, like detecting whether unit uses Fusion reactor or above. Others involve it in some unclear math.
A lot of algorithms tied to reactor like collateral damage adding percentage of health, native combat ignoring armor, etc. Don't want to disturb all this machinery.
Title: Reactor value
Post by: tnevolin on November 23, 2019, 09:31:21 PM
I think I came up with a compromise. Let reactor increase health as they do now and increase cost gradually slower so that fitting units with new reactor is economically beneficial but not that insanely by much as in vanilla to break the progression. I've build a scale where each following reactor drops effective cost by 20%. That is each following reactor health/cost ratio is only 80% of its predecessor.

REACTORS
Fission: 10 health, cost*1.0
Fusion: 20 health, cost*1.6
Quantum: 30 health, cost*1.9
Singularity: 40 health, cost*2.0

Along with decelerated item cost progression it makes late game units 4 times as less expensive comparing to 1:1 item and reactor cost. For example, 30-1-1*4 infantry would cost 30*4=120 rows of minerals with 1:1 cost model and only about 30 rows with decelerated cost model. Which is pretty affordable for late game bases with ~50 mineral production. After all one have to pay for better unit and with decelerated model higher end items are still more beneficial to use.

Here is my weapon and armor progression list for completeness sake
#WEAPONS
Hand Weapons,         Gun,            1, 0, 1, -1, None,
Laser,                Laser,          2, 0, 2, -1, Physic,
Particle Impactor,    Impact,         4, 0, 3, -1, Chaos,
Gatling Laser,        Gatling,        5, 1, 4, -1, Super,
Missile Launcher,     Missile,        6, 2, 5, -1, Fossil,
Chaos Gun,            Chaos,          8, 0, 6, -1, String,
Fusion Laser,         Fusion,        10, 1, 7, -1, SupLube,
Tachyon Bolt,         Tachyon,       12, 1, 8, -1, Unified,
Plasma Shard,         Fusion,        14, 2, 9, -1, Subat,
Quantum Laser,        Quantum,       16, 1,10, -1, QuanMac,
Graviton Gun,         Graviton,      20, 0,12, -1, AGrav,
Singularity Laser,    Singularity,   24, 1,14, -1, ConSing,
String Disruptor,     String,        28, 1,16, -1, BFG9000,
#DEFENSES
No Armor,            Scout,       2, 0, 1, None,
Synthmetal Armor,    Synthmetal,  3, 0, 2, Indust,
Plasma Steel Armor,  Plasma,      4, 2, 3, Chemist,
Silksteel Armor,     Silksteel,   5, 1, 4, Alloys,
Photon Wall,         Photon,      6, 1, 5, DocSec,
Probability Sheath,  Probability, 8, 2, 6, ProbMec,
Neutronium Armor,    Neutronium, 12, 1, 8, MatComp,
Antimatter Plate,    Antimatter, 16, 2,10, NanEdit,
Stasis Generator,    Stasis,     24, 2,14, TempMec,

As you can see even though item strength growth exponentially, cost is not that much. The most expensive weapon is only 16 comparing to 30 in vanilla.

Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 23, 2019, 09:42:46 PM
Another possible adjustment to unit cost may involve reducing number of item ratings. Many people say that SMACX has too many combat items. They keep popping up so frequent during the game that about half of weapon/armor items are never prototyped and used due to lack of time and opportunity. Civ 2 managed to build quite balanced unit set with only 9 distinct attack values ranged 1-12: 1, 2, 3, 4, 5, 6, 8, 10, 12. I don't count values 14 and 16 as they are are used by single special units only (stealth bomber and cruise missile). If we would limit SMAX weapon and armor values to 12 max, that would make higher end unit cost somewhere ~10 rows (~20 with best reactor). It would be absolutely no problem to build such units by the end of the game.
I don't think it make sense to go this path, though. We have what we have and downsizing our weapon inventory by 2/3 doesn't change game flow too much. Although, I'm open for suggestions there.
Title: Re: SMACX Thinker Mod
Post by: Induktio on November 24, 2019, 07:20:04 PM
Hmm ok. One of the main things to note here is that modifying reactor hit point values was already mentioned in Details.md, in the sense that those values are hardcoded in so many places in the game binary I would seriously discourage anyone from attempting to patch them.

Other than that, if you want to keep adjusting this mod further, it's possible to later squash the items to one commit and merge it to the main branch. But there's a couple of style issues in the code I would adjust to keep it consistent with Thinker. Also I think these changes are extensive enough that they should be opt-in from the config file and a separate alphax.txt could be shipped for them. It's just that Thinker generally tries to avoid changing game mechanic formulas.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on November 30, 2019, 10:45:01 PM
Something is going on with prototype cost when you use ability. I don't know if it is your code or remnant of something Yitzi did but it does not add up. I tried freshly installed Thinker 0.7.

560 * 1.5 = 840 and not 750 as on the picture.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 06, 2019, 01:23:52 AM
I am playing your mod with my text changes on top of it. Research pace feels much much faster than in vanilla. I doubt this is my changes as I am just rearranging things a little and actually increasing cost of formers and colonies. Yet I need to turn research speed down to 50% and even then I feel like everybody are exchanging technologies at incredible speed.
Did you notice anything like that in your mod? If so, how do you cope with it?
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 10, 2019, 01:47:52 AM
What is your revised_tech_cost for? It doesn't seem to affect a sequence in which technologies are picked by AI. True that in this sequence higher leveled technologies will take somewhat longer to research. However, if you keep the total tech tree research cost the same then it also doesn't change research pace on large scale either.
Title: Re: SMACX Thinker Mod
Post by: dino on December 10, 2019, 07:44:05 PM
Maybe I shouldn't, but I'll try to answer for him.

It's supposed to remove the cheese of gaining an advantage, by avoiding to trade techs, in order to keep the cost of essential tech you are beelining toward low.
Also an annoynce of picking some currently unnecessary tech from a pod.

The other goal was to make late game techs cost rise much faster to keep up with the development speed of competent player/ improved AI and prolong the late game, without changing the pace of early game research much. It's the first time Induct0 dabbed into changing gameplay mechanics, since he improved AI enough for it to become even more noticeable problem, than in vanilla game. It's also the first attempt, you can play with the source and try to find a better balance.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 10, 2019, 08:21:46 PM
Maybe I shouldn't, but I'll try to answer for him.

You definitely should. That is why I posted it on a forum to solicit opinions.
:D

It's supposed to remove the cheese of gaining an advantage, by avoiding to trade techs, in order to keep the cost of essential tech you are beelining toward low.

Sorry, I do not follow.
What is "remove the cheese of gaining an advantage"? Isn't the advantage what everyone wants? Why remove the cheese? Why do we want to avoid trading techs?
How does it keep the cost of essential tech you are beelining toward low when it penalizes higher level techs??? I think it does the opposite and keeps the cost of lowest techs low = penalizes beelining.

Also an annoynce of picking some currently unnecessary tech from a pod.

I may have gap in my knowledge but I am unaware of how pod tech selection relates to researched cost. The pod tech has no any research cost associated with it - you get it for free.

The other goal was to make late game techs cost rise much faster to keep up with the development speed of competent player/ improved AI and prolong the late game, without changing the pace of early game research much. It's the first time Induct0 dabbed into changing gameplay mechanics, since he improved AI enough for it to become even more noticeable problem, than in vanilla game. It's also the first attempt, you can play with the source and try to find a better balance.

I am explaining exactly this thing in my post that you are replayed to.
Mere reassigning existing research cost from higher level techs to lower level techs does not change research pace as long as it maintains same total research cost and same acceleration rate as in vanilla. It doesn't even alter research pace on average in each historical period. Everything it does is generating local research cost fluctuations depending on whether you pick slightly higher level or slightly lower level tech for current research. The average cost of researching 10 technologies stays the same.

Now. Please don't engage into exact math proving contest. I do not care if my math above is exact but it is somewhere in the ballpark. I would discourage any change that fails to deliver a clear an unambiguous understanding for all players. Even those with basic math level. The feature we are currently discussing is not.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 10, 2019, 09:02:56 PM
I agree with the problem statement. Yes, it is quite noticeable that early game research rate stays somewhere at 20 turns/tech after you pick few very cheap initial technologies. Middle game pace varies in range of 4-10 turns/tech. Whereas very late game gives 2-3 techs a turn!

I do not agree that beelining is a problem and should be penalized. However, this is completely different statement and should be discussed and fixed separately if at all.

Obviously, research rate doesn't match the contemporary civilization research power. By itself it does not break the game as it applies fro all factions equally. However, it is inconvenient from strategy planning point of view. Waiting 20 turns for tech to research is as frustrating as getting a rain of them. Either extreme defeats the feeling of research direction control.

Logically the fix is straightforward. Match the rate that is currently unmatched. One way to do it is to make growth more exponential looking: slower in the beginning, much faster at the end.

Current game formula is very convoluted. It is more convoluted by using different formula elements for human and AI.
http://alphacentauri2.info/wiki/Technology_Cost
http://alphacentauri2.info/index.php?topic=3505.0

For starter I don't see a point in "add 1 for factions with a natural penalty to research, or subtract 1 for factions with a natural bonus to research" step. There is already RESEARCH SE scale that does this. No need for additional hidden value.

Then the "Modify by WORLDSIZE" notorious problem. The world size does not scale your civilization. It limits it. So it should put more cost on latest technologies when you are utilizing whole map surface but it shouldn't affect initial research cost when your civilization is as small as on any other map size.

What is "faction tech cost modifier"? Never heard of such.

Prevalent factors are number of techs faction researched already plus small discount if faction is behind. It seems that linear dependency on TECHS is the root of evil here. It does block research quickly at the beginning and doesn't block them enough at the end. Game designer overlooked obvious exponential empire growth. It is actually double exponential: both in number of bases and base sizes dimensions but whatever.
I'd suggest to replace it with exponential growth formula. Say each following tech is 7% more expensive. That doubles the cost every 10 techs and increases ~400 times for the last tech. Giving that you starts with 4 working squares (2 bases * 2 square) and end up with 400 working squares (40 bases * 10 squares) * 3 for improved terraforming and facilities * 2 for multiplying facilities = 2400 / 4 = 600 times bigger research contribution. That seems like a match.
Of course, it takes few tweaks like bonuses for those fell behind, etc. However, I don't want to add obscure bonuses for AI vs. human - AI is already very nicely tuned by growth and production multipliers.
Title: Re: SMACX Thinker Mod
Post by: dino on December 10, 2019, 09:34:30 PM
In vanilla game the tech cost is based on the number of techs known, so you avoid trading the techs until you get the essential ones you need, so you keep the research cost low and can get these essential techs much faster, than AI which can't purposefully avoid trading could. The new formula makes tech cost static (except for first 10 techs, due to early game balance issues ). So gaining a new tech from trade, or any other mean is never a disadvantage. It's also the way it works in later Civ games, it's more realistic for sure, whether realistic is better is another question. On one hand it prevents mentioned cheese/exploit and has more versimilitude to it, on the other it penalizes beelining deep into the tree, limiting viable player options.

In a discussion before this feature was implemented, the main stated goal of the feature was to make late game techs much more expensive than vanilla, to keep up with exponential growth of energy income of competent player, or improved AI, while not fundamentally changing the pace of early and mid game research.

Now, I've never analysed the new formula mathematicaly and played only some early games with it.
From what you are saying, it seems that Inducti0 in the first revision of the feature, implemented only static, tech tree level based cost, while keeping the general cost curve close to vanilla.
He probably was going to play with the tech cost curve itself in the next release, but was distracted with his other projects, or work and didn't get around doing it.
Last time he talked about the feature in this thread, he asked for a feedback and shared how he thinks the curve should be adjusted.

Since the feature is implemented and we have the source code, anyone can play with it and try to find a satysfying solution.
You could even get rid of the static tree level based cost and only change the cost curve if you wanted.

> What is "faction tech cost modifier"? Never heard of such.

I think it's a trait you can give a faction in the editor/ txt file, none of the vanilla factions uses it, there are few more functional, but unused by vanilla factions traits.
Title: Re: SMACX Thinker Mod
Post by: dino on December 10, 2019, 09:46:10 PM
I agree that this feature is not in a satysfying state and I agree with your complaints about it's current state.
I thought you could be the right person to make it work, this is why I mentioned it in the other thread.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 11, 2019, 12:11:15 AM
Good point about trading hold off exploit. I agree setting fixed price for each tech would solve it and makes it easy for everybody.

So we have two fixes:
1. Fix technology cost.
2. Adjust cost growth to match economical progress.

#1 Can be done arbitrarily. It doesn't much matter as long as they are reflecting how far the technology down the tree. Level based is a simplest and most visual idea.
#2 I think exponential approach is the easiest. It does fix both initial technologies and late game ones. We just need two parameters: initial cost and multiplier.

Inductio already started working on it. I don't want to tamper with it until he finishes. He may be in the middle of it. Then I can see if I can tweak his parameters.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 11, 2019, 01:52:33 AM
Here is the sample tech cost graph assuming everything goes smoothly: 400 turns for 85 techs, everybody has same number of techs, etc. It varies very slightly with parameters but mostly stay the same. Apparently it is practically linear, which is exceptionally incorrect design for 4X game.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 11, 2019, 02:11:57 AM
And here is the simulation of what happens when labs grow exponentially, research cost as in previous post and all research got discovered by 270 turn something. I don't think the exact year matters it is just an illustration how vanilla research cost formula deals with exponential labs growth.

Clearly there is a plateau in first third of the game and surge in the last.

----------------------------

Below are slightly more accurate simulation. Standard map. This time I assume sigmoidal number of bases growth from 2 to 15 in the turn 150 and then to 30 in turn 300. Average number of worked tiles per base grows from 2 to 10 in a turn 300 linearly. Average labs yield per tile grows from 0.5 (1 energy per tile * 50% allocation) to ~9 in turn 300 (4 energy/tile * 50% allocation * 3.5 multiplier * some RESEARCH bonuses).

It is more linear. Still the first third slowness is there.

----------------------------

However, keep in mind these are some math simulation only. Could be far off the real game. For example, the labs growth in the very beginning when you only explore, don't have third base yet and don't have Ecological Engineering is practically zero.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 12, 2019, 07:17:08 PM
I agree that this feature is not in a satysfying state and I agree with your complaints about it's current state.
I thought you could be the right person to make it work, this is why I mentioned it in the other thread.


First of all, see my elaboration of tech cost here http://alphacentauri2.info/index.php?topic=21359.msg122661#msg122661.

About forcing blind research engine to pick lower level techs first. I don't think it is even a problem. What's wrong with getting better tech by all means possible? If you are so afraid to give up advanced technologies then just forbid it on engine level and be done with it. Of course, this would kill a strategical research element of the game but now everybody are equal - complete balance.
:)

For AI to miss an important low level techs in blind research is another question. I agree this is an AI related problem. However, it is there not because higher level techs are better but merely because blind research is presented with multiple opportunities and not always pick the best choice. That is extremely easy to fix. Just give best technologies best weights (in all domains) and be done with it. Now when such technology appears it'll be chosen automatically by blind research engine. That is what weights are for.
In my mod I did exactly same and then emulated random research progress to assure best technologies are selected first.
Title: Re: SMACX Thinker Mod
Post by: Induktio on December 12, 2019, 08:05:15 PM
Thinker version 1.0 is now available from downloads (https://github.com/induktio/thinker). Releasing this version was important to update the documentation to keep up with the changes in develop builds. Here's the changelog since the last release:

* SMAC in SMACX mod files are now included with Thinker by default (can be enabled with smac_only=1)
* Removed smac_only dependency for ac_mod/labels.txt (redundant file for the mod)
* Factions with positive Planet rating will build less boreholes than the average
* Adjust tech_balance feature to also prioritize probe team prerequisite tech
* AI should relocate lost HQs faster than previously
* New option: revised_tech_cost provides an extensive overhaul for the research cost mechanics. More info in Details.md.
* New option: expansion_factor limits how many bases the AI will attempt to build before stopping expansion entirely
* New option: limit_project_start determines how soon the AIs are allowed to start secret projects
* Fix issue where AI sometimes ignored undefended enemy bases when it had the chance to capture them

I don't currently have much plans to keep on adding more features on this mod. Of course, tnevolin is welcome to keep on developing his fork of this mod. I don't know if I can merge all of that stuff though if it changes game mechanics in a really extensive way and does not have configuration options. But maintaining a separate fork should not be problematic at all if the upstream release is mostly static.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 12, 2019, 08:11:10 PM
* Factions with positive Planet rating will build less boreholes than the average

AI factions?
Do you count current PLANET rating = innate + SE? If so, does it mean when faction chooses specific SM to increase their PLANET rating it actually program itself to build less boreholes?

Stupid question.
How does this improve this specific faction AI? Isn't it a drawback?
Title: Re: SMACX Thinker Mod
Post by: Induktio on December 12, 2019, 08:21:45 PM
AI factions?
Do you count current PLANET rating = innate + SE? If so, does it mean when faction chooses specific SM to increase their PLANET rating it actually program itself to build less boreholes?

Only the Planet rating defined in the faction's txt file is considered for this. SE choices are ignored. And yes, it only applies on the AI factions. Reasons for this were discussed in earlier pages of this thread, it's there for the purpose of narrative.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 12, 2019, 11:52:38 PM
Bug?

Ctlr-Shift-Q starts new game in vanilla. It quits in Thinker.
Title: Re: SMACX Thinker Mod
Post by: dino on December 13, 2019, 10:44:13 AM
Why would thinker had anything to do with it ? Maybe PRACX ?

Just tried and Ctlr-Shift-Q quits to the main menu, Ctlr-Q quits to desktop, was it any different in vanilla ?
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 13, 2019, 01:16:43 PM
I have no clue who has what do with anything. Just reporting.

Did you try Ctlr-Shift-Q in Thinker? Do you have PRACX or anything else installed?
Title: Re: SMACX Thinker Mod
Post by: dino on December 13, 2019, 02:47:49 PM
Vanilla and thinker, both with, or without pracx, behave the same for me, as I described.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 13, 2019, 03:06:49 PM
Thanks for verification. I'll test some more.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 13, 2019, 06:09:31 PM
Induktio,
Looking at you tech cost formula in latest build. Have you compared its progression to vanilla? I mean, of course, you'll have differences within a level as you price them flat while in vanilla they are progressing costs. However, if you average vanilla costs per level - does it become close to yours? If not what are most noticeable differences? Are these difference intended?
Title: Re: SMACX Thinker Mod
Post by: dino on December 16, 2019, 12:01:13 AM
I was thinking about the enemy territory monopole magnets and you should definitely try to implement your idea, if you find the time.
From a versimilitude point of view, you shouldn't be able to drive on enemy magnets since defender would just cut off the power, or sabotage it, roads should be usable.

Player can easily concentrate defenses in endangered bases, but you won't be able to make AI recognise incoming invasion.
If you prevent player from snowballing within a single turn through AI territory, it'll have a chance to quickly move units toward invading forces and reinforce neighboring bases.
I don't think AI will be capable of any serious resistance against competent player without this change, but you know this, this is why you've started to think about it in the first place.
Title: Re: SMACX Thinker Mod
Post by: Induktio on December 16, 2019, 04:43:37 PM
> I was thinking about the enemy territory monopole magnets and you should definitely try to implement your idea, if you find the time.

That is kinda undecided. It's maybe not the most important rule change, but might be useful. In any case I think magtube deployment greatly favors human players when they can strategize how to work around pathfinding issues and utilize various chokepoints. That's why Thinker AI's don't even build magtubes because it might just make conquest easier for humans. And magtubes should be located towards the end of the tech tree for balance anyway.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on December 16, 2019, 04:52:55 PM
AI doesn't build magtubes? You mean on purpose? Interesting.
Title: Re: SMACX Thinker Mod
Post by: dino on December 16, 2019, 05:51:05 PM
> That's why Thinker AI's don't even build magtubes because it might just make conquest easier for humans.

But while player can easily predict an attack direction and concentrate forces there, or reinforce defenses/retaliate within a single turn with his magtubes network, AI can't and is easy to divide and conquer.
If it had full magtubes network, but it would be impossible to use magtubes on the enemy territory, it would also be able quickly respond to an attack without exposing itself.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on January 11, 2020, 12:46:43 AM
Have you fixed the Children Creche morale mess? Or include any path that does?
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 25, 2020, 09:55:10 PM
Apparently there haven't been many bug reports since the release which is a good thing. The main unresolved issue there related to the satellite bug which only happens while smac_only is active. Anyways if there's some new issues that aren't related to features in the forked version, it can be still posted here. I haven't changed Children's Creche behaviour in any way.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on February 25, 2020, 10:58:03 PM
I did in my mod.
Title: Re: SMACX Thinker Mod
Post by: MercantileInterest on February 26, 2020, 08:56:21 PM
Induktio, will Scient's open source mod work with Thinker?
Title: Re: SMACX Thinker Mod
Post by: Induktio on February 27, 2020, 11:58:00 AM
> will Scient's open source mod work with Thinker?

I think it would require some more development to get them working simultaneously. I haven't monitored closely what changes have been made in OpenSMACX so it's hard to say exactly. The difficulty here comes from the fact that both mods have to patch the binary in their own ways, so I'm not sure about the incompabilities at the moment.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on March 07, 2020, 07:42:51 PM
Hey just wanted to say your mod rocks. I recently reinstalled SMAX on a whim from my original CDs and Thinker has really been keeping things fresh and interesting.
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 10, 2020, 06:26:25 PM
Nice to know! You're welcome to post on this forum any stories or screenshots about the gameplay too.
Title: Re: SMACX Thinker Mod
Post by: Buster's Uncle on March 10, 2020, 06:50:59 PM
The Management enthusiastically agrees...
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on March 22, 2020, 05:51:23 AM
Hi there.

My friend Nevill and I have been playing another PBEM game with the Thinker AI over the past few months, testing out some custom factions, tech trees, and SE settings. Almost everyone ended up on their own island, so the AI hasn't really been given a chance to shine. Ah well.

We've had a few strange occurrences with techcosts. The first one occurred in 2150, when I was researching Doctrine:Loyalty (C2), and the techcost suddenly jumped from 143 to 367.

The second one happened just now, around 2208. Both of us were researching Planetary Econ (B6), but my techcost was 683 and Nevill's was 1215. This is somewhat unbalancing to say the least.

We're not really sure what could possibly cause this. The only factors which come to mind are my +5 EFFIC and +4 RESEARCH score, and my faction having +1 labs per base (the RESEARCH rule in Faction.txt).

Saves and custom files are available if needed.
Title: Re: SMACX Thinker Mod
Post by: Hans Lemurson on March 23, 2020, 05:54:31 AM
I've been playing a game on Transcend as the Morganites, and have been enjoying the challenge of the other AI's actually developing past me (with one exception).  I got lucky starting out with a large continent to myself, with a nearby Manifold that allowed me to capture enough mindworms to survive.  I've had to avoid Free-Market because I can't risk the wrath of the nearby Gaians who have taken much of my coastline, so I may have to stay Green this run.

The one AI that has done very poorly this game was the Free Drones.  They started on their own small island, but have stopped settling it after two cities (it could hold 4), and haven't set foot on another continent or even made any sea-settlements.
(http://)

The University has similarly given up settling their land.  After losing a city to a mind-worm attack, the northern half of their land has just been left alone as a wasteland of fungus while they churn out sea-colonies.  Their many sea-colonies and their lucky city built in the middle of the Monolith Ring have prevented them from falling into obscurity, but they have a big chunk of un-used land.  Even the Pirates have more land colonies than they do!

I've attached my save-game if you're interested in taking a look at the world.  I'm playing with Thinker_v1.0 and PracX 1.11 (in case that matters)
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 24, 2020, 10:01:38 AM
> My friend Nevill and I have been playing another PBEM game with the Thinker AI over the past few months, testing out some custom factions, tech trees, and SE settings. Almost everyone ended up on their own island, so the AI hasn't really been given a chance to shine. Ah well.

Very good to hear reports about PBEM play too. It's one of the least tested game modes here I think.

> We've had a few strange occurrences with techcosts. The first one occurred in 2150, when I was researching Doctrine:Loyalty (C2), and the techcost suddenly jumped from 143 to 367.
> The second one happened just now, around 2208. Both of us were researching Planetary Econ (B6), but my techcost was 683 and Nevill's was 1215. This is somewhat unbalancing to say the least.
> We're not really sure what could possibly cause this. The only factors which come to mind are my +5 EFFIC and +4 RESEARCH score, and my faction having +1 labs per base (the RESEARCH rule in Faction.txt).

As far as I know, the formula that I've presented in Details.md should accurately reflect the new tech cost code. You didn't mention what SE RESEARCH modifier Nevill had. Having +4 SE RESEARCH applies a 40% discount over the default cost, per original game rules. The difference in that modifier doesn't fully explain 683 and 1215 costs, so there's some additional modifier at work here, but I'm not sure which one.

Personally I think research modifier is overpowered especially when combined high efficiency. It could have been easily nerfed to a 7% discount per point or similar, but I didn't want to go on overwriting original game rules to such an extent. I only refer here to the social engineering research variable, not this one:

> RESEARCH    = Free research points per base per turn.

Free research points should not have any kind of impact in the tech costs in this new formula. Neither does the EFFIC rating.

When you say "the techcost suddenly jumped from 143 to 367" what was the tech you were trying to research previously? Just remember that all the modifiers in Details.md are multiplicative, so sometimes there might be large jumps in tech costs. But then again, the cost should immediately be updated if you decide to switch research target (directed research only?)

Title: Re: SMACX Thinker Mod
Post by: Induktio on March 24, 2020, 10:20:44 AM
I've been playing a game on Transcend as the Morganites, and have been enjoying the challenge of the other AI's actually developing past me (with one exception).  I got lucky starting out with a large continent to myself, with a nearby Manifold that allowed me to capture enough mindworms to survive.  I've had to avoid Free-Market because I can't risk the wrath of the nearby Gaians who have taken much of my coastline, so I may have to stay Green this run.

The one AI that has done very poorly this game was the Free Drones.  They started on their own small island, but have stopped settling it after two cities (it could hold 4), and haven't set foot on another continent or even made any sea-settlements.

Nice to see a couple of the AIs developing so well that they can match the player in research speed too. Even though Pirates start on the ocean, this game display their amphibious colonization ability as well. Needless to say, stock AI doesn't understand that strategy AT ALL.

Overall I think this is about the expected level of AI performance on this map size. Standard 40x80 maps are relatively small, so some AIs almost always get stuck in a corner and cannot expand properly. Faction placement can't do much there, since there's only so many valid locations to choose from.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on March 24, 2020, 11:30:29 AM
> You didn't mention what SE RESEARCH modifier Nevill had.

He's running Fundie in 2208 with no faction modifiers, so that should be -2 RESEARCH.
Still doesn't fully explain the difference, as you said. It does put things into perspective, though - one would expect a delta of 6 RESEARCH to have a significant effect.

> When you say "the techcost suddenly jumped from 143 to 367" what was the tech you were trying to research previously?

I should've phrased that more clearly: the cost of the tech jumped while I was in the middle of researching it. As in, it went from 6 years to research to 16 between turns. Quite a surprise.
Unless that's what you were referring to and I misunderstood, that is.

And yes, we are playing directed research only.

That said, I went back a few saves and found that in 2147 I was researching EcoEng (E4), and the stated cost for that tech was in fact 367. Then I switched to researching C2 in 2148, and the cost updated immediately to 143.
I'm not sure what this means, but it's probably worth noting.


We actually had some other AI-related questions / curiosities too, now that I remember:

1: The mod we're using nerfs boreholes down to 0-2-6. As far as we can tell, the AI hasn't built a single one. This isn't necessarily a bad thing (since boreholes were so epic before), but I wonder how this affects the AI's terraforming decision-making?

2: Could you possibly elaborate a little on how the AI makes SE choices? In our mod, Police State was changed to +2 SUPPORT +2 POLICE -2 TALENT, and Planned changed to +2 GROWTH +1 INDUSTRY -2 ECONOMY. All but one AI (whose faction is banned from running PS) has been running PS+Planned for the whole game, and this hasn't changed even when at war. Again, not necessarily bad (I myself ran Police State for most of the game), but kind of interesting.
None of the AI factions have any political or economic preferences, if that affects things.

Table of SE settings we are using:
Code: [Select]
Frontier,        None,   
Police State,    DocLoy,  ++SUPPORT, ++POLICE,   --TALENT
Democratic,      EthCalc, ++EFFIC,   ++GROWTH,   --SUPPORT
Fundamentalist,  Brain,   ++PROBE,   +MORALE,    +INDUSTRY,  --RESEARCH     
Simple,          None,
Free Market,     IndEcon, ++ECONOMY, ----POLICE, --PLANET,   -INDUSTRY
Planned,         PlaNets, ++GROWTH,  +INDUSTRY,  --ECONOMY
Green,           CentEmp, ++EFFIC,   ++PLANET,   --GROWTH,   +TALENT
Survival,        None,   
Power,           MilAlg,  ++SUPPORT, ++MORALE,   -INDUSTRY,  +TALENT
Knowledge,       Cyber,   +EFFIC,    ++RESEARCH, --PROBE,    -POLICE
Wealth,          AdapEco, +ECONOMY,  +INDUSTRY,  --MORALE,   -PLANET
None,            None,
Cybernetic,      DigSent, ++EFFIC,   ++RESEARCH, +PLANET,    ---POLICE
Eudaimonic,      Eudaim,  ++ECONOMY, ++GROWTH,   +SUPPORT,   ---MORALE
Thought Control, WillPow, ++POLICE,  ++INDUSTRY, +MORALE,    ---SUPPORT

In more general commentary, it seems that the AI has done the best it can considering the challenges of dealing with islands and water. The ones that started on decently-sized landmasses are quite powerful on paper, with many bases and competitive research (at Transcend difficulty). In fact, one of them has more council votes than me, and I have the Empath Guild giving me more votes!
(I do have a -2 GROWTH penalty on my faction, though, so perhaps this isn't that surprising after all.)

Nevill still overran his neighbour in a few turns once he had an actual military on hand, but that was to be expected.

Here is a picture of what the map looks like a century in. I am the white player in the top left, and he is the yellow player in the bottom right.
(https://i.imgur.com/m3KhJll.png)
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 24, 2020, 12:57:06 PM
> Still doesn't fully explain the difference, as you said. It does put things into perspective, though - one would expect a delta of 6 RESEARCH to have a significant effect.

Yeah that is a very large difference, could say almost unbalancing. The numbers still don't match exactly given that one faction is +4 research and the other is -2. Could it be that the other faction also receives the 15% discount when the target tech is also known by some AI faction with a commlink frequency?

> That said, I went back a few saves and found that in 2147 I was researching EcoEng (E4), and the stated cost for that tech was in fact 367. Then I switched to researching C2 in 2148, and the cost updated immediately to 143.
> I'm not sure what this means, but it's probably worth noting.

Those numbers are exactly what the costs should be according to the new formula. If you plug levels 2 and 4 to the formula given in Details.md you can also see that the cost jump from level 2 to 4 is a factor of 2.56, as can be seen from those numbers.

> 1: The mod we're using nerfs boreholes down to 0-2-6. As far as we can tell, the AI hasn't built a single one. This isn't necessarily a bad thing (since boreholes were so epic before), but I wonder how this affects the AI's terraforming decision-making?

I'm kinda surprised if they didn't build any boreholes. It's important to note here the AI doesn't do any cost-benefit calculations for most of the terrain improvement items, they just build them whenever they are available. The one exception to this rule is plant/remove fungus actions. The AI actually compares fungus yield to forest tiles when deciding which one to use. Just watch out if they ever get the Manifold Harmonics...

> 2: Could you possibly elaborate a little on how the AI makes SE choices? In our mod, Police State was changed to +2 SUPPORT +2 POLICE -2 TALENT, and Planned changed to +2 GROWTH +1 INDUSTRY -2 ECONOMY. All but one AI (whose faction is banned from running PS) has been running PS+Planned for the whole game, and this hasn't changed even when at war. Again, not necessarily bad (I myself ran Police State for most of the game), but kind of interesting.

Also here's one undocumented behaviour: the social engineering AI ignores TALENT modifier when deciding which model to choose. In this case they would see Police State as having only positive modifiers, so naturally it would tend to override other choices for most of the time. User interface doesn't display this modifier correctly and none of the default choices utilize it, so that's why I didn't program it there. It could be added in some kind of an update, but I haven't given any thought on how it should be weighted against other modifiers.

Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on March 24, 2020, 01:28:22 PM
> Could it be that the other faction also receives the 15% discount when the target tech is also known by some AI faction with a commlink frequency?

Hmm, well, I see in my save that 2 AI factions already know that tech (B6), and we obviously both have commlink with them by this time. I would expect that would affect both of us though, no?

Not sure if the AI plays by the same rules (playing at Transcend with default multipliers, i.e. cost_factor=7), but those two factions are currently researching level 6 techs with costs of 885 and 797. Neither should have any RESEARCH modifier, though one is PS+Planned and the other Demo+Green.

> Those numbers are exactly what the costs should be according to the new formula. If you plug levels 2 and 4 to the formula given in Details.md you can also see that the cost jump from level 2 to 4 is a factor of 2.56, as can be seen from those numbers.

Interesting. So the new formula is at least giving consistent jumps between levels.

>  In this case they would see Police State as having only positive modifiers, so naturally it would tend to override other choices for most of the time.

Yeah, I suspected this was the case tbh. I suppose it's a bit of a niche thing, since only mods mess with TALENT. We could always just adjust the penalties and see if the AI picks other choices more.

Of course, I wouldn't object if you did feel like adding support for it in an update! I suppose TALENT most closely compares to POLICE, since both affect the number of drones per base - however, POLICE requires you to invest in actual police, while TALENT is passive. This might benefit the AI a bit more, since it tends not to use police very well.
Title: Re: SMACX Thinker Mod
Post by: Hans Lemurson on March 24, 2020, 07:42:45 PM
I ran across two strange bugs, but I don't know if they are related to this Mod.

#1 is a text bug in the message about losing minerals when I switch projects.  When I first noticed it it said "Switching between Believers carries a 50% retooling penalty..."
When I closed the program and reloaded the game, the same message said:
"Switching between Mission Year 2211 carries a 50% retooling penalty..."

#2 seems to be the "Ghost Drone" bug, from what I've been able to track down.  Super-drones that are pacified by police appear as content in the Psych window, and do not cause drone-riots, but display as super-drones in the population display.

I bring these up here because this is the mod I was playing when I noticed the bugs.  Do you know if these issues have come up or been addressed elsewhere before?
Title: Re: SMACX Thinker Mod
Post by: Induktio on March 26, 2020, 07:22:07 PM
> Hmm, well, I see in my save that 2 AI factions already know that tech (B6), and we obviously both have commlink with them by this time. I would expect that would affect both of us though, no?

If you both have the both commlinks, then the 25% discount should apply equally.

> Not sure if the AI plays by the same rules (playing at Transcend with default multipliers, i.e. cost_factor=7), but those two factions are currently researching level 6 techs with costs of 885 and 797. Neither should have any RESEARCH modifier, though one is PS+Planned and the other Demo+Green.

Just a guess, the faction with the cost of 797 has Manifold Nexus on their territory? It applies a +1 research modifier, so the cost would be 885 * 0.9 = 797. Edit: probably it's something else, since +1 research bonus applies only on alien factions when they have it inside their borders.

> I bring these up here because this is the mod I was playing when I noticed the bugs.  Do you know if these issues have come up or been addressed elsewhere before?

I'm not sure at the moment if Scient's patch adjusted something related to those features. I recall people reporting some kind of bugs with super drones in the vanilla game. Can you open the save with the standard terranx.exe binary and see if those problems persist?
Title: Re: SMACX Thinker Mod
Post by: Hans Lemurson on March 27, 2020, 12:58:44 AM
The standard terranx.exe will not open with the modified alphax.txt, I'll need to find the original version.

...Ugh, Windows 10 won't even let me delete or rename my original folder because applications are using the arialn.ttf file inside there as a font source!

....
Ok, got it running.  Started with a clean install of Alpha Centauri. 
With the original terranx.exe, the "ghost drones" DO appear, but there is no error in the retooling message dialog.
...
When I install PracX, same thing (super-drones yes, retooling message fine)
...
When I install Thinker, I see no change.

A clean install seems to have fixed all of the problems.  Interesting.  Good to know!
I did notice that the message was not just without errors, but actually different:
Quote
Switching production in mid-course carries a 50% retooling penalty for all but the first 10 minerals.  4 minerals would be lost.
as opposed to the previous message that had the error:
Quote
Switching production between Mission Year 2211 carries a 50% retooling penalty for all but the first 10 minerals.  4 minerals would be lost.

Now, interestingly, when I contacted the Hive (and left them seething after I refused their demands, and so remained at vendetta with me), the retooling message was as follows:
Quote
Switching production between monopolistic grasping carries a 50% retooling penalty for all but the first 10 minerals.  4 minerals would be lost.
The message seems to be trying to access memory that holds data which was never properly set.  Maybe it was somehow displaying the message for switching away from a Secret Project, but since no such project existed it read from old memory.

But anyways, the problem was clearly at my end, not yours.  Thanks for all the good work!
Title: Re: SMACX Thinker Mod
Post by: lolada on April 23, 2020, 10:22:45 PM
That is really annoying bug with drones and wrong display. Thats one of the reasons i started looking for patches - bug is also present in vanilla game. I think its connected with secret projects - Human genome project or Virtual world trigger it.. looked like it, not 100% sure. Got the bug in my last game.. i have HGP.. i also had it in Zakharov game recently. It would be a big deal to fix it.

Some feedback:

- AI is doing great in gneeral - would be also nice if it build trance units to defend vs worms - i dont see them ever build that. Recently i played with Gaians and used them a lot and poor Morgan just couldnt figure out to build some trance or empath units. Ive seen Miriam building empath rover before - which is great since she has negative planet rating. Also some morgan ench. probe team in actions, they can actually do some damage sometimes even through The Hunter-Seeker project.

- would be also good to have AI build more interceptors - it would be much tougher. Looks like they spam lots of penetrators and when i build interceptors AI start to mostly sit in their base.. but in the end they defend really badly due to lack of interceptors. AAA units are actually nicely used by AI - issue is that AI sometimes gets the tech late.

- another thing - terraforming - sometimes AI just skips Centauri ecology tech and they are pathetic (Spartans...) .. this tech should be really top priority - if not first tech every AI research. The weather paradigm is also game-breaking for AI or those resource unlocking techs - AI that gets it just run-away with game .. at least for a while.

- another issue is i see Morgan units removing 3-2-3 fungus tiles when they got Manifold Harmonics (i am playing will to power mod.. that SP is quite early there).. AI just got tree farms, looks like it doesn't understand those fungus tiles are way better than forests, especially since Morgan is already having eco damage issues

Great mod, really liking it!  ;b;
Title: Re: SMACX Thinker Mod
Post by: Induktio on April 27, 2020, 06:09:22 PM
The project has been on a hold ever since I finished v1.0, but maybe I should consider doing a comeback. After all, how many Rocky movies are out there? :D

> would be also good to have AI build more interceptors

I think there were some issues getting the AI to properly design interceptor prototypes, so maybe it is lacking because of that regard. Not sure how easily that could be altered.

> another thing - terraforming - sometimes AI just skips Centauri ecology tech and they are pathetic (Spartans...)

That issue shouldn't persist with most of the factions since the research priorities are altered by tech_balance. Probably Spartans are the only ones that consistently suffer from it. If just altering game rules would be preferred here, I would consider removing the tech requirement from former units. That would level the playing field significantly at the start.

> another issue is i see Morgan units removing 3-2-3 fungus tiles when they got Manifold Harmonics

If fungus tiles yield more than forests (ignoring tree farms), then the AI should always prefer fungus. So I'm not sure what is going on there because that shouldn't be happening. It should take Manifold Harmonics into account in the calculations.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on April 28, 2020, 02:55:19 AM
I would most certainly welcome an update to this great mod! :)

> I think there were some issues getting the AI to properly design interceptor prototypes, so maybe it is lacking because of that regard. Not sure how easily that could be altered.

Some counter-feedback: I saw the AI build a modest number of interceptors in my last singleplayer game. They would regularly fly up and shoot down my nerve gas penetrators after I bombed their bases. Combined with all the AAA units and Aerospace Complexes the AI built, it was actually a bit of a challenge to get enough penetrators through to nerve gas their bases down to zero.

Ironically, this actually served as a liability in some cases: when my jets attacked a base with another jet in it, the jet would be chosen to defend first, rather than AAA units or mindworms. This gave my attack much better odds and, when I won, would result in a nerve gassing.

Perhaps the AI should attempt to set AAA units (or ECM units, or even psi units, depending on circumstances?) as the designated defender? Since I expect most player attacks will be performed with jets or rovers, this will probably be a net help to the AI.

> If just altering game rules would be preferred here, I would consider removing the tech requirement from former units. That would level the playing field significantly at the start.

I'm personally in favour of this, but I feel that altering core game balance to make the AI work better gets into a murky area.

> I'm kinda surprised if they didn't build any boreholes. It's important to note here the AI doesn't do any cost-benefit calculations for most of the terrain improvement items, they just build them whenever they are available.

An update to this: I have since observed that the AI does in fact build some boreholes even at 0-2-6. So it could've just been random chance.
Title: Re: SMACX Thinker Mod
Post by: lolada on April 28, 2020, 09:28:41 AM
Sure, if you can improve the AI more I don't see why not and if you have time ofcourse. Formers and yield unlocking techs are game breakers - but i don't know if unlocking that would break the mods that use your AI and build on top of it.

Some more feedback:

I observed Morgans more later in that game and they did leave most of fungus untouched. So  i think its working correctly in the end. I don't know what they built in that tile.. too bad i didn't check. Removing fungus makes some sense to plant mine or borehole for example. They might have started removing the fungus before they switched to Green - since manifold harmonics don't work with 0 Planet rating. Anyway.. Morgan did later switch SE settings from positive planet rating, so they didn't get much use of it. Fungus is still good in the mod - those were 2-1-2 and 2-1-3 tiles without Manifold Harmonics activated (thats at planet  rating = 0).

- I can confirm that AI build interceptors and use them decently. It likely depends on AI.. Miriam and Yang spam strong units while Lal seems to protect his sea bases with scout rovers  ;lol. In general I think AI would benefit from more interceptors. They do seem to spam pentrators more and use them well on killing formers and crawlers.

- AI uses probes to great effect - Morgan ruined Zakharov in my last game with 0-10-2 neutronium probes and mind controlled three of his biggest bases, except HQ ofc. They also build enhanched probes that can go though hunter seeker when they have the tech.

- I never saw AI to build Trance units. This is real weakness - as player can ruin AI with native units, Morgan for example.. especially if PSI rules are tweaked. It would be really beneficial if -planet rating factions were supplemented by some trance defenders.

- Same for planet factions - they should promote building more native units. I don't think they build them ?! I didn't play enough to notice maybe. In contrast its very beneficial to see for example Miriam building some empath rovers because she has trouble killing worms.

- Other than that AI seems very slow to build defenders in sea bases once they die. I'm seeing EMPTY sea bases build Tree farms.. they are near coast but there's no forests.. or there's like one.
AI should also try to build at least one strong defender per base.. something like 1-3+-1, no rovers or scouts. Sea bases certainly should have these. 


Title: Re: SMACX Thinker Mod
Post by: Induktio on April 29, 2020, 01:14:20 PM
There's one significant thing that needs to be decided though. Tnevolin has also been implementing lots of stuff in his The Will to Power fork (https://github.com/tnevolin/thinker-doer). Back then we decided the project could be forked because my focus was mainly AI improvement instead of the more balanced game mechanics tnevolin has been doing. I also didn't have that much time to evaluate what new stuff could be incorporated in this mod.

I suppose we could still keep these versions separate because Thinker is mostly supposed to be a "vanilla" game mechanics experience, but I have a feeling some of the TWP changes could be imported here too. If there's going to be new releases of Thinker, I probably won't be doing huge changes. What are your thoughts on this?
Title: Re: SMACX Thinker Mod
Post by: lolada on April 29, 2020, 10:00:04 PM
I am too new in this to give advice ^^  i guess anything goes as long as other modders can easily change it if they wish. I can see appeal to mod the game with better AI to own needs. Vanilla AI is really sad.

I started an AAR game with WTP mode - gonna comment on both AI and WTP so if you have time there will be some feedback there also. I played quite a bit more, but need to to write it down all, edit pictures etc..

http://alphacentauri2.info/index.php?topic=21438.0
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on April 30, 2020, 03:52:35 AM
Which changes in particular are you thinking of importing?

I do agree with the sentiment of keeping Thinker as a relatively vanilla experience; one of the things I like most about it is that it works as a base you can slap other changes on top of.
Granted, the change to the techcost formula is already a step in this direction, though in my opinion a positive one.

Relatedly, I've lately been playing with a mod that removes supply crawlers entirely from the game. I am pleased to report that the AI on Transcend remains a suitably tough opponent - their progression is slowed as much as the player's.

The AI remains enamoured with Planned economics, though they use both Police State and Fundamentalist politics to varying degrees. They seem to choose between the three values about equally.
The exception is my custom anti-PS "alien" faction, who always goes Green despite having no PLANET rating or SE compulsions in this regard. It's also the only one that chooses to go Democratic at any point.
I also just observed another faction that starts with +2 ECON choose Green. Presumably he didn't want to give that up (as I modded Planned to have -2 ECON instead).

I am wondering exactly what conditions would make an AI without relevant SE preferences switch to Democratic. By 2200, the AI has usually set up most of its bases* and should have a decent minerals income, so the -2 SUPPORT is less of a concern, while the +2 EFFIC helps to squeeze more income and prevent drones from all its sprawling. On the other hand, Fundy with +1 IND is very useful for war, and the AI has spent a lot of time at war in my recent games. More playtesting is required.

*I should probably qualify that this is on random Standard maps that tend to have a lot of ocean, so the AI tends to run out of space and stop by 2200. On a Huge map with less ocean, it can and does still have plenty of scope for expansion. So experience definitely varies.

There was a curious occurrence when one AI (an "alien" faction) loaded transports with troops and landed them on a then-unclaimed continent. Those troops then proceeded to wander around doing nothing useful, and they are still there after I landed my own colony pods to colonize the continent. It was the Monsoon Jungle too, so would've been valuable regardless. I'm not sure what can be done in this regard, but maybe it's possible to get the AI to queue up colony pods and transports together? My understanding of Thinker is that the AI plans turn-by-turn rather than committing to any long-term strategy, though...

EDIT: One feature from WTP that might be nice to import would be the changes made to unit reactors: specifically, the ability to disable the bonus hitpoints from better reactors. The alternative hurry formulas might be nice to have too.

Any of the modding hooks WTP added would also be very nice to have in base Thinker.
Title: Re: SMACX Thinker Mod
Post by: dino on April 30, 2020, 11:02:34 AM
There's one significant thing that needs to be decided though. Tnevolin has also been implementing lots of stuff in his The Will to Power fork (https://github.com/tnevolin/thinker-doer). Back then we decided the project could be forked because my focus was mainly AI improvement instead of the more balanced game mechanics tnevolin has been doing. I also didn't have that much time to evaluate what new stuff could be incorporated in this mod.

Adjustable changes to the combat are must have for me, he made them adjustable and vanilla by default:

1) Adjustable stack collateral damage.
2) Adjustable healing rate.
3) No reactor HP and adjustable reactor cost factor.
4) Adjustable tachyon filed/ perimeter defense bonus.
5) Weak artillery has a chance to make a damage.
6) Correct combat odds display.
7) Adjustable level of randomness in combat results.
8) Planet bonus on defense.

Other great stufff:
1) Borders of sea and coastall bases.
2) No mineral bonus for aquatic factions.

I'd also like from Ytzii's patch:
1) Condensers only increase rainniness of nearby tiles, no 50% nutrient bonus.
2) Pacifism drone rules.

> terraforming - sometimes AI just skips Centauri ecology tech and they are pathetic (Spartans...)
It's easily dealt with alphax.txt, just add 3 points to all ai research weights and no one will skip it ( or just make tech_balance=1 bonuses additive instead of multiplicative )
Title: Re: SMACX Thinker Mod
Post by: lolada on April 30, 2020, 02:14:20 PM
- No reactor HP is really nice change, they are otherwise gamebreaking, side with reactor can just stomp the oponnent. Making units cheaper with new reactors is elegant solution.

- Artillery change is great - vs WTP defensive bonuses especially - because its worth to have 2-3 arty units to soften the defenders, otherwise attacker loses a lot. Damage is fine if arty is not obsolete - advanced infantry artillery (smth like (6)-1-1 or (8)-1-1 is cheap and useful. Rovers are much more flexible but also more expensive.
One thing that I would like to see buffed is PSI artillery - it seems ineffective, at least its cheap.

- Healing rate change is 10/10.. it allows weaker units to gank up on strong defenders and helps AI a lot in attack. Player can use it as well so its not one-sided.

- Defensive bonus (territory +%50) is%  the most debatable.. but its the essence of the mod. I can see why some people might really not like it. But without it player can just stomp AI. Its a bit gamey bonus - but player got it as well. It would be interesting if bonus would scale farther from base.. for example a unit on right side of the border is 100% stronger than a tile away in enemy land.

- Combat randomness - i find that actually ok - its surprising a bit at first, but it gives the game replayability and invloves more tactics. Otherwise player can just stomp AI with 6-10 elite rovers (with some probe, defender suppoer) that are upgraded as new techs come out.
When there's real chance to 6-1-2 rover to die vs formers.. say former on forest thats 1.5 def, 2 in own land so ratio is 6:2... if rover is elite its 9:2.. 4.5:1 and with those round changes whatever is there... rover dying 15-20% of time increases risk drastically. Stomping everything with 95+% odds in vanilla just make me lose interest in game instantly.
Title: Re: SMACX Thinker Mod
Post by: Induktio on April 30, 2020, 02:23:46 PM
> I am wondering exactly what conditions would make an AI without relevant SE preferences switch to Democratic.

Did you mod the social models in any way from vanilla values? People need to always supply the modded values if asking "why does the AI choose X over Y?" Vanilla version of Democratic should be strong enough (but overpowered) for most AIs to prefer it most of the time.

> I also just observed another faction that starts with +2 ECON choose Green.

Having +2 ECON level or more is heavily preferred by the new social AI.

> My understanding of Thinker is that the AI plans turn-by-turn rather than committing to any long-term strategy

Yeah that is true. The issue is that any long term strategies would have to be stored with the save game or otherwise it would behave inconsistently with save game reloads. There is some possibility to save extra data with the save game but the space is constrained.

> specifically, the ability to disable the bonus hitpoints from better reactors.

That might be the biggest balancing change that could be done here. The patch only modifies combat calculation function to ignore reactor values, so it is really simple.

> The alternative hurry formulas might be nice to have too.

Maybe but I have no strong opinion on them yet.

> Any of the modding hooks WTP added would also be very nice to have in base Thinker.

And which ones would they be?

> Adjustable changes to the combat are must have for me, he made them adjustable and vanilla by default

I think disabling extra reactor HP would be the most important, because more advanced reactors would still be cheaper. In the original game, giving them both the cost/strength advantages was seriously a weird design choice.

Adjustable stack collateral damage would help the AI because it doesn't plan around those situations that well. About similar importance would be territory defend bonus and healing rate mods.

About those other modifications I'm not so sure, I really tend to keep a conservative approach when it comes to adding new features instead of just AI improvement. There's so much stuff to go through in TWP now but I don't think I can merge everything in this mod when the original design goals weren't like that.
Title: Re: SMACX Thinker Mod
Post by: dino on April 30, 2020, 02:49:08 PM
> About those other modifications I'm not so sure

Lower Healing speed is a must too, since even if AI spreads its assault over several turns it's still effective.
It also makes it much more difficult to steamroll with lightning speed through the enemy territory, since you have to take a few turns breaks to repair your assault force.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 01, 2020, 02:40:54 AM
I too enjoy the vanilla experience with Thinker augmenting it. So much so that I actually use the SMAC in SMAX mod included! I like that everything is toggleable and hope adding additional features would stay optional.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 01, 2020, 03:37:51 AM
> Did you mod the social models in any way from vanilla values? People need to always supply the modded values if asking "why does the AI choose X over Y?"

Yeah, I've since realized that giving feedback when I have mods on top of mods is probably not the most useful :V
It seems based on your replies that the social AI is in fact working as intended. Obviously, changing the balance of the various SE models will change how much the AI weights each of them. I was mostly just curious about the behaviour I saw.

I'm playing another PBEM game with vanilla factions now, though, so that might be more useful.

> And which ones would they be?

dino pretty much listed them all already, but I'd personally prioritize these ones:

- Adjustable Perimeter Defense and Tachyon Field bonuses.
- Adjustable repair rates.
- Changes to borders created by coastal and sea bases.
- Disabling free techs granted to alien factions.

If there was absolutely only one thing I could request to port from WTP, though, it would by far be the changes to unit reactors. Anything else would be a nice-to-have.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 03, 2020, 08:19:30 PM
> I like that everything is toggleable and hope adding additional features would stay optional.

Thanks for feedback. :) Possible alterations on the game rules should stay optional and I would not like to diverge on that design goal here.

Recently I've been toying with the idea of giving the AI some sense of long term planning. As it stands currently, Thinker just recalculates choices each turn and some elements of it are fairly static. Long term planning implies some changes to the save game format to store more data, but luckily there's many unused portions in the structures.

One way to tackle this would be to adapt Thinker's unit production more to the situation/opponent. I've been doing some testing with a feature that tracks how well each unit type does in combat and then selects more of those one with better values for production. In theory this could skew the AI to produce PSI units instead of the normal ones if they perform poorly against some opponent. Based on current trials it looks like some kind of an improvement, but there's lots of randomness in these A/B tests.
Title: Re: SMACX Thinker Mod
Post by: dino on May 04, 2020, 07:42:15 PM
> I've been doing some testing with a feature that tracks how well each unit type does in combat and then selects more of those one with better values for production.
> In theory this could skew the AI to produce PSI units instead of the normal ones if they perform poorly against some opponent.

By the time this solution would poke AI to produce good units, it'd be probably too late to produce them, since it'd require a large scale conflict first to net reliable results.

Better, determine 3 factions that are biggest potential threat ( score them by their military power, diplo status, mood, distance ).
Calculate statistics on amount of native, air, or artillery units they have, and produce more AAA/interceptor, trance/empath/native, artillery units to create a counter.
If some  threatening factions have tech advantage, produce more native, or psi units.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 05, 2020, 06:20:51 PM
That combat statistics feature would work best on bigger maps for sure, otherwise there isn't enough time to react. I'm not really sure if it's even necessary to implement though and I'm really trying to avoid any changes to the save game format unless it's necessary.

The logic for selecting whether to use PSI units might need some improving. At least I made a small update to the unit planner to emphasize trance/interceptor units more. Previously those unit types were mostly lacking from the AI. Trance/comm jammer ability can also be paired with AAA ability in the later phase of the game for some tough defense.

For completeness sake I've been also reversing the rest of Faction struct variables. It kinda bugs me to no end that it has so many gaps in the definitions, but it's maybe the most complex struct in the binary.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 07, 2020, 09:21:28 AM
- Just want to report that Drones are building tons of interceptors :D they are killing my air game lol. As long as AI has production and industry they spam units.

- I have one big issue with "advanced custom designes": AI can't really tell when thing is too expensive? For example they tend to build ton of armored cruiser probes - its a strong unit and quite a pain - but investing so much in them is kind of a waste. It would be much better if AI could mix both cheaper (unarmored for example, or foils) and more expensive units.
Can AI be learned to avoid building units that are for example > 12 turns? and build cheaper ones. Same for facilities, > 15 or 20 turns don't build. For example they build expensive rover colony pod when infantry one would be just fine.

Its interesting to see AI build some cheaper - non max tech units as well - as it really makes sense - for example to counter worms or probes. I would max design slots if possible, 64 is too restricting. Does it come with downside?

- Sea bases - AI does not protect them they stay empty for long time. That would be priority fix. I recall AI would insta change production in land bases from whatever to build to defender - if base loses the only defender. Sea bases do not do this.

Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 07, 2020, 10:50:43 AM
I am happy to report that I was defeated by the AI through a Progenitor Victory in 2281. It was a good game, and a learning experience for me.

Notably, the game was played with boreholes nerfed to 0-2-6, supply crawlers disabled, and no pop-booms available from Creches, which I understand are three of the main avenues for the AI to get ahead in Thinker. I think this might actually be a net buff for the AI, since the +30% multipliers it gets on Transcend let it far outproduce, and outtech, human players.

I noticed that the AI still has a bad habit of leaving bases empty sometimes, or only stationing rovers/hovertanks in some bases - although other bases had Isles and armoured defenders in them, which I was not equipped to deal with. While it didn't really make a difference in the end, it still makes one shake their head to see 14-size economic powerhouse bases totally undefended.

Though, there was an amusing occurrence at the start of the game, where this let me eliminate an AI in one turn by moving a rover into its empty HQ. Granted, this was on a Standard map; it'd be much less likely on a larger one.

The tech rate still rockets up into the stratosphere in late game. The AI was researching late-tier (10-12) techs in 1-2 turns (making 1500+ labs per turn) and had the whole tree finished by 2270 - and as an alien, he wasn't getting any commerce income. I heavily mismanaged my energy that game, but still had a tidy 3 turns for tier 6 tech with ~450 labs per turn - and if I switched to FM / Knowledge, 1 turn with 860 labs.

Here is what the victor's base looked like at the end of the game. He also had 10 of every satellite (except Geosynchronous Pods, which I'm sure the AI would find helpful on defense), a few PBs, and half of all the secret projects (i.e. all the good ones...).

(https://i.imgur.com/WjTdy3O.png)
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 07, 2020, 04:09:57 PM
> I think this might actually be a net buff for the AI, since the +30% multipliers it gets on Transcend let it far outproduce, and outtech, human players.

This is an important point that I've been thinking about. There are many mods out there that claim to "balance" gameplay by delaying crawlers/boreholes/pop booming and so forth. But the thing is, the AI doesn't micromanage these elements together as efficiently as a human could. The AI doesn't understand the value of stacking all these bonuses in one base to create super science cities, for example.

So in the end it might produce a benefit for the human player to have these tools available that can be combined in a powerful way. Without them, the game becomes much more about raw growth/colonization speed. And good luck trying to match 6 other Thinker factions with 30% discounts in the early land grabbing phase. :D

> I noticed that the AI still has a bad habit of leaving bases empty sometimes, or only stationing rovers/hovertanks in some bases

Can you provide save games where this happens consistently? Does it happen more often in sea bases?

> The tech rate still rockets up into the stratosphere in late game.

Were you playing this with Thinker or The Will to Power tech cost formula? Those two are NOT the same btw. We might increase the late game costs if they are still too low.

> Its interesting to see AI build some cheaper - non max tech units as well - as it really makes sense - for example to counter worms or probes.

I think I'll incorporate some changes on this for the next develop build.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 08, 2020, 02:56:57 PM
Quote
Without them, the game becomes much more about raw growth/colonization speed. And good luck trying to match 6 other Thinker factions with 30% discounts in the early land grabbing phase.


Really good point. That's been my experience with your mod, too. If I get a sucky start and my neighbor is Yang or Miriam then my whole early game turns into an extended delaying action until I can get crawlers for my own survival!


I only play on standard sized maps and restart until I get a big continent on the middle setting so everybody's in contact fairly quickly.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 08, 2020, 10:50:35 PM
Develop build 20200508 is now available from project website (https://github.com/induktio/thinker). The commits mostly deal with cleaning up the code base, but here are the changes since release v1.0:

* AI should build defenders on empty bases faster
* AI now sometimes builds Geosynchronous Survey Pods and Flechette Defense Systems
* AI tries to avoid building combat-related facilities on peacetime
* Small tweaks to prototype picker/PSI preference algorithm
* Prototype planner now tries to create trance/interceptor units
* New option: eco_damage_fix should increase AI eco damage to the same level than player bases

However, that eco damage change should NOT have significant effects to the game balance. It may just increase the frequency of sea level rises. Tell me if you notice differences.

Also due to glitches in the game binary, trance units may not always appear even if the AI faction has the prerequisite tech.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 10, 2020, 02:50:33 AM
* New option: eco_damage_fix should increase AI eco damage to the same level than player bases

However, that eco damage change should NOT have significant effects to the game balance. It may just increase the frequency of sea level rises. Tell me if you notice differences.


 Looking forward to helping the AI get rekd by Planet once I fix my mouse. ;deidre; Appreciate the work you're doing!
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 11, 2020, 06:00:57 AM
> I think this might actually be a net buff for the AI, since the +30% multipliers it gets on Transcend let it far outproduce, and outtech, human players.

This is an important point that I've been thinking about. There are many mods out there that claim to "balance" gameplay by delaying crawlers/boreholes/pop booming and so forth. But the thing is, the AI doesn't micromanage these elements together as efficiently as a human could. The AI doesn't understand the value of stacking all these bonuses in one base to create super science cities, for example.

So in the end it might produce a benefit for the human player to have these tools available that can be combined in a powerful way. Without them, the game becomes much more about raw growth/colonization speed. And good luck trying to match 6 other Thinker factions with 30% discounts in the early land grabbing phase. :D


Yea I had been thinking about this. I would say it's about more than just modding so the AI is more competitive. With the base tech tree, there was really one optimal way to play. Rush right to Condensor, Borehole, Crawler. And ICS. 75% of the tech tree just wasn't relevant due to overcosted abilities, overcosted facilities, overcosted armor, etc. Many SE picks weren't viable, air units very undercosted. And so on. It got a bit stale for me as it's more or less the same strategy every single game.

However:
A stronger AI is more fun to play against. I do sort of crave for that. It does a lot of silly things unmodded. At 30% Transcend would be pretty much impossible. Wouldn't be the end of the world IMO. Taking Master of Magic as an example the best players don't expect to win most games on the highest difficulty.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 12, 2020, 08:38:12 AM
> Can you provide save games where this happens consistently? Does it happen more often in sea bases?

I wasn't able to produce a situation where the AI consistently leaves its bases empty, unfortunately. I'll try and keep a lookout for these situations in my next game, with the new build.

I haven't noticed sea bases being particularly left empty; the AI usually builds at least a token defender there. In fact, since land units can't leave sea bases, it's probably less likely to find an empty one!

> Were you playing this with Thinker or The Will to Power tech cost formula? Those two are NOT the same btw. We might increase the late game costs if they are still too low.

This was with Thinker mod only. I haven't touched Will to Power yet.

What tech cost formula does WtP use? I couldn't find any description in its files despite saying one was in the readme.

> Without them, the game becomes much more about raw growth/colonization speed. And good luck trying to match 6 other Thinker factions with 30% discounts in the early land grabbing phase.

So in other words, it comes back down to the AI cheating its pants off again. ;lol

That said, I'd certainly prefer to err on the side of AI that's too strong rather than too weak. I'll keep playing at 30% and see what I can come up with.

Yea I had been thinking about this. I would say it's about more than just modding so the AI is more competitive. With the base tech tree, there was really one optimal way to play. Rush right to Condensor, Borehole, Crawler. And ICS. 75% of the tech tree just wasn't relevant due to overcosted abilities, overcosted facilities, overcosted armor, etc. Many SE picks weren't viable, air units very undercosted. And so on. It got a bit stale for me as it's more or less the same strategy every single game.

However:
A stronger AI is more fun to play against. I do sort of crave for that. It does a lot of silly things unmodded. At 30% Transcend would be pretty much impossible. Wouldn't be the end of the world IMO. Taking Master of Magic as an example the best players don't expect to win most games on the highest difficulty.
It seems to me that everyone agrees that the base game was broken, but nobody agrees on how to fix it. :D

I'd say the human player can be a lot more ruthless than the AI, though. The AI still isn't great at launching coordinated attacks, and large AI empires can be carefully dismantled through looking for weak points and concentrating force. The main difficulty is finding a way to do so before the AI's cumulative bonuses leads them into an unstoppable tech runaway.

Oh, by the way. It's been brought to my attention that nerve stapling drones has basically no consequences in the very early game. I wonder if it would be a good idea to teach the AI to nerve staple when it doesn't have any commlinks with other factions and/or commerce income coming in?
Title: Re: SMACX Thinker Mod
Post by: lolada on May 12, 2020, 10:16:43 AM
I don't think AI leaves the base empty. Defenders probably get killed by worms. Yesterday i thought stupid aliens.. they left the base empty again and i moved my units in just to see Drones needlejets around. So its not faulty AI per se.. units get killed at least in this case.
Now, AI do not switch production immediately but finish whatever it is building and (probably) then builds a defender. So base can get empty quite a few turns. This is with will to power and older thinker ai.

On improving AI.. AI will always be AI - i played several games with thinker AI only (on transcend) and its quite challenging - basically in "normal" playstyle as a player you need to build a lot of bases and pump those boreholes and condensers or its tought to keep up. AI also spams supply crawlers so as a player you have to do it or lag a lot. This does indeed make AI much stronger than in vanilla. AI can even popboom - i must admit i really don't like this mechanic.

It has its downside - you are pretty much forced to play certain playstyle. Massive former, colony pod spam, to crawlers and boreholes.. some infrastructure and then maybe to pop-boom its not mandatory, So it does get a bit stale => the reason why i tried Will to power. Then you get satelites early and game is kind of broken .. especially if you pop-boom properly. Anyway, another thing i found not fun is that for example in my last game i had very strong Hive (in monsoon jungle) that kept sending units and probes over war-zone and i waited behind for like 50+ turns and just killed anything quite easily until i got needlejets - after which i went on and slowly conquered him. Hive is hard to conquer, but there was no real danger attacker units usually win and level up and it goes snowbally.

Fun is subjective.. anyway Will to power changed a lot of things. Start - same applies, but formers are 40 minerals, colony pod 60 (it gets cheaper with reactors which are available eariler).. and supply crawlers are 120 minerals fixed. So that changes a lot. Forests nerfed - fungus buffed thats important as well. Anyway, Will to power changes combat - units are much more likely to die and factions have +50% to attack, defense in own territory. This really makes it hard to stomp AI as it equals the odds. Author wanted attacker to lose 2-3 units per 1 in base (if of equal strength). Armors and weapons are rebalance to be equal  :danc: lel until strength 10-13-16 then attacker gets ahead. Made a game much more fun for me at least. It can get you angry sometime tho lol. This mod also has some issues but they are of different kind.

Saying all this because i don't think only AI improvements only will "fix" the game. Now you may not like this mod, there are others i intend to try as well. In the end modding the game to own liking seems the final step ^^.

Title: Re: SMACX Thinker Mod
Post by: Nexii on May 12, 2020, 05:22:58 PM
Oh, by the way. It's been brought to my attention that nerve stapling drones has basically no consequences in the very early game. I wonder if it would be a good idea to teach the AI to nerve staple when it doesn't have any commlinks with other factions and/or commerce income coming in?
I believe it was said somewhere that you can only nerve staple a base 3 times total. That is a good idea to abuse it early.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 12, 2020, 05:57:32 PM
That's right, you can do it 2-3 times and then they build up an immunity to it.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 12, 2020, 06:18:01 PM
> I believe it was said somewhere that you can only nerve staple a base 3 times total. That is a good idea to abuse it early.

When previous staple count is < 2, next staple always succeeds. When it's > 7, next staple always fails, otherwise there's a random chance it will work. That's what the code says. But I wouldn't make the AI ignore atrocity restrictions in this one, it's sounds too gamey.

> What tech cost formula does WtP use? I couldn't find any description in its files despite saying one was in the readme.

Yeah, the tech costs are different and slightly bugged. WtP formula totally ignores faction research rating currently. Yep, you read right.

Basically WtP costs grow first in a cubic rate and then linearly. The point where it switches type depends on the tech's level. AI factions don't get any difficulty level discounts, instead human faction costs are determined by cost_factor parameter. That kinda mixes up the purpose of the parameter, since it already affects AI mineral/food production speed.

> I don't think AI leaves the base empty. Defenders probably get killed by worms.

In the latest update, they should also start rebuilding defenders faster, even force switch from producing some other facility.

I'm kind of interested in merging that patch for territory combat bonus, but I haven't made any decision on it since these patches are not simple. The code dealing with combat is pretty complex. Long term it would be useful to rewrite some combat functions in C++ so then they could be adjusted in an easier way. The bonus kind of reminds me of the idea I had earlier about making roads not usable on other faction's territory. In a way it serves the same purpose of making steamroll offense much harder, for players especially.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 12, 2020, 07:19:45 PM
What do you mean by research rating being ignored in wtp? I see i tech faster when i pick up + research from SE for example? You mean bonus like university have is ignored?

Merging territory bonus is quite a big change. Its great for challenge but, its not intuitive at first. Defenders gets +50% defense is clear - meaning you attack they defend better. Simple ok. But it also works if you enter their territory and they counterattack - they get +50% territory attack bonus. So entering enemy territory without  good armor is quite suicidal, surprised me quite a few times. Even armored units get quite a big disadvantage.. basically entering enemy land in forest or fungus is neutral. I believe this mechanic really annoyed bvanevery for example. WTP also makes you lose combat even when you are 4:1, 5:1 .. unlike vanilla, takes time to getting used to.

I find it great challenge tho, its really not that simple to go and stomp transcend AI. It does promote maybe builder style too much for first half of the game.

Two questions:
1. is mind-probe thing bugged? +3 Probe says bases can't be subverted, but AI overrides that. They didn't have enchanced Probe teams.
AI spams hundreds of probe teams - in wtp they are heavily armored and quite a pain.

2. Is +4 Probe team bug fixed? +4 being equal to zero? Thanks :)

Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 12, 2020, 11:07:15 PM
So far I'm enjoying watching the Zakharov that's way ahead of me getting savaged by fungal pops. I'm probably about to get taken apart by him and Yang, though, so this game might be at an end.


I have spotted him building fusion probability supply crawlers. Is that intentional?
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 13, 2020, 02:56:33 AM
> But I wouldn't make the AI ignore atrocity restrictions in this one, it's sounds too gamey.

Fair enough. It's a somewhat marginal advantage anyway.

And heh, with all this talk of making the AI stronger:

(https://i.imgur.com/AGIiOVr.png)
(https://i.imgur.com/mHiDcLH.png)

That's me (teal) about to be crushed by the AI's (orange) worm swarm. :unworthy:
(These are all custom factions I'm playtesting; the graphics are a placeholder.)

I suppose I could've played on after that, but let's be real, I'd never have caught up after losing half my production and all my projects.

It was a very frustrating game: playing as a peaceful trading faction with no real production advantages, every single AI I met instantly declared war on me. This isn't really Thinker's fault, but it does accentuate the difference between factions with strong production or military capabilities they can use to gain an edge.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 13, 2020, 08:03:08 AM
AI is cruel  :D its funny how in AC AI just declares war on first sight. Later civ games became so friendly.

Looking at that your screenshot you could have placed 10 more bases around and it wouldn't be ICS ^^. One of the great strengths of Thinker AI is that it does not go strolling around but places bases close to each other. And it generally fills tons of available space.

AI has some base breakpoints - 20ish bases? Then they build more? I've read this somewhere - i see AI place lots of bases and then stop - its a bit weird as they sometimes leave half the continent empty even when there are good settle spots. They often spam a lot of sea bases.

One thing that might hurt them badly is a loss of base. Induktio changed AI to spam military units if it loses the base ?! I think. Looks to me that they go all-out war mode for very long and stop colonizing.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 13, 2020, 07:13:23 PM
Wow, that's a lot of worms. :D What kind of faction are those "Believers", do they have planet/psi bonuses? The other factions have some eccentric looking base names too.

Very interesting to look at those screenshots. You can tell instantly from the screenshots if it's running the stock or Thinker AI. It has a very distinct base placement/terraforming style. It's not quite human in the way it develops the area but it has some kind of an unique flavor.

> AI has some base breakpoints - 20ish bases? Then they build more? I've read this somewhere

Try setting expansion_factor=200 or similar to get more bases. It's scaled to the map size.

> What do you mean by research rating being ignored in wtp?

The RESARCH rating that you see on the social engineering screen, that value is irrelevant as far as research costs are concerned.

> But it also works if you enter their territory and they counterattack - they get +50% territory attack bonus.

I actually don't think it makes to sense to also add *counterattack* bonus on top of the territory defend bonus. Or if it has both, then the amount should be nerfed from 50%. I believe this percentage is multiplicative on the standard combat strength value.

> 1. is mind-probe thing bugged? +3 Probe says bases can't be subverted, but AI overrides that.

Nothing is changed there unless it's mentioned in the Scient's patch notes.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 13, 2020, 08:53:37 PM
It's somewhere in the mid 2200s in my high eco damage test game. Zak got really savaged at first when he unlocked boreholes and condensers, popping big worm stacks and even locusts. I have him infiltrated so I could see him building Tree Farms. Hopefully that wasn't a coincidence!


He seems to get caught flatfooted by the pops. I'm regularly seeing defenseless and relatively small bases in his interior that I know were large, well developed bases before.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 14, 2020, 02:54:29 AM
I got bored with playing my test game so I let the AI play by itself for a while and then my macro messed up and I had to crash the game. There was a lot of odd behavior regarding sea colony pods. Morgan parked some in a two-tile strait off my shore for mission decades. I also saw one of Zak's inland bases with a sea colony pod inside. It was in the middle of the Uranium Flats and AFAIK never had access to the sea. I can get a screenshot of the latter if you need it. The only other mod I'm using is SMAC in SMAX.


The AI got better at handling fungal pops as it developed, and there were quite a lot of them. Consistently rebuilt trance units. I forgot to check to see if it was building anti eco damage buildings.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 14, 2020, 12:02:23 PM
In my current AAR (will to power and older AI thinker version) it took some time, but AI started to build lots of trance units eventually (defenders 3-10t-1 and similar), including some cruiser trance designs (like 16-3t-6). They also started to build more empath attacking units and counterattacking my worms. I was hitting them a lot with Sealurks and Mindworms, not sure what trigger them to start spamming more units. I eventually got to +5 Planet and big worm army.. maybe that.
Caretaker aliens and Drones - Domai AI.

Btw few extra notes:

- about that "territory combat bonus" - +50% might be too strong, including counterattacks, but wtp had specific goal to make attacker lose 2-3x more than defender.  Seems it does that. Still AI can conquer other AIs.. as well as player its just harder and takes longer. I presume it won't be big issue for player anyway unless combat formula is changed (wtp changed that to increase loses).. vanilla favors attacker a lot. Probably +50% def with vanilla combat rules won't slow player that much.. counterattacks are more dangerous and limiting.. it doesn't cut it to invade fungus tile with say few 4-1-2 rovers and 1-3-1 defender.. as that defender is nowhere near good in enemy territory. AI would likely counterattack with 2-1-2 units and wipe the stack.. as such rover would have edge over 1-3-1 unit in this case.

- ai builds hovertank units and probes (armored)

- ai builds and uses choppers but WTP has them beuatifully balanced -_- its hard to win combat vs any capable opponents without taking some damage and i can't see chopper killing more than 2 units in enemy territory.. 3rd one he's likely dead. I rarely used them because they get killed by interceptors and AI has enough aerospace complexes and AAA units
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 14, 2020, 12:22:12 PM
> What kind of faction are those "Believers", do they have planet/psi bonuses? The other factions have some eccentric looking base names too.

Good catch! Yes, they are intended to be a planet/psi-focused faction. At the moment they're kind of a Super Cult in terms of stats:
Code: [Select]
Personality: Aggressive, Explore, Conquer

^TECH: {Biogenetics}

^-2 ECONOMY: {Excess wealth viewed as sinful}
^+2 PLANET: {Practises responsible stewardship of their holy land}
^+1 mineral, +1 energy in fungus: {Taught to live off the land}
^+15% offensive combat: {Religious fervour}
^Mind Worms act as double police: {Native wildlife viewed as angels}
^{May not use Wealth values.}
That's definitely overpowered; I didn't consider the interaction between psi bonuses from +PLANET and general +attack bonuses. With the Manifold Nexus, her units already had an effective +45% advantage over mine. Add in my faction's inherent -1 PLANET and the 3:2 odds for psi attackers... even if I had every base staffed by Trance units with decent morale, I'm not sure I'd have been able to stand up to that.

And yeah, coming up with half-decent base names was one of the most tedious parts of making these factions. xD I'll probably make a thread about them soon, now that I've playtested them a fair bit.

AI is cruel  :D its funny how in AC AI just declares war on first sight. Later civ games became so friendly.

Looking at that your screenshot you could have placed 10 more bases around and it wouldn't be ICS ^^. One of the great strengths of Thinker AI is that it does not go strolling around but places bases close to each other. And it generally fills tons of available space.

AI has some base breakpoints - 20ish bases? Then they build more? I've read this somewhere - i see AI place lots of bases and then stop - its a bit weird as they sometimes leave half the continent empty even when there are good settle spots. They often spam a lot of sea bases.

One thing that might hurt them badly is a loss of base. Induktio changed AI to spam military units if it loses the base ?! I think. Looks to me that they go all-out war mode for very long and stop colonizing.
Aye, I'm finding that cranking out bases as fast as possible is essential to standing up to the AI in this mod. I used to be averse to having bases near each other, so it's been a bit of a change for me.

Basically, sprawl as hard as you can and hope that your girth impresses the AI enough to get them to leave you alone (gaining a decent energy income in the process), then consolidate and build up your pop and infrastructure so you can keep up in the tech race. I think that's the meta for now. The downside of this approach is that you'll probably be beaten by the AIs to various projects, barring unity pods or crawlers.

Anyway, I gave up trying to make that faction work for now after that experience, starting a new game with a different faction that emphasises pop growth at the expense of industry. Things have gone much better this game: I started on a continent with 4 other factions, and was able to sign pacts with 2 and treaties with the other 2, getting much needed exchanges of tech. Things were fairly peaceful for a bit, and we all kept about neck-and-neck in development; using the above strategy, I grew a nice population but missed out on most of the projects.

Then ideological differences inevitably led to war, helped along by some probe trickery to stir things up, and I invaded my neighbour to gain access to his projects. Rather amusingly, I conquered all his land bases and forced him off the continent, but he still survives with 6 sea bases somewhere, so I doubt he'll surrender (sunspots are currently in effect). I'm kind of curious to see if he'll make a comeback if I leave him alone.

If there was ever any doubt that the AI would know to prioritize psi units...
(https://i.imgur.com/LZuPgrQ.png)
Yowzers! :o

Infiltration shows they have 29 worms on the field, and little else. Those are going to be painful to dislodge; I may have to resort to Empath jets to clear a path.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 14, 2020, 12:30:48 PM
Regarding combat, always felt it made more sense to give large defensive bonuses in cities rather than territory. Territory bonus is like a 'for free'. I could see a small morale bonus fighting on home turf but not 50%.

Problem as I saw it was a costing issue, armor just costed too much. My solution was to just allow the use of best weapon/armor on everything. You shouldn't be discouraged from using your best technology. Using hand weapons or unarmored when you have better options is silly.

The choice should be in what chassis and abilities to pick.

I would try this but I feel with defense being so strong the whole game would come down to how fast you expand at the start, since you'd be so hard to conquer.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 14, 2020, 01:56:16 PM
> I can get a screenshot of the latter if you need it. The only other mod I'm using is SMAC in SMAX.

Always provide the save game if you're reporting bugs. An exception to this is if something is trivially repeatable, no matter which save game you load.

On a side note, next develop build will have an important fix contributed by Scient: satellite attack bug will be fixed when smac_only mode is activated!

> The AI got better at handling fungal pops as it developed, and there were quite a lot of them. Consistently rebuilt trance units.

That's what I'm thinking too. Fungal pops cause only a temporary stepback because each of them raises the clean mineral limit. It is actually best to trigger first fungal pop ASAP so then all the subsequent tree farms will raise the clean mineral limit. Some people don't actually understand this mechanic.

> Good catch! Yes, they are intended to be a planet/psi-focused faction. At the moment they're kind of a Super Cult in terms of stats:

Actually I've overlooked WORMPOLICE ability in the PSI unit preference algorithm. It makes sense to produce worms even more if they help quell the drones. In that factions case, +2 PLANET and +15% PSI causes AI to prefer worms heavily, also because it hasn't researched any advanced weapons yet.

> And yeah, coming up with half-decent base names was one of the most tedious parts of making these factions.

Bletchley Park, Comparative Advantage... you got something going on there. :D

> One thing that might hurt them badly is a loss of base. Induktio changed AI to spam military units if it loses the base ?

Maybe slightly spoiler info follows.

(click to show/hide)
Title: Re: SMACX Thinker Mod
Post by: lolada on May 14, 2020, 02:16:08 PM
Yes meta is spam enough bases to counter AI.. its effect of Thinker AI. AI spams bases and boreholes and its really hard to compete if you don't do the same. In turn you lose most of secret projects - but thats ok i guess. I managed to build 1-2 pretty much every game, you just may not get exactly the one you want. Thats for early project - player can get mid-late game project often at will if you direct research or spam crawlers.
Considering base spam, unit spam and boreholes, someone like Hive or Miriam is real threat if they spam bases get their production up and you end up in their attacking range.

Now on defensive bonus - I don't know.. human finds a way to turn pretty much every mechanic into his benefit sooner or later. For example Thinker AI spam units much better than vanilla - but still don't know how to use them well. Ie. you as a player can defend with token rover force against 3-4x larger AI force and build up behind. Mainly because attack is favored and you don't lose units. So in this case you can with few units sit behind and build up your economy while AI bangs in the wall.
Larger bonus in bases - i need to try bvanevery's mod i think he did that also. Will to power has 50% defense in base (sensors dont give bonus).. Territory bonus is on top of that.. but combat gives you chance to win even when attacking below odds. Making only bases stronger instead of territory might be good solution - but AI needs more boosts, like cheaper armor (to actually not get picked up by player in field).

Will to power makes this easy picking-off units strategy harder in general due to few cumulative changes:
1. Allowing cheaper armored units - attackers like 6-6-1.. or Rovers like 10-6-2. I think cost of armored infantry is comparable to unarmored rovers. Fine change as Nexii said.
2. Making combat deadly - you have a higher chance to lose even when attack > defense. Kinda leads to spearman kills tank scenario. For example rover 4-1-2 dies like 25% of time (less i think but not insignificant) vs 1-1-1 scout. So casual attacks are not safe win.. and even when you win its unlikely rover is at full HP.. so can't kill 2-3 in a row.
3. And on top of that that territory bonus.. making attack even harder.. so that scout is practically 1-1,5-1.. or Synthmetal would be 1-2-1 turned into 1-3-1, Territory counterattack is pain - i described that earlier in post.. Scout will really hurt/kill that Rover if it ever attacks it.
4. Then weapons and armors are balanced that odds are close to each other.. vanilla usually have attack > def.
5. Healing is nerfed to 10%.. 20% in base.. Command Center does not fully heal as well.

Now this is tricky.. all this means that you can't stop AI with only a handful of units. So when AI comes knocking on your bases - you might think i am safe with that def bonus. But then you lost map control and formers, can't work tiles.. and Probes really mess up everything - ai spams them and they are armored. And even weaker AI units have a chance to kill your defenders however small if you let AI amass units base will fall. And you don't heal fast and AI takes the base.

All this in the end makes you invest more in army - defending may look easier on paper - but none the less player loses units and you still don't want AI to roam into your lands. AI is programmed to spam units - this kind of forces player to make more units. Thinker AI also expands well so they start to attack from many sides.
Now if you try to use those units in attack - they tend to die even faster :D Its a challenge -_- but thats the point i guess. Its safe to say you will lose lots of units. I'll take a screenshot when i come home.. i lost ton of units in my last game.

In that sense i don't think doing just one change is enough to really improve AI combat to challenge player. This is my view ofcourse.. generally this way of modding leads to longer games - more build focus - someone might really not what to play that style. I did for example crush Gaians with Miriam with 4-5-6 weapons early on taking their 10 bases even when they had silksteel armor(4) in last few bases. Mod boosted  Miriam to +50% attack... but even 25% or 33% would work well because units get promoted. Morgan is still wimp due to support so Miriam cuts through him as well even if he has higher tech. Someone like Yang is tough to break ^^.

Title: Re: SMACX Thinker Mod
Post by: Nexii on May 14, 2020, 02:27:26 PM
Seems to me that raising defense that much would lead to massive amounts of artillery being the best strategy. Especially with healing slowed down.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 14, 2020, 03:05:36 PM
Seems to me that raising defense that much would lead to massive amounts of artillery being the best strategy. Especially with healing slowed down.

Good point - having a few units really helps - i've been using some (you can follow AAR ^^ shamefull self-promotion). I am still learning - so i think i failed in that department - heavy use of artillery would likely reduce loses a lot - and i used it consistently but in small numbers.. 2-3 units so it takes time to hurt defenders and then i attack impatiently. I used lots of spore launchers (cheap police) to soften up ships.  Was it Civ3 that promoted artillery stacks ^^.

Actually i discovered something last night - it even make sense to use conventional missiles when base is not heavily stacked with defenders. Like it takes 2-3 turns to build the missile - it takes same time or more to build good attacking unit. And when distance is big and attacking unit is likely to die - you can just hurl the missile directly (its 20 movement) rather then try to transport unit or build drop unit.. especially if you fight over the sea like in my game. Or when trying to take down sea base. Lategame there's enough resources for that.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 14, 2020, 04:47:50 PM
Quote
Always provide the save game if you're reporting bugs. An exception to this is if something is trivially repeatable, no matter which save game you load.

On a side note, next develop build will have an important fix contributed by Scient: satellite attack bug will be fixed when smac_only mode is activated!

Very well, I'll do the minimum asked of me! I finally figured out where Windows actually stores saves...

I believe the save has both examples. Zero Point is the University base with sea colony pods. As you can "see" it's in the middle of the Uranium Flats and yet it's home to two. If you look at the narrow strait that divides the Gaians from the Monsoon Jungle, you should see a Morgan sea colony pod that he doesn't move.

Unfortunately the game crashed so I don't have the results of many years of AI-only play (my holding Enter down macro got stuck).

Looking forward to raining death from above!

Quote
That's what I'm thinking too. Fungal pops cause only a temporary stepback because each of them raises the clean mineral limit. It is actually best to trigger first fungal pop ASAP so then all the subsequent tree farms will raise the clean mineral limit. Some people don't actually understand this mechanic.

I only learned about it when I started playing again recently. Does the AI know to wait for fungal pops before its first Tree Farm?
Title: Re: SMACX Thinker Mod
Post by: lolada on May 14, 2020, 07:57:01 PM
Here are some shots.. its will to power mod, but AI is thinker basically with some tweaks.

These are casualties, its M.Y. 2400 game is not over yet. I lost over 100 native units -_- lost many others but this display is bugged certainly - at least it can't show all the prototypes or merged them not sure. There's more to list but i didn't want to post more pictures.. i had 12 formers sniped by enemy air units. I lost quite a few 24-16-1 units and amphibious units but can't find them on list now. Checked Drones stats for example it says they lost hundreds of units but types seem all screwed up.

(https://i.imgur.com/sayuuQL.png)

This is AI city placement (terrain is not up to date - there are boreholes and improvements but my map don't show them - i can see them when i zoom to cities). Gaians stopped around 20-ish bases - they have lost some here. Aliens have even less somewhat. They are in war all the time. That's what i was talking about AI and losing bases - nothing east is colonized and there are Ruins with monoliths for example. Aliens also didn't colonize that much beside monsoon jungle and some sea bases - they have space or they could pack more cities in there (north is not visible on map.. but there's space - can be seen on minimap).

(https://i.imgur.com/4U0fQv1.png)

This is Drones map - they conquered Zakharov - defense didn't save him. He died quite quickly, he had at least 9 bases.

(https://i.imgur.com/LSS5Nhs.png)

This is AI building hovertank probes, empath and trance units. AI had lots of trance defenders at a time but it seem they upgraded them tu <> AAA units. I presume .. i doubt they died i didn't kill them.

(https://i.imgur.com/9S0BzcA.png)

Here's one lategame city, not sure what they are up to with eco damage at this point ^^ they usually keep that in normal levels.

(https://i.imgur.com/J6WivxE.png)

Thinking of it now - AI could maybe be better if they would actually be less aggressive  ::). They are fighting someone all the time.

Here's combat. For example Elite unit died -_- defender stayed alive at 10%. Then i had less exp unit win without taking dmg ^^ - so there's that randomness that happens. Yeah i forgot.. base bonus is +50%.. but Perimeter Defense makes it 100% total not 150. And With tachyon is i think 150. So thats nerfed otherwise it would be def overstacked. Without territory bonus i suppose those should be victories easily.

(https://i.imgur.com/04M9juQ.png)
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 15, 2020, 10:06:44 AM
I suspect nobody has realized this before, but the AI has a hilarious bug in faction_upkeep. When it has the energy reserves to do, it will attempt to corner energy market repeatedly each turn even if the previous attempt is still in progress! I guess having the original AI produce surplus energy is such an alien concept, this has never occurred before. This actually happened in one of the test games where one AI (guess which one?) ROFLstomped the others and was producing thousands of credits each turn. I'll incorporate some more fixes on late game events for the next release.

> Gaians stopped around 20-ish bases - they have lost some here. Aliens have even less somewhat. They are in war all the time.

Happens all the time on smaller maps. If they are at war with a neighboring faction, the AI kinda has no choice but to keep producing more units. In that screenshot the AI has also lost some of its own bases.

> I believe the save has both examples. Zero Point is the University base with sea colony pods. As you can "see" it's in the middle of the Uranium Flats and yet it's home to two.

I think what's happening here is that the AI randomly attempts to raise land bridges to adjacent land masses and sometimes it has some unforeseen consequences. It shouldn't be happening that often though. Land bridges are pretty important to help the AI grow sometimes.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 15, 2020, 10:33:00 AM
Landbridge happened in my  game i was so surprised ^^ Will AI raise land bridge to attack other AI ? Or is it accident (they wanted higher land or something?) - because AI's connected continents - but there was no room for expansion as land was taken by other AIs already. What motivates AI to terraform up/down?

Yes ok i now understand that about expansion and on number of bases. I suppose I'd like to see continent eventually filled with bases - it would be smart to sneak in colony pods even during the war. Sometimes its the best to stall the war effort  ie. defend and expand in safe zone. But i see that may be too complicated for AI.

On topic of AI aggressiveness: Is it known why AI is so aggressive? I had 5x weaker AIs declare war on me for example. Its possible if AI would refrain from silly wars in first 100-ish turns that it would have much better setup for winning the game. AI often threatens and declare wars on first contact - starting warfare that puts back both AIs.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 16, 2020, 11:56:41 AM
Well, I was ready to rage-quit my current game, as Orange's unstoppable hordes of +55% mind worms rolled over both of my pact sisters and wrecked my earlier conquests; meanwhile, Teal somehow rose to become the premier superpower on Planet, landing probe teams on my continent and harassing my sea formers with cruisers, and I had to buy him off with tech so I wouldn't have to split my attention across two fronts.

But after stepping away from the computer for a bit, I decided there was still a chance to win; and what do you know, things have turned around since then.

The answer? NBC warfare. I first discovered this magic in a previous game, and have since honed it further. My first action as Governor was to repeal the Charter, and then start pumping out jets equipped with nerve gas. They are disgustingly effective at wiping out enemy bases, and there's little they can do about it. I'd combine them with a gene warfare attack: this would take the base down to 1 pop and halve the defenders' HP, and then a single follow-up airstrike would wipe out the base for good.

The downside to this is that this precludes any possibility of surrender, and also prevents you from capturing the bases for your own use. But it utterly cripples the opponent, and you can always leave any bases with juicy projects alive for later.

I'm not actually sure if anything could or should be done about this. Frankly, at +30% I need every edge I can get. And since I already can't use crawlers or popboom...

The other godsend I had this game was probe teams. I got lucky and managed to spark a war between the two capitalism-loving factions, which neutralized their commerce advantage and kept them busy while I got my affairs in order. The advantage of the AIs being so aggressive is that I can repeatedly probe them for tech without having to fear any penalty.

Here is how the game looks like in 2225. Rather interesting setup, with 5 factions on the lower continent and 2 on the upper. I'm Lavender in the bottom-left. The no-man's-land in the centre is where Olive and Orange's bases used to be.
(https://i.imgur.com/07HEC8q.png)

Incidentally, Olive was the faction I mentioned before who got exiled to the seas. I had to exterminate him because he was being too much of a pest.

I came across an interesting quirk in the game. If you use a probe team to liberate an eliminated leader, they will reappear and then (most likely) immediately die again on the next turn, as there will probably be no space left for them to spawn. But it's possible to rescue them by calling them on the commlink and gifting them a base, preferably in a safe area. This can be handy to give you an extra vote on council proposals.

Once I've finished exterminating Orange I plan to run an experiment. I need more votes and energy, but I don't want to manage any more bases, plus that will kill my empire with B-drones. So I will ICS in Orange's former territory and then gift all the new bases to my puppet Grey. In theory, this will effectively resurrect the faction. It remains to be seen if they will actually all rebuild their "lost" facilities, or just get stuck in war mode forever more.

Curiously, the AI didn't immediately attempt to call the election for Governor when my term expired, even though Teal had the votes to win. I managed to stay in office for another 10 years as a result.

A question: Should the AI attempt to prioritize techs that lead to its preferred SE choices? Teal still has yet to research his preferred choice (Wealth, from a B4 tech) in 2225, even though he's grabbing level 5 and 6 techs left right and centre. On the other hand, this might make the AI more predictable and easier to manipulate (if you know an AI will focus on a certain tech, you can wait for them to finish it and then immediate steal or trade for it... but you can do this anyway with infiltration). Just a thought, anyway.

Tangentially, there seems to be a lot of people around here these days to talk balance and modding. Which begs the question... who's up for some PBEM? 8)

This actually happened in one of the test games where one AI (guess which one?) ROFLstomped the others and was producing thousands of credits each turn.
I bet it was the Gaians. They always seem to become a superpower in Thinker; probably because they begin the game with a terraforming advantage, and have strong bonuses for early-game exploration and mid-game empire management.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 16, 2020, 03:42:31 PM
> Landbridge happened in my  game i was so surprised ^^ Will AI raise land bridge to attack other AI ?

Yeah, it might be an interesting surprise for new players. Currently the decision making there is very random, the AI will attempt to connect any disjoint landmasses that are near each other. I think I will incorporate some new logic there for the new version. I would already have enough content for a new release but let's see what other features will make it in there too.

> On topic of AI aggressiveness: Is it known why AI is so aggressive? I had 5x weaker AIs declare war on me for example.

We've been reversing various functions with OpenSMACX but to my knowledge neither of us have really touched on the diplomacy functions. I guess some of this decision making happens in enemy_diplomacy that gets called by faction_upkeep. Coincidentally, faction_upkeep main function is now fully reversed and the next release will replace the vanilla version. Diplomacy mods have been a long requested feature for Thinker but that just depends on if anyone will make the effort to actually reverse those functions.

> A question: Should the AI attempt to prioritize techs that lead to its preferred SE choices?

The preferred way to do this is usually with the tech weights (EBDC). The research in this game is semi-randomly directed towards those techs that have matching weights with the faction priorities.

> I bet it was the Gaians. They always seem to become a superpower in Thinker; probably because they begin the game with a terraforming advantage, and have strong bonuses for early-game exploration and mid-game empire management.

Hahaha, yes. :D
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 16, 2020, 05:16:53 PM
Raising land is so much more preferable than AI attempted naval invasions! I loved it when a Miriam really ruined my day by connecting our continents and pouring over the land bridge with a horde of her crappy rovers.

Is there a way to teach an AI that gets ejected from all their land bases to try to turn things around by becoming sea-oriented? They kind of linger on in a constantly pissed off mood off the coast until somebody bothers to conquer them, even in the early game when there's plenty of time for them to expand over the ocean.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 17, 2020, 04:26:15 AM
I might try increasing the global warming denominator to 3. The AI is cooking Planet before anybody discovers Advanced Spaceflight!
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 17, 2020, 01:56:50 PM
> I might try increasing the global warming denominator to 3. The AI is cooking Planet before anybody discovers Advanced Spaceflight!

Were you previously using the default value 1/2 ? It might be convenient to adjust this also for the new release.

I might adjust the base placement a little bit for sea bases, it emphasizes coastal locations maybe too much to be optimal. But I've been also busy trying to develop better methodology to reverse some of the bigger functions in the binary. There's some serious challenges.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 17, 2020, 03:17:21 PM
Were you previously using the default value 1/2 ? It might be convenient to adjust this also for the new release.

I might adjust the base placement a little bit for sea bases, it emphasizes coastal locations maybe too much to be optimal. But I've been also busy trying to develop better methodology to reverse some of the bigger functions in the binary. There's some serious challenges.

Yes. I had been playing the previous version with 3/5. I'm not a big polluter myself so 1/2 was a little too aggressive in my games. I reverted to 1/2 for these tests. Might try 2/5 in my first test game. It's possible my personal alphax's 1,2,0 forest nerf is slowing the general rate of tech research Planet-wide, but I did that mostly to hurt myself! The AI surely gets most of its energy from advanced terraforming?

Quote from: Induktio
I might adjust the base placement a little bit for sea bases, it emphasizes coastal locations maybe too much to be optimal. But I've been also busy trying to develop better methodology to reverse some of the bigger functions in the binary. There's some serious challenges.

I wonder if their love of coastal tiles was Firaxis trying to stop the AI from wasting base squares on deep sea tiles they can't develop. Yet they often ring enemies with sea bases so they get no benefit at all from land tiles... I think getting them to settle even one tile offshore would be a big improvement. Or maybe any deep sea tiles within the base squares is deeply penalized by the placement algorithm. At one point in my last game, Santiago decided she wanted to colonize an entire shallow sea quite abruptly and very methodically. Maybe she saw the writing on the wall with all the global warming, lol.

Good luck! I wish I knew C++ but alas I do not.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 19, 2020, 08:04:15 AM
It's 2251 in my current game, and I think we're approaching the beginning of the end. With any luck, I'll be finished right as the new dev build comes out. :D

I had to postpone the AI resurrection experiment, as despite running Demo/Planned for a cumulative +5 GROWTH and PTS-ICSing like there was no tomorrow, the AI still had more population than me.

Upon learning the necessary tech, Teal immediately tried to become Supreme Leader despite not having the votes. I suppose he was hoping that I'd let him win out of frustration; I almost did for a moment there. As it happened, this mostly had the annoying effect of making me wait for another 20 years before I can launch my own bid for Supreme Leader.

My plan was therefore to launch a limited offensive to seize his naval bases, denying him votes, and then sit back on Demo/Green/Wealth raking in cash while the remaining AIs fight among themselves. Since I still had some leftover rovers from the Orange Extermination War, I decided I'd use a needlejet transport to drop them behind enemy lines and wreak havoc as a diversion.

Well, the diversion went too well and now I've found myself invading Teal's homeland with 3 rovers*, a stick, and a rock. (Let us not forget the expensive needlejet and cruise missile strikes that cleared a path for them, much like how the 300 Spartans were supported by a real army and navy too.) The AI has a lot of Perimeter Defenses and Aerospace Complexes, which slow things down a bit, but still doesn't have enough armoured defenders to man all of its bases.

(https://i.imgur.com/90JRNnQ.png)
I'm starting to think Will to Power may have a point with regards to totally nerfing offense. xD
*not even Elite rovers! smh

The AI has indeed begun building a few Geosynchronous Pods here and there, which posed a minor complication as my cheap 2e jets are no longer effective against unarmoured rovers. I'm now concerned they might start building Flechette Defenses to neutralize my missile spam tactics.

Teal also built a planet buster at some point. I'm not sure what he was planning on doing with it. It would've been somewhat hilarious to see him use it and then get swamped in worms as a result. (I reinstated the charter after finishing my chemical genocide of Orange.) I think he was trying to use it when he moved it to a frontline base, but I destroyed it and now he's building a new one.

I also saw that he managed to spend over 1,000 credits in a single turn. I'm not sure exactly what he spent them on.

Something I've noticed is that I'm consistently attacking with units that are lower in tech than the AI's. This is probably because they can build whatever they want with their snazzy +30% bonuses, but I can't afford to sit around waiting for stronger units to build, so I just spam a lot of weaker ones instead. I can concentrate them a lot better than the AI does.

It would be nice if the AI was a little less mindlessly dogmatic on occasion. While it's natural that Gold would hate me (he loves Free Market, and I can't run Free Market), you'd think he might moderate his tone a little after Teal captured half his bases and left him as a pipsqueak on the power graph. But no, he's totally going to personally crush me, any day now. ¯\_(ツ)_/¯
(Okay, granted, I was the one who started the war between Gold and Teal in the first place with a probe team. Maybe he's just pissed about that.)

RE: eco-damage. I've been playing with global warming set to 1,1, because I never actually see it otherwise. So far, two global warming events have been triggered, once by me and once by Teal. Both of us are now running Green, so it doesn't seem that we'll be polluting too much more. We'll see.

Tangentially: it turns out that two enemies pacted with the same third faction can both store their units in their bases at the same time. Diplomatic immunity!

Unrelatedly, while I remember to post about it: the AI now loves to use probes in stacks, attacking a single base multiple times in a turn. This is great. But they always use the same probe action in a given stack, and if that action is Infiltrate Datalinks, you'll see the AI using 5 probes to Infiltrate Datalinks in a row. This seems like a bug.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 19, 2020, 10:05:04 PM
AIs be like... "Human wants to have an easy victory.... hmm not today, hold my beer." :D

> I wonder if their love of coastal tiles was Firaxis trying to stop the AI from wasting base squares on deep sea tiles they can't develop.

That's not the original AI actually. Thinker always controls the movement of colony pods and decides base placement. The reason it settles so often on the coastline is that it can later transport colony pods to the land quite easily. Needs only a small priority tweak.

> The AI surely gets most of its energy from advanced terraforming?

A large part of it is usually from boreholes. Some AIs can also generate quite an hefty bonus from trade if they just manage to avoid wars.

> Tangentially: it turns out that two enemies pacted with the same third faction can both store their units in their bases at the same time. Diplomatic immunity!

Interesting, I didn't even realize this was possible!

> But they always use the same probe action in a given stack, and if that action is Infiltrate Datalinks, you'll see the AI using 5 probes to Infiltrate Datalinks in a row. This seems like a bug.

That sounds like a flaw in the game engine. Have to look into it if time permits.

Here's a hint of what features I've been planning recently. Looks like something related to this can be built into the next release:

(https://images.gr-assets.com/books/1387704240l/1411743.jpg)
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 19, 2020, 10:35:22 PM
Ahh, I thought I saw colony pods rolling out of sea bases! That's a cool hack.

Very excited!
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 20, 2020, 12:07:51 AM
> AIs be like... "Human wants to have an easy victory.... hmm not today, hold my beer." :D

Haha, yes. It looks like I will win this game (as humans always must, in the end), but it was a damn hard slog to get there.

> The reason it settles so often on the coastline is that it can later transport colony pods to the land quite easily. Needs only a small priority tweak.

Okay, that is a pretty cool trick. I've noticed the AI builds a modest number of transports in its sea bases, and this would explain why. They just need to build the colony pods to go with it. xD

Can't wait for SMACX AI to learn the art of realpolitik. :D
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 20, 2020, 02:31:26 PM
The game is finally over in 2266. I won a crushing Diplomatic Victory with 1163 votes against 133.

As another poster observed earlier in the thread, the AI performs at its best in the rover era of technology. After jets and missiles become available, it builds them but doesn't use them as effectively. And as for any kind of combined arms tactics... forget it.

There was an interesting period where the AIs suddenly became more conciliatory towards me: Teal offered a truce without preconditions (all the other times he demanded tech), and Gold was suddenly willing to sign a treaty with me if I helped him against Teal (I declined to preserve my Noble rating). I think this was when my population was at its peak, before I started gifting bases to Grey: the power disparity was so great that even Transcend AIs felt the need to cower. But when I started giving bases away, the disparity shrank and the AIs got cocky again.

I feel like the population numbers got absurdly high in this game. By mid-game both Teal and I were sitting on at least 300 pop each, and at the end I had nearly 600 pop with another 200 gifted to my puppet Grey. Granted, a large chunk of that was from conquests: Teal conquered a bunch of bases from Gold, and then I conquered all of Teal's land bases in turn. The other chunk was all the degenerate PTS-ICSing I engaged in, back when it seemed like Teal's rise was unstoppable.

The AI resurrection experiment didn't run for very long, but the initial results weren't too promising. It built some formers and facilities (mainly Rec Commons), but mostly it just focused on pumping out military units. This fits with previous observations that the AI doesn't do very well transitioning back from war to a peace footing. It also didn't know to move its HQ from its reservation to a more central location, so most of its energy got lost to inefficiency.

I also forgot to give them any drone control measures with the bases, so soon their entire gifted empire was rioting. Oops.

But hey, I still got a nice chunk of commerce out of the setup, so the theory is sound. Even if it is totally exploiting the game mechanics.

The tech rate didn't seem as crazy as in my earlier game, but maybe I just didn't play long enough to see it. My energy income was rather poor throughout the 2100s, as most of it got eaten up by facility maintenance; I'd be lucky to hit double digits with a 50/50 split most turns. It then rose steadily in the 2200s to 100-200 and suddenly spiked hard around 2252 to 400-600. By the end of the game I was researching a level 9 tech in 4 turns...

Oh, and I forgot to mention this before, but I have the tech rate set to 75% in my games. So it would probably be even worse otherwise.

I think part of the reason for this is that the gaps between techs become proportionately smaller as one goes up the tree. Going from level 3 to 4 is a roughly 50% increase, and the gap from 4 to 5 and 5 to 6 is similar. I notice that research tends to stagnate around this time, with tech times in the double digits: all the early techs have been eaten up, AI trades become rarer, and factions' energy income hasn't developed yet. However, the gap between levels 4 and 8 is roughly 300%, while energy incomes have shot up 1,000% since that time. So the time it takes to research higher level techs ends up being about the same as what it took to research lower level techs, and then declines as the game goes on.

And that's without building massive crawler energy parks or satellite constellations. I've heard you can get something like 2,500 energy per turn that way, which is utterly game-breaking.

Amusingly, despite all this, nobody researched Advanced Spaceflight (D8) throughout the whole game, so Planet was just left to cook by itself.

All in all, good game. I'll probably have to go and do something actually productive now before the next build comes out. :V
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 20, 2020, 07:53:45 PM
Quote
As another poster observed earlier in the thread, the AI performs at its best in the rover era of technology. After jets and missiles become available, it builds them but doesn't use them as effectively. And as for any kind of combined arms tactics... forget it.


Same here. My "solution" has been to disable copters, increase missile range and decrease its price, and decrease needlejet range. Copters are just too powerful and I'm too tempted to wreck the AI with them when given the chance. Missiles are nice because the AI does seem to build them and they will end up killing units when they hit. Needlejets are also extremely powerful so I took away my ability to do long range strikes deep into AI territory with them. Plus the AI can't stray too far from its own bases.

I justify it by telling myself that the factions on Planet don't want to repeat the early days of Earth flight with primitive instruments and line of sight weapons. If they want close air support, a needlejet works well. For long range strikes, they would use an unmanned missile not a B-17 style needlejet.

Quote
Amusingly, despite all this, nobody researched Advanced Spaceflight (D8) throughout the whole game, so Planet was just left to cook by itself.


Interesting. I wonder if that's been a problem in my games, too...
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 20, 2020, 11:55:04 PM
Same here. My "solution" has been to disable copters, increase missile range and decrease its price, and decrease needlejet range. Copters are just too powerful and I'm too tempted to wreck the AI with them when given the chance. Missiles are nice because the AI does seem to build them and they will end up killing units when they hit. Needlejets are also extremely powerful so I took away my ability to do long range strikes deep into AI territory with them. Plus the AI can't stray too far from its own bases.

I justify it by telling myself that the factions on Planet don't want to repeat the early days of Earth flight with primitive instruments and line of sight weapons. If they want close air support, a needlejet works well. For long range strikes, they would use an unmanned missile not a B-17 style needlejet.
I don't disagree - jets, copters, and missiles are all nerfed in the mod I use*. But I'm somewhat averse to changing stuff in the game just to make the AI work better. One of the things I like most about Thinker is that it makes the AI perform so much better regardless of whatever alphax.txt one happens to be running.

Now, nerfing stuff to ensure BalanceTM between human players, that I can get behind. :D

But yes, the ability to conduct long range strikes deep into enemy territory makes SMAC very swingy at mid-game. Having a generalized territory defense bonus like in WtP suddenly seems like a good idea after observing that.

*I say 'the mod I use' and not 'my mod' because I didn't actually come up with it myself. Someone else came up with it over a decade ago and we dug it out again for our PBEM games together. I like basically all the changes it makes so I'm low-key trying to get him to finish it and spread it around more, but he's rather busy lately...

Interesting. I wonder if that's been a problem in my games, too...
It could just be luck. As the modders tell us, the AI's tech selection is totally random. ;)

Depends on whether you've made any tech tree changes, as well. For me, C6 Retroviral Engineering is a second-order preq for Advanced Spaceflight (replacing Fusion Power), and nobody bothered to research that either.

It also turns out that none of the AIs ever researched the tech that allows 2 special abilities (B5 Bio-Engineering in my game). I actually realized this at one point and made a point of denying it to them. This should definitely join the list of AI-prioritized techs Thinker has.

Oh, another thought I keep forgetting to write down. Is it possible to make any changes to the mechanic that taking a base destroys half its facilities? I realize that war is supposed to be bad, and that collateral damage is inevitable, and that seizing fully-stocked bases might overpower an attacker too much; but those facilities represent over a century's worth of investment, and if one loses a substantial chunk of them, it becomes very difficult to recover in any reasonable timeframe. Even if you take the base back, it's already effectively lost to you - at least in any timeframe relevant to winning or losing the war.

If this could be changed, I propose that fewer facilities be destroyed when a base changes hands - say, 30% or so. Still a penalty, but less crippling.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 21, 2020, 10:08:10 AM
Changing combat that defending unit deals some damage to attacker even if outclassed really  nerfs copters. They are not nearly as  good in WTP due to randomness. Vanilla has snowball combat so one copter can kill ton of units. WTP copter gets damaged pretty much always and can kill _maybe_ 2-3 armored units in the field and will die. If armor is good it can kill 1 and has to retreat or risk dying. Downside is that sometimes (rarely but it happens since there's so much combat) you have scenario where weaker unit just stomps stronger unit.. spearman kills tank scenario.

Attacking the base with armored defender in - copter kills 1 unit max usually.. if there's AAA or aerospace complex its just not smart to risk copter dying. Cheap Infantry with +25% is way safer option.

When i used it in WTP - due to territory bonus - they really couldn't kill multiple armored units. For example they can sniper several unarmored formers. And they are still awesome for its movement and they are quite strong defending unit and counter to anything lightly armored. Same logic goes for needlejets - their advantage over copter is higher range.

Missiles i found almost useless in vanilla - because they "die". If combat is skewed that attacking unit has real chance to die (as in WTP) then missiles actually become useful and even cost effective.  They are not op as they are countered by AAA and aerospace complexes and they are not cheap. But their range and power really makes them interesting to spam in backward bases.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 21, 2020, 11:23:00 AM
> The tech rate didn't seem as crazy as in my earlier game, but maybe I just didn't play long enough to see it.

Originally I planned the costs in the tech formula pretty conservatively so that they would not diverge from the old values that much. Based on these reports it seems feasible to go way beyond that. Currently the base cost formula was 3 * Level^3 + Level*117. I think I'll change it to say 5 * Level^3 + 115*Level in the next build. This will proportionally increase the costs for the later techs much more.

> This fits with previous observations that the AI doesn't do very well transitioning back from war to a peace footing.

Did the AI still had vendetta status with other factions? Otherwise I can't see what would be the issue here.

> Is it possible to make any changes to the mechanic that taking a base destroys half its facilities?

I mean sure somebody can mod that easily by patching capture_base function, but I haven't considered how necessary that would be.

> Changing combat that defending unit deals some damage to attacker even if outclassed really  nerfs copters.

So talking about the WtP patches, the issue I see here is that combat mechanics are pretty complex and with Thinker Mod I've really tried to avoid extensive binary modding. With very few exceptions, the patches just work by writing new call pointers to the game binary and then the main logic gets executed inside dll. Looking at those combat patches they seem to require pretty extensive modifications to the main battle functions on the binary level, so I'm not sure what glitches can be hiding there. And then if I do merge them, it would seem to go against the spirit of the mod to make new combat mechanics enabled by default. I just can't feel it's necessary enough to just go patching these new combat mechanics in there. Maybe I'll import a couple of the non-combat patches though.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 21, 2020, 11:59:26 AM
Sure - just noting an interesting way to nerf copters. Obvious nerf would be to limit them to 2-3 attacks max (but i don't know if thats possible - some might hate that change actually) or to give them something gamey like -50% base attack. That would reduce their usefulness, but they could kill tons of units in the field.. so its half-measure.
This could be then exposed so modders can change it for example.
This logic works well for other units - for example worms are cool, but only have 1 attack per turn forever. Infantry has that base attack bonus and 1 attack per turn (there's that grav ability that gives them double movement..) and rovers attack twice and have bonus in open.
Bvanevery said he removed them completely from his mod due to how unbalanced he finds them - and i agree they are totally op in vanilla compared to other units.
Title: Re: SMACX Thinker Mod
Post by: dino on May 21, 2020, 12:57:08 PM
Air units don't require any other nerf than combat rules from WtP.

In vanilla attacker almost always win without looses in the open, combined with collateral few mobile units can wipe multiple SoD.
No collateral and increased armors slightly and all air units turns into very mobile, but economically inefficient combatants.

Same with magnet tubes, once defending in a base with perimeter is slightly in favor of defender instead of 1:1 like in vanilla and surviving attacker units need few turns break to repair, it's impossible to snowball, if anythig tubes should allow defender quickly concentrate forces in the point of attack and retake lost bases, so an option to make AI build them again should be made available.

Disabled by default, but available as an option, WtP features below are must have for this mod going forward imo:
1) Adjustable healing rates.
2) Adjustable collateral.
3) Adjustable perimeter and tachyon bonus.
4) Adjustable reactor impact on cost and HPs

Other combat features from WtP wouldn't hurt as an option, but are not essential.

I'd also love to see:
1) Coastall bases expanding borders into sea like sea bases.
2) Option to disable 50% condenser bonus.

***

Back on topic of AI improvement.

AIs loose it's edge mid to late game since it leave freshly established bases too much on their own:
1) It could build some additional crawlers, formers and defenders in established bases and rehome them to the new ones.
2) It could concentrate on hurrying essential infrastructure in new bases more.
AI could also get a cheat to hurry without penalty before first row is filled, since player can partially rush first row and then finish the next turn, would help with emergency hurryig defenders.

Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 21, 2020, 01:05:56 PM
> Did the AI still had vendetta status with other factions? Otherwise I can't see what would be the issue here.

Grey previously developed a vendetta with White (I'm not really sure why, though; they weren't near each other, both were my pact partners, and have no SE differences until Future Society. A stronger faction opportunistically declaring war on a weaker one?), but I had them call it off before I started gifting bases. It could be that whatever threat calculation the AI uses still considers this to be dangerous, despite having a truce (and later treaty).

I also wonder whether vendetta status actually gets cleared if the other faction gets eliminated. Specifically: Orange eliminated Grey, I used a probe to liberate Grey (who still had vendetta with Orange), then I eliminated Orange. But I think this doesn't actually remove the vendetta status between Orange and Grey. I saw a similar occurrence in a previous game where I eliminated a faction, then that faction got liberated, and still had vendetta with me upon meeting again. This might mean that the AI was never actually "at peace" to begin with.

Tangentially: if you commit atrocities against Faction A, then Faction A gets eliminated by Faction B, then you use a probe to liberate Faction A from B's HQ, they will still hate you forever. Can't exploit the game that way, alas.

RE: combat balance, I agree that I wouldn't want to see major changes enabled by default in Thinker. Just any options to tweak things around would be good. I see an option to tweak collateral damage has already been added to the repo, good stuff. ;b;

I think another big problem with copters is that because attacking doesn't end their turn, they can always return to safety after attacking - and even with a lower movement range, if they are used to support an assault, they can make their attack and then safely garrison inside the target base once it's captured. Conversely, jets (and gravships) are left exposed after their attack, so being too reckless with their use gets them shot down - and jets with decent weapons are pricey.

Of course, the real way to balance them is for my unarmoured rovers to get mowed down by the AI's own copters. Alas, while they build them, the AI seems unaware of their full power. :(
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 21, 2020, 10:25:07 PM
New develop build 20200521 is now out in the downloads. (https://github.com/induktio/thinker) The changes relative to the last release are listed below - and there's a lot of stuff! This is also a preliminary list of changes for the next release. Unfortunately diplomacy features can't make it into this build because they require much more testing first. Same with the other stuff that has been discussed here.

(click to show/hide)
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 21, 2020, 11:17:40 PM
> No collateral and increased armors slightly and all air units turns into very mobile, but economically inefficient combatants.

Actually in this version I disabled collateral damage by default. AI doesn't handle those situations very well so it should be very simple way to make them more competent.

> if anythig tubes should allow defender quickly concentrate forces in the point of attack and retake lost bases, so an option to make AI build them again should be made available.

But I would not make the AI just build magtubes nearly everywhere like it builds the roads. So it would need some kind of planning mechanism to only build them where they tactically support unit movement.

Also I've been thinking of another way of balancing the tech costs and it would be a really simple change. Right now SE Research effect feels overpowered when the player can stack bonuses up to 50% which makes research go at double speed. One unit of Research could be nerfed to only provide 5% bonus or similar. Also factions with research penalties would not be anymore so massively disadvantaged.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 22, 2020, 12:02:33 AM
+5 RESEARCH isn't double research rate btw, only +50% modifier.

However -5 RESEARCH is half research rate. RESEARCH is quite rough on the negative side.

Title: Re: SMACX Thinker Mod
Post by: Induktio on May 22, 2020, 12:58:27 AM
> +5 RESEARCH isn't double research rate btw, only +50% modifier.

Currently it's certainly implemented as a modifier where each point has an effect of 10 percentage points on the cost. So +5 Research cuts the cost in half, so the speed is doubled. But -5 Research would cause researching the same tech to take 50% longer because the cost is increased by that much.

So the fastest possible Research faction could proceed at the speed of three times the slowest possible faction. Unless there's some kind of a bug in the implementation, that's how it should go when revised_tech_cost is activated. F2 research menu should always show the actual cost after a new target has been selected. After that, the cost is locked until the tech is discovered or research is changed to something else.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 22, 2020, 01:17:28 AM
Ah so it got flipped so to speak. Yea that would make +5 RESEARCH very strong just like +5 INDUSTRY. Necessitates higher penalties on the SEs/factions that get it as a +
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 22, 2020, 01:46:37 AM
Always great to see a new build coming out. Keep up the good work :)

RE: tech cost balance:

How often does one actually get to +5 RESEARCH, though? SE Knowledge gives +2, and science factions like University or Cyborgs get +2, and that's all you're going to see for most of the game. I maintain that raw energy input is the biggest culprit behind unstoppable tech runaways.

That said, it's probably a good change. Brings factions with different RESEARCH scores more in line with each other.

> But I would not make the AI just build magtubes nearly everywhere like it builds the roads. So it would need some kind of planning mechanism to only build them where they tactically support unit movement.

I'd say a good starting point here would be to have the AI just build magtubes on straight-line distances between cities. Being able to build units in one place and bring them to another would already be a big boost. It'd require constant checking to see which cities already have magtubes between them though, if no data is being stored in the save file.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 22, 2020, 02:11:40 AM
Though now that I'm rechecking these numbers, it looks like the current revised_tech_cost is bugged. Depending on how these costs get calculated in the game engine, the SE research factor might not have an effect like it's supposed to have according to the documentation. Have to look into it more closely later. Should be easily fixed though in the next version and it doesn't affect games in other ways than the research costs.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on May 22, 2020, 03:26:10 AM
Something not right with Thinker AI former automation. See this former trying to build solar on mine while there are lot of unworked tiles around.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 22, 2020, 08:37:10 AM
Quote
Necessitates higher penalties on the SEs/factions that get it as a +

I don't think this is the case in practical gameplay for AI - it looks like Zakharov/University is weakest faction in the Thinker. He always gets stomped once Probe teams come into play. Maybe if he get Hunter-Seeker that he has some chance to be the best, but I doubt it.

The best factions are industry ones usually - Hive and Drones and whoever starts at Monsoon jungle. Both of these factions have slower research, but from what i can observe always play better. RESEARCH is actually not that great stat once probe teams are in play. Especially if AI is using armored probes - what poor Zakharov researches through hard work others easily steal and trade away. Drones also kill him its just too strong a nerf for AI - I'd like to see that removed from him - bvanevery removed it in his mod i think.

Quote
One unit of Research could be nerfed to only provide 5% bonus or similar.
This might help a bit to nerf player - but AI won't really get better.

I wouldn't speak of RESEARCH isolated - it needs to be looked through factions and SE choices. +2 Research is not really good if its coupled with -2 Industry.. and it doesn't save Zakharov, nor it ruins Drones/Hive.

I think EFFICIENCY is more important attribute especially to AI. Late on + EFF is often better than +RESEARCH or +ECONOMY.

Quote
I'd say a good starting point here would be to have the AI just build magtubes on straight-line distances between cities.

This would be great to have.

Another thing that would be good to improve:

AI using 1 food tile (in ocean) or 1f/1e fungus for example instead of much better specialist. 1 food in general is bad idea to work as city will grow and starve.


Title: Re: SMACX Thinker Mod
Post by: dino on May 22, 2020, 11:39:20 AM
But I would not make the AI just build magtubes nearly everywhere like it builds the roads. So it would need some kind of planning mechanism to only build them where they tactically support unit movement.

Magtubes only to connect bases, roads, could be limited to rocky mines, connecting bases, and tiles surrounding bases.
AI could build roads and tubes toward enemy  territory, *if* enemy is weaker and AI is going to invade.

Also I've been thinking of another way of balancing the tech costs and it would be a really simple change. Right now SE Research effect feels overpowered when the player can stack bonuses up to 50% which makes research go at double speed. One unit of Research could be nerfed to only provide 5% bonus or similar. Also factions with research penalties would not be anymore so massively disadvantaged.

Given exponential growth of tech costs, I'm not sure smaller bonus would allow meaningful long term advantage.

Title: Re: SMACX Thinker Mod
Post by: Induktio on May 22, 2020, 08:17:02 PM
Now that I'm reconsidering it, modifying Research effect doesn't make sense if Industry effect remains the same. The latter is certainly stronger for the AIs and probably can't be modded easily, the production stuff is hardcoded in so many places.

I'm thinking if Magtube building gets implemented, the AI should only build them between bases and avoid any redundant connections (that's how a human would build them too). If they get built everywhere, it looks a little too ugly. But it's somewhat tricky to code this process right. And there's the diplomacy features to consider too.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 23, 2020, 06:35:17 PM
I just completed a game with 2/5 global warming in alphax and the sea rise was still overwhelming. Morgan and Lal, who had the Monsoon Jungle, burned up the planet real fast. Nobody proposed a solar shade and I never got there due to being crippled early on by a massive Spartan attack.



I did not, oops. Still set to 1/2.


Will the diplomacy improvements cover the AI being smarter about Supreme Leader elections? I think Lal called one election as soon as he could and he was only a few votes off from winning outright, like single digits short. I was his pact sister. Maybe he thought I'd vote for him? He then waited much longer than 10 years to try again.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 23, 2020, 11:09:07 PM
> Will the diplomacy improvements cover the AI being smarter about Supreme Leader elections?

Probably not, since I haven't looked into this specifically. Rather I think the most flawed part of current diplomacy AI is that they tend to be a little too aggressive and declare vendettas recklessly. This would need some kind of adjustment if I can figure out a good way to do it.

How much did the sea level rises affect the size of the continents, e.g. how much of them got submerged and on which timeframe? Did you notice any other significant changes in AI behaviour?
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 24, 2020, 02:22:59 AM
Will the diplomacy improvements cover the AI being smarter about Supreme Leader elections? I think Lal called one election as soon as he could and he was only a few votes off from winning outright, like single digits short. I was his pact sister. Maybe he thought I'd vote for him? He then waited much longer than 10 years to try again.
Being the Governor only means you can call the Council every 10 years on different proposals. You still have to wait the full 20 years to bring up a specific proposal again.

I think of these votes as being kind of like warning shots: the AI has this big of a population, if you don't do something about it they're going to win the game outright. Of course, as was so aptly demonstrated in my last game, that something is usually to invade the offending AI to steal their votes...
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 24, 2020, 10:39:25 PM
How much did the sea level rises affect the size of the continents, e.g. how much of them got submerged and on which timeframe? Did you notice any other significant changes in AI behaviour?

Lal won a diplomatic victory in 2294 and by then I estimate there was nearly a kilometer of sea rise. The Manifold Nexus and The Ruins were placed on coasts and they were underwater by the end. Not sure if they start at a default height. Some of my coastal bases slid into the sea. One of mine was hit by a tidal wave. It was a strange game. Lal had a power graph like an experienced player playing Citizen difficulty.

I started a new game at 2/5 global warming and will let you know how things go in more systematic detail. I believe Yang has his own continent and he sniped the Weather Paradigm from me so I'm expecting him to be the big polluter. Standard planet, abundant worms, thinker difficulty. I disabled the Monsoon Jungle this time around.


Being the Governor only means you can call the Council every 10 years on different proposals. You still have to wait the full 20 years to bring up a specific proposal again.

I think of these votes as being kind of like warning shots: the AI has this big of a population, if you don't do something about it they're going to win the game outright. Of course, as was so aptly demonstrated in my last game, that something is usually to invade the offending AI to steal their votes...


I see, though it still seemed longer than 20 years. Could be wrong. I'll check next time it happens. There was no stopping Lal in this one. He got The Ascetic Virtues and covered the Monsoon Jungle in size 18 bases!
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 26, 2020, 03:27:08 PM
Update: So far I've had three sea rise events on 2/5 settings and abundant life:


2249: 66m
2263: 266m
2278: 266m


This is entirely AI-driven. I'm playing the Gaians and have almost no eco-damage and no advanced terraforming improvements. Lal and Zak have both chosen Green economics but I'm not sure if they need the efficiency (their empires are not very large). Morgan is on Simple for some reason. Yang, who sticks to Planned, did indeed start on his own continent. I saved the game at the start so it will be easier to compare initial coastlines with final. I know at least Zakharov has Advanced Spaceflight but he has not proposed a solar shade. It's not because of sunspots.


Lal seems to be getting his eco damage under control thanks to inducing vicious fungal pops and by building The Pholus Mutagen (damn him!). I am seeing trance units everywhere (which are really annoying for my worm-based army!).


By the way, AAA foils/cruisers are effective against me because I typically defend myself from sea invasions with needlejets. Is that your doing? :)
Title: Re: SMACX Thinker Mod
Post by: tnevolin on May 26, 2020, 04:31:48 PM
Update: So far I've had three sea rise events on 2/5 settings and abundant life:


2249: 66m
2263: 266m
2278: 266m


This is entirely AI-driven. I'm playing the Gaians and have almost no eco-damage and no advanced terraforming improvements. Lal and Zak have both chosen Green economics but I'm not sure if they need the efficiency (their empires are not very large). Morgan is on Simple for some reason. Yang, who sticks to Planned, did indeed start on his own continent. I saved the game at the start so it will be easier to compare initial coastlines with final. I know at least Zakharov has Advanced Spaceflight but he has not proposed a solar shade. It's not because of sunspots.


Lal seems to be getting his eco damage under control thanks to inducing vicious fungal pops and by building The Pholus Mutagen (damn him!). I am seeing trance units everywhere (which are really annoying for my worm-based army!).


By the way, AAA foils/cruisers are effective against me because I typically defend myself from sea invasions with needlejets. Is that your doing? :)

I don't remember if ecodamage sea raise is limited to some height or is it never stops when started. Does abundant life affect ecodamage? Don't remember this either.

All AI tweaking is Induktio's doing from Thinker mod that is included in this one.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 26, 2020, 04:52:52 PM
I always found the amount of sea level rise a bit ridiculous so I turned it off in my own mod. All ice on earth melting is only about 80m of sea level rise.

I'd argue that extreme pollution might actually lower sea levels as the oceans start to boil over, more water vapor in the air. Also would make the planet drier. But supposedly that takes a huge amount of pollution, 10x or so of all Earth's fossil fuels. And Chiron doesn't have any natural fossil fuels at all. Although all those synthetic ones could be theoretically worse somehow.
Title: Re: SMACX Thinker Mod
Post by: Geo on May 26, 2020, 06:16:58 PM
Edited
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 26, 2020, 06:33:37 PM
Here is a picture (https://www.dropbox.com/s/ft8o4c9825le8xp/road_building.png?dl=0) of some important features that are ready to be included in the build. Road building algorithm has been completely rewritten and Thinker will now build magtubes when it has the technology. In the image you can see how the new method would hypothetically plan the routes between the bases. Notice how it can now span very long uninhabitated gaps between the bases.

In practise it will look slightly different because Thinker will build the bases closer to each other if possible. The other mod may not be immediately obvious but it is a helpful visual aid to locate certain places. ;)

> There was no stopping Lal in this one. He got The Ascetic Virtues and covered the Monsoon Jungle in size 18 bases!

In times like that it may feel like the game is trolling you. "Well sure thing, try outvoting this!"

It might be useful to set the global warming modifier to 1/3 or something. It's probably not excessive given how quickly these thresholds are being met.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 26, 2020, 07:08:01 PM
This should work no matter how I mod alphax.txt on scients patch correct? Might give it a try once I get all the kinks out of my tech tree rebuild
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on May 26, 2020, 07:15:21 PM
I don't remember if ecodamage sea raise is limited to some height or is it never stops when started. Does abundant life affect ecodamage? Don't remember this either.

All AI tweaking is Induktio's doing from Thinker mod that is included in this one.


The native life setting a multiplier according to the wiki, yeah. This one?


I always found the amount of sea level rise a bit ridiculous so I turned it off in my own mod. All ice on earth melting is only about 80m of sea level rise.

I'd argue that extreme pollution might actually lower sea levels as the oceans start to boil over, more water vapor in the air. Also would make the planet drier. But supposedly that takes a huge amount of pollution, 10x or so of all Earth's fossil fuels. And Chiron doesn't have any natural fossil fuels at all. Although all those synthetic ones could be theoretically worse somehow.


It is pretty crazy that there's a Biblical amount of water, but I'm willing to gloss over all that because it's an alien planet blah blah blah.

It might be useful to set the global warming modifier to 1/3 or something. It's probably not excessive given how quickly these thresholds are being met.


That's my next step. I've also been playing with the world builder settings for other reasons (trying to get fewer noodle continents) and noticed the sea level rise setting there. I'll try nerfing that, too. I actually don't mind the idea of there being a period of widespread eco-chaos before the technology catches up, so long as it's plausibly reversible.

Those magtubes are so tidy! Much harder for me to grief the AI with them. ;) Did you mark the headquarters base??
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 26, 2020, 09:18:16 PM
A new develop build 20200526 is now available from downloads (https://github.com/induktio/thinker). Here are the changes:

* Road building algorithm has been completely rewritten to build more natural looking road networks.
* AI will now build magtubes after the tech is acquired.
* Draw visual marker around the population label of HQ bases to identify them more easily.
* New option: auto_relocate_hq will automatically move lost HQs to another suitable base.
* Fix revised_tech_cost formula to calculate SE research effect similarly to vanilla game.
* Reduce overall sea level rise frequency to 1/3.
* Add Trance Scout Patrol and Police Garrison predefined units.

....

> This should work no matter how I mod alphax.txt on scients patch correct? Might give it a try once I get all the kinks out of my tech tree rebuild

What do you actually mean here? Nothing here should be incompatible with alphax.txt editing.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 26, 2020, 10:35:56 PM
Sweet changes  ;b; like both magtubes and trance/police units.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 26, 2020, 10:40:07 PM
A new develop build 20200526 is now available from downloads (https://github.com/induktio/thinker). Here are the changes:

* Road building algorithm has been completely rewritten to build more natural looking road networks.
* AI will now build magtubes after the tech is acquired.
* Draw visual marker around the population label of HQ bases to identify them more easily.
* New option: auto_relocate_hq will automatically move lost HQs to another suitable base.
* Fix revised_tech_cost formula to calculate SE research effect similarly to vanilla game.
* Reduce overall sea level rise frequency to 1/3.
* Add Trance Scout Patrol and Police Garrison predefined units.

....

> This should work no matter how I mod alphax.txt on scients patch correct? Might give it a try once I get all the kinks out of my tech tree rebuild

What do you actually mean here? Nothing here should be incompatible with alphax.txt editing.

Yea all I have is modified so far is alphax.txt and faction files. I found the answer more or less on the first page. I'd have to run a lot of sim games to reach conclusions. Does the terraforming algorithm take into account how good options are? Like if borehole is 0/0/0 will the AI still make them? Does it consider fungus and farm/solar/echelon?
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 26, 2020, 11:20:10 PM
> Does the terraforming algorithm take into account how good options are?

In general, no. It doesn't do on the fly cost-benefit calculations for most terraforming actions. The only real exception to this is forest vs. fungus tiles. Thinker calculates which one of these will yield more and prefer to plant them unless some other advanced terraforming can be built on the square. So modders should be very careful if they change the relative value of terraforming improvements. Usually it's much better to disable something outright (like boreholes) instead of nerfing them into oblivion. :D
Title: Re: SMACX Thinker Mod
Post by: tnevolin on May 26, 2020, 11:46:44 PM
* Road building algorithm has been completely rewritten to build more natural looking road networks.

Does it mean not every improved tile will have a road?
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 27, 2020, 12:05:38 AM
Yea that was just hypothetical lol. I prefer boreholes in the game right now I have them at 0/0/8. It was more a ponderance whether it might do farm/enricher/solar/echelon on high altitudes
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 28, 2020, 07:26:32 PM
Hmm, at this point it appears there's already enough stuff for a new release so I won't be adding much new features to it anymore. HQ relocate feature will get a small fix so that it covers all cases where the previous HQ might be lost.

Existing features in this changeset are still subject to being adjusted based on feedback. Tech progression should be somewhat slower in the middlegame compared to v1.0 but I hope it doesn't stagnate research too much. The main purpose there is to significantly increase late game tech costs compared to earlier tiers anyway.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 28, 2020, 08:42:41 PM
Cubic seems ok, I was playing around with exponential functions. But I think those might make the tech too easy in the first half and a bit too steep in the second half.

for ax^3+bx, I'd say to increase a and decrease b. Early game tech costs are too high.

Edit: Also I'd probably do away with the 'first 10 techs are cheaper' thing. IMO it's kind of a relic of the old costing formula where it was too steep for the first 10 so they worked around it with a second formula.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on May 29, 2020, 02:25:58 AM
I actually do take advantage of the "first 10 techs are cheaper" thing, by intentionally researching as many level 2 techs as possible while the discount still applies. Then I can go back to researching level 1 techs and/or just trade them from the AIs. This is probably not the intended use of the mechanic. :P
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 29, 2020, 08:58:36 PM
> I actually do take advantage of the "first 10 techs are cheaper" thing, by intentionally researching as many level 2 techs as possible while the discount still applies.

Yeah it's possible to min-max it that way but the gains remain kinda limited. It was mostly there as a way for every faction to get the basic techs a little bit easier. But let's suppose we'll do away with that mechanic. Without discounts, tier 1 techs cost 120 labs in the current version. It would have to be lowered significantly from that because higher costs delay the acquisition of former technology, for example. We can add a constant factor to the formula to adjust it better for the first tiers.

Let's say we use 5*Level^3 + 95*Level - 40. In that case the costs for tiers 1-15 look like this:

Code: [Select]
60
190
380
660
1060
1610
2340
3280
4460
5910
7660
9740
12180
15010
18260

Current difficulty scaling would add 20% for human factions on Transcend level while AI factions gain a 30% discount (cost_factor=7). Any thoughts on this?
Title: Re: SMACX Thinker Mod
Post by: tnevolin on May 29, 2020, 11:17:20 PM
There is no need to give AI research discount. They exchange technologies. So any discount for everyone will just speed up overall research rate. The game essentially becomes shorter. I don't think this is an intention.

Any faster AI discovery rate doesn't affect player much as human trade and steal techs as well.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 29, 2020, 11:57:28 PM
Yea the 10 techs thing was moreso abusable for going after early T3/4 techs (IndAuto is a big one). T2 was a bit less concerning.

Which bonuses the AI should and shouldn't get is another thing. I favor % boosts like the ones to growth, industry, and possibly research over arbitrary mechanical ones like a lower difficulty level (b-drones, growth drones, ecodamage).

30% boost in three areas is quite a lot. Compared to Deity (Civ2) which was 40% but only to industry. 30% in three areas is much more, since each is multiplicative with the others.

Adding 20% more to human lab cost is kind of the same as just giving the AI even more labs discount? To me that's a bit odd since human never had to pay 20% nutrients more or minerals more.

I'd have to recheck, I didn't think there was quite that much difference between human and AI lab costs in the stock formula..
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 30, 2020, 12:13:34 AM
Actually I was already considering nerfing that AI discount because proportionally it is a little too much. In the stock game AI gained quite a huge research discount if I remember right, but it didn't "feel" large because AI was always incompetent in managing the economic aspects.

Here it would be possible to drop either the human or AI modifer to simplify the formula. I would estimate a maximum 30% difference between human/AI on Transcend would be enough, maybe even less. Maybe just keep the player cost level the same and apply cost_factor on AI research costs.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 30, 2020, 02:30:10 AM
Somehow it feels less cheaty if the AI gets larger boosts in fewer areas.

I might be missing a few that others can point out, but the list of AI boosts is quite big:
- industry boost
- growth boost
- research boost
- drones by pop mitigation (by difficulty mod)
- ecodamage mitigation (by difficulty mod)
- b-drones mitigation (by difficulty mod)
- no production switching penalties
- no SE switching costs

Seeing the thinker AI in action did make me think how powerful ICS really is. Some of this tech increase need is due to the power of this style of play. Which everyone seems to complain about due to the micromanagement involved, but there's never a solution.

I considered that perhaps EFFIC should be reworked. B-drones were a novel idea but not really enough to stop ICS. Because really it's just +1 drone a base no matter how many bases you make. And that downside can mostly be mitigated with powerful police units.

The idea was that instead of pure distance from the capital inefficiency would be based on your # of cities. It would work something like where your closest base from the HQ suffers a small amount of inefficiency. Your 12th base from the HQ might suffer moderate inefficiency. Your 50th base might produce very little energy at all. EFFIC and mapsize would of course weigh in.

It's also worth noting that they dropped waste/inefficiency on minerals/shields going from Civ2. But this might be fine, as overall energy has many advantages over minerals in SMAC/X.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on May 30, 2020, 01:21:58 PM
Adding 20% more to human lab cost is kind of the same as just giving the AI even more labs discount? To me that's a bit odd since human never had to pay 20% nutrients more or minerals more.

It's not the same in big picture. Giving anybody research bonus makes overall research pace faster and game shorter, since everybody exchange techs.
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 30, 2020, 01:27:28 PM
Uh, hmm. That list is not entirely accurate. I'd say only the first 3 production bonuses are meaningful, the other bonuses here and there are only coincidental. At least Thinker works with the same rules than the player with eco damage and SE switching costs. There's no production switching penalty that I remember, but then again, Thinker changes production only very rarely. That would be different with the stock game.

Also I don't remember what kind of bonuses the AI gets with B-drones, if there's even any, but this statement doesn't seem correct. "Because really it's just +1 drone a base no matter how many bases you make." If you have multiple bases over the B-drone limit then you should eventually receive multiple B-drones in the same base, it's just they are semi-randomly distributed.
Title: Re: SMACX Thinker Mod
Post by: lolada on May 30, 2020, 01:51:05 PM
One suggestion: Is it possible to improve AI specialist usage? Activating them instead of using quite useless tiles. For example AI tend to work useless 1-0-0, 0-1-0 tiles or similar when it could use quite good specialists. Its notable on ocean bases - ocean producing only 1 food  - there's no even point growing.. base is gonna starve. Also notable in heavy fungus maps.

(https://i.imgur.com/fbGjC3c.png)
Title: Re: SMACX Thinker Mod
Post by: tnevolin on May 30, 2020, 02:33:38 PM
One suggestion: Is it possible to improve AI specialist usage? Activating them instead of using quite useless tiles. For example AI tend to work useless 1-0-0, 0-1-0 tiles or similar when it could use quite good specialists. Its notable on ocean bases - ocean producing only 1 food  - there's no even point growing.. base is gonna starve. Also notable in heavy fungus maps.

(https://i.imgur.com/fbGjC3c.png)

Vanilla does use specialists. It depends on their effect. Early specialists are not that valuable. For example doctor is good for quelling drones. There is not use for them when there are none. Technician and librarians are just 3 eco/lab only. This is not always better than 1 nut/min. Energy is kind of secondary thing. Whereas nut/min are essential for base growth. So even if 3 eco is better than 1 min the distinction is pretty slim. AI may not be that fine tuned to understand it.

Although, I agree that some extra tuning may render it slightly smarter.
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 30, 2020, 06:44:26 PM
Yea the other benefits aren't quite as strong as the production ones. I'd say the librarian level of drones on transcend is quite powerful though. -2 DRONES a base, effectively. I think a lot of the reason they put that in is because the stock AI doesn't really know 'when' to build Rec Commons and Holo Theatre.

I never looked into how b-drones get distributed. What I meant was the AI gets fewer due to librarian difficulty modifier. Multiple b-drones in one base might be possible. But even if they do all they do is make superdrones, which get controlled by police the same as normal drones. They are more of a penalty for -POLICE settings.

Governor has to take a lot into account also. The value of 1N changes a lot depending on how much surplus N is being made. In general I felt like it always undervalued energy, that is 1M > any amount of energy in a tile. It probably is one area where a human plays better than the AI heuristic.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on May 31, 2020, 03:16:54 AM
What is going on? I am playing WtP that uses Thinker AI for crawler placement. Look at the picture. Two crawlers convoying same 3 nutrient resources from the same square to different bases. How it this possible?
Title: Re: SMACX Thinker Mod
Post by: Nexii on May 31, 2020, 05:01:22 AM
How about those adjacent boreholes :P
Title: Re: SMACX Thinker Mod
Post by: Induktio on May 31, 2020, 01:12:28 PM
> What is going on? I am playing WtP that uses Thinker AI for crawler placement. Look at the picture.

Well, I only consider bug reports that happen with the latest version of Thinker. If you fork something, then debugging can only be done by you.

> One suggestion: Is it possible to improve AI specialist usage? Activating them instead of using quite useless tiles.

The problem here is that specialist allocation code is not reversed fully yet, so it's hard to integrate these solutions into the game engine. (Anyone want to contribute code here?) Remember that the governor for player factions uses the same logic too. I think the biggest flaw there is still that it can't fully anticipate drone riots and wastes a lot of production turns as a result. The stock AI even needed a patch to get it to use borehole tiles *at all*. Fixing the governor would probably have a really big impact on how much micromanagement it saves for the players.

I also deployed some changes to the tech cost formula: drop the difficulty modifier for player factions, drop 10 first techs cheaper rule, AI cost_factor bonus is reduced to 8% per unit, and base formula for tech costs is now 6*Level^3 + 74*Level - 20.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on June 01, 2020, 04:05:04 AM
I've installed Thinker 2.0 and tried my save there. The behavior stays the same. The Anvil of Men produces crawler in 2 turns and this crawler walks to (3,17) where there is already a crawler harvesting nutrients. Then the second crawler started harvesting nutrients too.
Title: Re: SMACX Thinker Mod
Post by: Nexii on June 01, 2020, 05:16:36 AM
So does the AI just ignore borehole placement restrictions? It wouldn't surprise me too much as it ignores tech requirements on basic improvements (farm, forest, road, sensor, mine, solar)
Title: Re: SMACX Thinker Mod
Post by: dino on June 01, 2020, 11:50:43 AM
How about those adjacent boreholes :P

Or the one on the slope of Mount Planet.
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 01, 2020, 06:11:55 PM
> So does the AI just ignore borehole placement restrictions? It wouldn't surprise me too much as it ignores tech requirements on basic improvements

I'm not sure if you're trolling here. When was the last time unmodified Thinker built boreholes next to each other? When does it ignore tech requirements?

Duplicate crawlers on one square shouldn't normally happen either. There's some kind of an issue in the save game with the way it checks if the square can be crawled or not, but I doubt one would encounter that situation normally. If those crawlers had forest tiles available, they would switch to them. Though it should get some kind of a fix for the movement code.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on June 01, 2020, 11:16:09 PM
I've played WtP and then loaded save into Thinker. No trolling intended. I understand you may doubt this is a valid test. So I'll probably try to repeat the same with Thinker from beginning. Or maybe I won't be able to.
Title: Re: SMACX Thinker Mod
Post by: Nexii on June 02, 2020, 07:28:01 PM
I'm not sure if you're trolling here. When was the last time unmodified Thinker built boreholes next to each other? When does it ignore tech requirements?

Not trolling, AI ignores tech prerequisites for basic improvements - not boreholes though. It was noted in the bug forum.
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 02, 2020, 08:43:31 PM
> Not trolling, AI ignores tech prerequisites for basic improvements - not boreholes though. It was noted in the bug forum.

Yeah but notice we're talking about Thinker here and the terraforming AI is vastly different, almost from another planet. ;)

Thinker should always check the tech requirement before performing any actions. If there's some instance where this is not the case then let me know.

And yes, it does *also* check if the tile has a valid slope before building boreholes. I haven't seen it build them on slopes where it wouldn't be normally allowed by the game rules, but the terrain shape can change afterwards because of various reasons and then the earlier boreholes will remain there anyway.
Title: Re: SMACX Thinker Mod
Post by: Nexii on June 02, 2020, 08:49:29 PM
Ok I had modded for plant forest to take tech: Ecology (Centauri Ecology). Formers take Indust (Industrial Base) to make. The AI can plant forests before getting the tech Ecology. This should apply to all basic improvements - Farm, Solar, Mine, Sensor, Road. As well the automated terraforming functions circumvent technology requirements for human players.
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 02, 2020, 09:05:36 PM
I can't replicate what you're describing here. Are you talking about automated formers in player-controlled factions? They don't use Thinker at all. It should be described in documentation btw. The only place in the code where Thinker could decide to plant forests is preceded by this check:

Code: [Select]
has_terra(faction, FORMER_FOREST, sea)
Title: Re: SMACX Thinker Mod
Post by: Nexii on June 02, 2020, 10:34:48 PM
Yea seems Thinker mod fixed the bug where it relates to AI factions, I had misread the tech list of the test factions

It does apply to automated terraforming functions which is an aside
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on June 03, 2020, 12:51:17 AM
Ok I had modded for plant forest to take tech: Ecology (Centauri Ecology). Formers take Indust (Industrial Base) to make. The AI can plant forests before getting the tech Ecology. This should apply to all basic improvements - Farm, Solar, Mine, Sensor, Road. As well the automated terraforming functions circumvent technology requirements for human players.

Nevill reported seeing the opposite back when we were first porting his mod to work with Thinker. We had formers and basic improvements (farm, solar, mine, road) available from the start, with Centauri Ecology unlocking forests. However, this seemed to confuse the AI, which wouldn't learn Centauri Ecology and thus be unable to use forests. So we ended up swapping it around so that forests were also available from the start. This was with Thinker 1.0.

Started a new game with Thinker 2.0. The AI seems to be notably less aggressive this time around: nobody instantly declared war or tried to extort techs, and I'm sitting comfortably at the top of the rankings with a significant population advantage, when previously I would be a weakling for most of the early game until Human Player IngenuityTM caught up with the AI bonuses. I think some of the AIs had trouble dealing with all the fungus on this map. Do the faction personality settings (Pacifist, Erratic, Aggressive) still influence their building priorities?

Curiously, one of the AIs appears to have moved his HQ to take advantage of a nearby Uranium Flats. When the game is over I'll go back in the scenario editor to check if he did actually move it.

EDIT: Never mind, it seems I spoke too soon. My neighbour who was quite happy to pact with me for free before has now gotten uppity and sparked a global war over demanding tech. :(
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 03, 2020, 09:28:23 PM
> Do the faction personality settings (Pacifist, Erratic, Aggressive) still influence their building priorities?

It does influence it, but the effect is somewhat subtle and shouldn't result in huge variations in development. Aggressive factions tend to build more units at an earlier date. And abundant fungus also slows down any AIs quite a lot.

> Curiously, one of the AIs appears to have moved his HQ to take advantage of a nearby Uranium Flats.

They should not spontaneously move the HQ unless the previous one was lost. With automatic relocate the game engine does it for them also.

Actually, thinking about that terraforming automation for player factions, it should be possible to implement it now when almost all variables relating to it are reversed. I'm not sure if it's strictly necessary but might be useful if some players don't want to micromanage formers all the time.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on June 10, 2020, 03:43:19 AM
1/3 global warming seems okay. A few factions are nearly to Advanced Spaceflight when it happened in my games so far. I might lower the world builder setting that lessens sea rise a little bit. So far I actually like that it is almost guaranteed if the AI is allowed to go nuts developing. It helps shake things up and puts into play a game mechanic that doesn't get much attention in the stock game.


I haven't seen any strange terraforming that's been described above.


AIs seem to go through a methodical seabase expansion phase, is that Thinker?
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on June 10, 2020, 04:59:27 AM
Things were a bit quiet here for a bit, figured I should share how my current game with Thinker 2.0 is going.

(https://i.imgur.com/rpzJ9qT.png)
I am Orange, surrounded by everyone else.

The tech rate feels like it's smoothed out a bit. I set it back to 100% for this game; it's now 2208 and we are only just breaking into level 4 and 5 techs. I personally find this a bit slow so I'm putting it back to 75% next game.

I'm really liking the new HQ markers. A small but very convenient feature.

After an initial troubled development due to fungus, several of the AIs have embarked on a massive military build-up. Lavender has a big stack of about a dozen Impact Rovers she's using to pillage Gold's bases, and Olive has an enormous army of 7r infantry, rovers, and artillery built up. The downside is that their bases are now clogged with support, although given their +30% bonuses and their love of Police State, that's less of a concern for them.

I was in the lead for some time, using my early Impact Rovers to wage some successful wars that netted me some 500 credits, very helpful for my early development. But now my lead has shrunk, and with many AIs filling their bases with 1-3t-1 defenders, overrunning them with Impact Rovers won't work anymore. I might have to actually use artillery and infantry to assault bases now.

Unsurprisingly, it's a lot easier to coerce AIs into surrendering when they don't have a zillion sea bases to fall back on after conquering them on land.

Annoyingly, once I had forced Gold to surrender, I wasn't able to get my pact partners to call off the vendetta against him, claiming they had "accepted payment for his destruction". Thus, I had to repeatedly expel their units from my territory to keep them from wrecking my new vassal... which stopped working when the sunspots occurred.

I will admit to being somewhat salty, as on the very turn that I planned to invade Olive and remove the threat he posed, the sunspots ended, Lavender renounced our pact and started attacking the "diplomatic envoys" I'd stationed in Gold's bases to keep her from attacking him.

Also, Gold is making distinctly sub-optimal SE choices, a capital offense to be sure. Specifically, he's running Police State + Free Market. These are the relevant stats:
Code: [Select]
Frontier,        None,
Police State,    DocLoy,  ++SUPPORT, ++POLICE,   --TALENT
Democratic,      EthCalc, ++EFFIC,   ++GROWTH,   --SUPPORT
Fundamentalist,  Brain,   ++PROBE,   +MORALE,    +INDUSTRY,  --RESEARCH     
Simple,          None,
Free Market,     IndEcon, ++ECONOMY, ----POLICE, --PLANET,   -INDUSTRY
Planned,         PlaNets, ++GROWTH,  +INDUSTRY,  --ECONOMY
Green,           CentEmp, ++EFFIC,   ++PLANET,   --GROWTH,   +TALENT
Code: [Select]
SE preference: Free Market

^+2 ECONOMY: {Free flow of capital}
^+2 SUPPORT: {Just-in-time supply chains}
^-1 MORALE: {Privatized military}
^-2 INDUSTRY: {Excessive contractor bloat}
^Immunity to negative POLICE: {Morally righteous}
^Extra DRONE for every four citizens: {Deregulation and austerity}
^50% hurry costs: {Angel investors}
^{May not use Power values.}

SUPPORT only goes up to +3, so adding +2 to +2 gives little advantage, especially when none of his bases are above 4 pop anyway. Likewise, immunity to POLICE means +2 combines with -4 to give -2, which gets clamped to 0 either way.

So while PS+FM would be viable for other factions, Gold doesn't get much benefit from combining these two options. Democracy is currently available, but Fundie is not.

I know there's code to handle immunity to SE effects, but I'm not quite sure how it works.

EDIT: I gifted him the tech for Fundamentalist and he promptly switched to it. I probably should have done that earlier...
Title: Re: SMACX Thinker Mod
Post by: lolada on June 10, 2020, 10:08:49 AM
Addition of those trance defenders is really nice - AI is having troubles with  worms a lot early so this change is quite cool. Also makes it harder for player to spam worms for example.

It would be improvement if AI could handle support better - they really can go overboars with - minerals. Its somewhat fixable with SE modding - AI with +support is way better than those with minus.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on June 10, 2020, 05:25:02 PM
Unsurprisingly, it's a lot easier to coerce AIs into surrendering when they don't have a zillion sea bases to fall back on after conquering them on land.

Annoyingly, once I had forced Gold to surrender, I wasn't able to get my pact partners to call off the vendetta against him, claiming they had "accepted payment for his destruction". Thus, I had to repeatedly expel their units from my territory to keep them from wrecking my new vassal... which stopped working when the sunspots occurred.


Sea exiles are very annoying because they will never be able to seriously threaten anybody again but they will spread out and get the AIs too caught up a chaotic naval war that's not worth the minerals.


I have a similar vendetta issue in my current game involving the thrice-relocated Peacekeepers and the Spartans. The Spartans told me that Lal pressed the vendetta and Lal also refused to sign a truce??? Neither were my submissives, though. I'm pretty sure I would have noticed if there was nerve gas involved.
Title: Re: SMACX Thinker Mod
Post by: Hagen0 on June 11, 2020, 01:59:00 PM
In general the AI in Smac is too aggressive for its own good. It can provide some challenge for the player if he/she gets attacked early but it can also mean they get mired in long unproductive wars among each other. It's also a bit irksome how irrational their behavior is.
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 11, 2020, 06:25:43 PM
Nice gameplay reports here. :D

> AIs seem to go through a methodical seabase expansion phase, is that Thinker?

Yeah, Thinker always decides where to build the new bases. Even though I reduced the tendency to build the sea bases on coastal squares, it's still kinda prevalent. Or did you have something else in mind?

> The tech rate feels like it's smoothed out a bit. I set it back to 100% for this game; it's now 2208 and we are only just breaking into level 4 and 5 techs.

I kinda designed it that way because many powerful economic techs become available on levels 4-5. It may feel like "tech stagnation lite" on the default settings but I suppose it's some variation to the vanilla formula. Let me know how it goes though.

> Also, Gold is making distinctly sub-optimal SE choices, a capital offense to be sure. Specifically, he's running Police State + Free Market.

Whoa, watch out here. Police State in the example utilizes TALENT modifier which unimplemented in the valuation metric. In this case the penalty would not be visible and social_ai thinks Police State has only positive variables. It's kind of an oversight because none of the vanilla choices utilize that variable.

> Likewise, immunity to POLICE means +2 combines with -4 to give -2, which gets clamped to 0 either way.

I'm not sure the way you worded it here is accurate. Immunity provides the ability to ignore negative values (they get set to 0) on one of the SE effects. Having Immunity for POLICE here would combine +2 and -4 (set to 0) modifiers to effective +2 POLICE rating for the faction.

IMPUNITY for Free Market here would provide the same effect for POLICE and also ignore the negative modifiers --PLANET, -INDUSTRY.

> In general the AI in Smac is too aggressive for its own good.

Yeah adjusting that is a planned feature for the diplomacy mod if I'll ever get around to implementing it. I think in general it would help the AIs a lot if they could delay the aggression for the first, say, 100 turns and concentrate on infrastructure building instead.

One of the reasons Gaians tend to be so strong in this mod is that they concentrate first on getting the economy boosting techs and building infrastructure while often neglecting Conquer techs in the beginning. If they survive the first 100 turns in relative isolation, soon the massive edge in economic development will show and they will tend to overtake the other factions.
Title: Re: SMACX Thinker Mod
Post by: tnevolin on June 11, 2020, 08:37:24 PM
Yeah, Thinker always decides where to build the new bases. Even though I reduced the tendency to build the sea bases on coastal squares, it's still kinda prevalent. Or did you have something else in mind?

Why though? Land squares seem like a good complement in mineral yield for shelf bases.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on June 12, 2020, 01:32:45 AM
It is the year 2227. Level 6 techs are becoming available for research. Two AIs have gotten their hands on Air Power; but will they be able to hold off my hordes of 5-1-1 infantry and 7r-1-1 rovers? (Probably not :V)

Lavender has been evicted from the mainland to join the shamed ranks of sea exiles. It seems that losing one's entire army and being down to 5 sea bases is not seen as a good reason to surrender. In hindsight, maybe it would've been better to take her peace deal: I've no idea what to do with her bases now, and I could've used the commerce income.

> Whoa, watch out here. Police State in the example utilizes TALENT modifier which unimplemented in the valuation metric. In this case the penalty would not be visible and social_ai thinks Police State has only positive variables. It's kind of an oversight because none of the vanilla choices utilize that variable.

Yes, I remember, we've talked about this before. :P My contention is that even if PS did indeed have no penalty here, it would still be a sub-optimal choice.

> I'm not sure the way you worded it here is accurate. Immunity provides the ability to ignore negative values (they get set to 0) on one of the SE effects. Having Immunity for POLICE here would combine +2 and -4 (set to 0) modifiers to effective +2 POLICE rating for the faction.

That's not how I've seen it working in-game. You can see here that the result of combining PS+FM is a net of 0 POLICE - and if the POLICE rating was in fact being increased, you would see more drones being suppressed here.

(click to show/hide)

You can test this in the vanilla game by playing as the Hive and running Police State + Green. They will end up with a net of 0 EFFIC, rather than +2. It's the final SE rating that gets clamped to 0, not the individual choices.

Impunity does work in the way you described: the penalties for the specified SE choice simply aren't applied to the faction.
Title: Re: SMACX Thinker Mod
Post by: EmpathCrawler on June 12, 2020, 04:33:59 AM
Yeah, Thinker always decides where to build the new bases. Even though I reduced the tendency to build the sea bases on coastal squares, it's still kinda prevalent. Or did you have something else in mind?

There just appears to me a distinct and aggressive seabase expansion phase that happens after the AI decides to stop expanding by land. I can't tell if I'm imagining it or if it's deliberate. Factions that are doing well (bases near the size cap, have their vendettas under control, haven't had to deal with me trashing all their stuff) seem to do this.

Quote
Yeah adjusting that is a planned feature for the diplomacy mod if I'll ever get around to implementing it. I think in general it would help the AIs a lot if they could delay the aggression for the first, say, 100 turns and concentrate on infrastructure building instead.

One of the reasons Gaians tend to be so strong in this mod is that they concentrate first on getting the economy boosting techs and building infrastructure while often neglecting Conquer techs in the beginning. If they survive the first 100 turns in relative isolation, soon the massive edge in economic development will show and they will tend to overtake the other factions.

Mellowing out would help the Spartans a lot! They can be a real pain when they get the chance to build up a large body of crack troops. I wish the AI understood that they should build a coalition against a runaway superpower and be generally wary of the human player, too. I like how the top two factions hate each other to keep each other in check, but sometimes it's not even close.
Title: Re: SMACX Thinker Mod
Post by: Induktio on June 14, 2020, 11:59:12 AM
> There just appears to me a distinct and aggressive seabase expansion phase that happens after the AI decides to stop expanding by land.

Sure, there is some very specific code that deals with the choices regarding colony pod production. It is mostly decided in select_colony > has_base_sites functions. After many iterations I settled on that logic, so that it actually counts the available sea/land tiles and does some decision making based on it.

> That's not how I've seen it working in-game. You can see here that the result of combining PS+FM is a net of 0 POLICE - and if the POLICE rating was in fact being increased, you would see more drones being suppressed here.

Oh well, should not rely on those vague descriptions in Faction.txt and instead just look at the binary instead. So apparently there's two variables ROBUST and IMMUNITY that operate only the final SE effect value.

Quote
;   ROBUST      = Halves the intensity of minus effects in the named
;                 social area ("ROBUST, EFFIC" halves minus efficiency
;                 effects in social model).
;   IMMUNITY    = Immunity from minus effects in the named social
;                 area. ("IMMUNITY, ENERGY" prevents minus energy
;                 effects in social model).

The way it's worded here seems incorrect because "social models" are clearly one of the 16 individual choices in the documentation, not the final result that gets calculated for the 11 different effects values. It has to be noted that ROBUST is currently unimplemented in social_ai. I'm not sure if there was some reports on it being bugged in the engine.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on June 14, 2020, 12:20:43 PM
I can confirm that ROBUST does work in-game. No comment on whether it appears to affect AI decision-making.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on July 01, 2020, 07:46:21 AM
So a very amusing and niche situation arose in the PBEM game I'm currently playing, and while it's not strictly related to Thinker Mod, I feel like it might be of interest to you anyway.

When trading with pact partners, it is possible to sell techs to AIs for credits in excess of what they actually have. This causes them to go into negative credits, which causes facilities to explode to make up the deficit. It is possible for a faction to lose their Headquarters this way - and currently, the new auto-relocate-HQ mechanic introduced by Thinker 2.0 does not rebuild it. Thus the AIs will end up spending the game without a HQ.

While this situation is the result of an exploit, I feel like it still merits addressing.
Title: Re: SMACX Thinker Mod
Post by: Induktio on July 02, 2020, 06:02:56 PM
> It is possible for a faction to lose their Headquarters this way - and currently, the new auto-relocate-HQ mechanic introduced by Thinker 2.0 does not rebuild it. Thus the AIs will end up spending the game without a HQ.

Ah, the hunt for The One More Bug That Got Overlooked(tm) intensifies... In all seriousness, the auto-relocate only applies when the base in question is destroyed/captured. In this case, whenever the AI loses any other base, for any reason, auto-relocate checks for HQ again, but it may take a while.

Do you mean that the HQs may explode because of the generic situation of having energy reserve shortfall or is it directly related to diplomacy? I would rather patch that logic in the way that HQs are never destroyed because of energy shortfall, but not sure yet how easy it is to implement.
Title: Re: SMACX Thinker Mod
Post by: Tayta Malikai on July 03, 2020, 01:01:06 AM
> In this case, whenever the AI loses any other base, for any reason, auto-relocate checks for HQ again, but it may take a while.

Yes, Spartans eventually got a new HQ at some point, presumably they lost a base to worms or something and the auto-relocate triggered.

> Do you mean that the HQs may explode because of the generic situation of having energy reserve shortfall or is it directly related to diplomacy?

From testing in the scenario editor, I believe HQs explode just like other facilities whenever there is an energy shortfall. However, because HQs have a maintenance cost of zero (and are first in the list of that base's facilities?), they will never be destroyed under normal circumstances, as other facilities which actually do cost maintenance will be destroyed first. The situation of a HQ exploding only arises if the faction has a negative credit balance, which is only achievable through exploits such as making the AI overpay for techs.
Title: Re: SMACX Thinker Mod
Post by: Fibonacci on July 03, 2020, 09:07:35 AM
I've seen this too, not only the Headquarters, but free base facilities, such as the hive's perimeter defenses will be consumed if the AI faction begins a turn with a negative credit balance. Just tell them you're in urgent need of energy credits, offer them your tech for whatever amount they offer, and at least in the early game they'll probably have fewer than 25 energy and the game puts them in the negative until the following turn.
Title: Re: SMACX Thinker Mod
Post by: Nevill on July 05, 2020, 10:00:40 PM
I don't suppose this can be fixed in the diplomacy logic by putting a check on that? They do have a line where they say they don't have enough credits to spare.

This can be observed most often with Pact partners, although that may be because they are most inclined to trade.

Anyway, I wonder if this should go to WTP thread or here, since I am playing WTP but the AI behavior is taken from your mod, I believe?

AIs build an army and they sit on it without doing anything. Tayta can probably tell you best since he is the one that got affected most, but I've observed this situation as Pact Brother to both his PeaceKeepers and Spartans who waged war on him. Santiago had a lot of units which could wipe him three times over, but was content to send only occasional artillery to harass his terraforming. It got to the point where he became complacent and very surprised when she finally decided to invade... three decades later. I am not sure what changed... Tayta didn't have military either way.

Do you need the saves?

Another instance of questionable decisions by AI is having extremely weak units on defense duty. Zakharov is sitting in the jungles on powerhorse bases that produce up to 20 minerals with the help of crawlers (and those are WTP minerals and crawlers, so his bases are one of the best equipped in the game), yet all of his wealth is defended by single 1-2+-1 ECM troopers. He can build better ones, and he has the money to upgrade them... he just doesn't.

It is consistent with vanilla behavior, but it still irks me. A faction can be a tech and production leader, and even have the best military in the game on paper, but still crumple to dust in a matter of couple turns because all of that military is... elsewhere.

It is possible for AI to cripple its minerals supply by producing too many units, and it is something I see Believers currently doing, so I wonder if there can be a middle ground.