Author Topic: SMACX Thinker Mod  (Read 167862 times)

0 Members and 7 Guests are viewing this topic.

Offline Nevill

Re: SMACX Thinker Mod
« Reply #360 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?
« Last Edit: September 18, 2019, 12:24:38 PM by Nevill »

Offline Induktio

Re: SMACX Thinker Mod
« Reply #361 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.

Offline DrazharLn

Re: SMACX Thinker Mod
« Reply #362 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 :)

Offline Nevill

Re: SMACX Thinker Mod
« Reply #363 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.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #364 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.

Offline Nevill

Re: SMACX Thinker Mod
« Reply #365 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.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #366 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.

Offline paul7

Re: SMACX Thinker Mod
« Reply #367 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?

Offline ocelotter

Re: SMACX Thinker Mod
« Reply #368 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. This is the 62nd tech I'm researching, so per the original tech_cost formula 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.
« Last Edit: October 05, 2019, 11:25:33 AM by ocelotter »

Offline Induktio

Re: SMACX Thinker Mod
« Reply #369 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. This is the 62nd tech I'm researching, so per the original tech_cost formula 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 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.

Offline ocelotter

Re: SMACX Thinker Mod
« Reply #370 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.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #371 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.

Offline ocelotter

Re: SMACX Thinker Mod
« Reply #372 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 but not in the details for Thinker on github.

Offline PvtHudson

Re: SMACX Thinker Mod
« Reply #373 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.
become one with all the people

Offline ocelotter

Re: SMACX Thinker Mod
« Reply #374 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).




 

* User

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


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Until quite recently, spider silk had the highest tensile strength of any substance known to man, and the name silksteel pays homage to the arachnid for good reason.
~Commissioner Pravin Lal 'U.N. Scientific Survey'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 47 - 1280KB. (show)
Queries used: 45.

[Show Queries]