Author Topic: SMACX Thinker Mod  (Read 73127 times)

0 Members and 1 Guest are viewing this topic.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #630 on: November 22, 2020, 02:40:37 PM »
Well, I don't remember AIs ever signing pacts of surrender amongst themselves.

Anyway, I found a simple way to implement the cpu usage fix (config option cpu_idle_fix) on the mod. It should now significantly reduce cpu cycles while the game is idling. It's available for preview in develop build 20201122.

Another small change in the build: factions with negative SE RESEARCH value will now start to accumulate labs from the first turn.

Offline Casworon

Re: SMACX Thinker Mod
« Reply #631 on: December 05, 2020, 11:19:48 AM »
Hey hey

I'm having some trouble with instillation and i'm not quite sure what i'm doing wrong.

I have Alpha Centauri planetary pack off GOG and I've extracted the files too my game directory

However i don't seem to have a 'terranx_mod.exe' only a 'terranx.exe' and when running it and checking Ctrl+F4 i dont see the mod version/build date in the game version menu. Just Version: 2.0 Date: December 1999

Offline Induktio

Re: SMACX Thinker Mod
« Reply #632 on: December 05, 2020, 08:03:10 PM »
> I'm having some trouble with instillation and i'm not quite sure what i'm doing wrong.

You probably downloaded the develop build? It's okay since it has the cpu usage fix added. I don't include the exe file with every develop build since it doesn't change between releases. All of the changes are done with dll code. You can just use terranx_mod.exe from the previous release for all the develop builds. :)

Offline Casworon

Re: SMACX Thinker Mod
« Reply #633 on: December 06, 2020, 05:08:04 PM »
No idea what i've downloaded tbh, i dont have any experience with GitHub  ;lol

I saw on the right there are 8 releases, going all the way from v2.2 too v0.6. But again i cant seem to find a terranx_mod.exe in any of the releases.

I keep reading about compiling GitHub. Do i need to do any compiling of what i download or do i literally just unzip it into my game folder?

lol i'm sure theres something really obvious i'm just not seeing

Offline Induktio

Re: SMACX Thinker Mod
« Reply #634 on: December 06, 2020, 11:38:59 PM »
Hmm, did you really just download the source packages? :)

Under the header called Download, you'll see the dropbox link for releases. You most likely don't want to do any compiling.

Offline Casworon

Re: SMACX Thinker Mod
« Reply #635 on: December 07, 2020, 05:14:46 AM »
Yes i did just download the source code  ;lol oooops

Thanks for the link! I can see the terranx-mod.exe!!

Now time to immerse myself in some Alpha Centauri

Many thanks again

Offline Induktio

Re: SMACX Thinker Mod
« Reply #636 on: December 10, 2020, 08:40:31 PM »
I now uploaded develop build 20201210 to the downloads page, there's some interesting changes coming for the next release.

* Smooth scrolling support imported from PRACX.
* CPU idle loop patched to significantly reduce usage.
* More resolution config options available in thinker.ini.
* Alt+T shortcut displays new statistics about units, bases and production amounts.
* Game engine now has a new crash handler that writes information to debug.txt if the game crashes for any reason, no matter which module caused it.
* AI will now attempt to plan much longer land bridge routes to other continents. This is maybe the first significant instance of long term planning that persist in the save games for Thinker.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #637 on: December 20, 2020, 10:54:24 PM »
Good news for today... now we have develop build 20201220 available from downloads. See the changelog for all the stuff pending for next release.

By far the biggest change has been updating Thinker to manage all of the combat units. This was a very tall order because of the complexity of this game.

Another entirely new addition is the capability for AI to conduct naval invasions over long distances. If the AI calculates the closest enemy is located on another continent, then naval invasions and ships are heavily prioritized. If you try to hide behind a large ocean, think again, the AI *will* come to get you. :)

Based on some testing, this stuff appears to mostly work but there might a few hiccups. Stuff that might need improvement:
* AI doesn't use drop pods ability at all
* Scouting or making contact with other factions might take a long time on huge maps
* Zones of control are very problematic for AI movement (game design issue too)

Offline Tayta Malikai

Re: SMACX Thinker Mod
« Reply #638 on: December 21, 2020, 12:08:33 AM »
Very interesting changes. I've been kept occupied with multiplayer lately, but these changes definitely sound worth a look.

Re: SMACX Thinker Mod
« Reply #639 on: December 21, 2020, 12:14:04 AM »
Amazing AI work, man! Long anticipated. 😁

I didn't get it, though. Have you already released it or planning to? There are mixed signals.
Also do you have any readme where your changes described in more details with algorithms and examples, etc.?

I understand there are probably a lot of small changes in AI combat movement here and there so it is impossible to cover them all. Still it would be pretty interesting to learn them if you can describe as much as you can besides what is listed in Next Release changelog. Thank you.

Quote
AI garrisoning priorities are rewritten to move defending units to bases that are the most threatened.

Nice. I can retire my code on that!

Quote
Combat ships will now engage other targets with artillery much more often instead of always defaulting to normal direct attack.

Is it for ship-ship combat? Is it governed by enemy weapon-armor strength: direct attack against weaker armor and bombardment against weaker weapon?

Quote
All artillery units will use new targeting logic to place them in more useful positions and prioritize threats more accurately.

Would be nice to know more details on algorithm.

Quote
New option: clean_minerals sets the amount of minerals a base can produce before experiencing eco damage.
Fix engine bug where selecting bombardment on an empty square sometimes resulted in the attacking unit being destroyed.
Fix very rare issue where a faction might get eliminated even when they had active colony pods.

Are these same or similar changes as in WTP?

Offline Induktio

Re: SMACX Thinker Mod
« Reply #640 on: December 21, 2020, 12:44:04 PM »
Those changes listed are already part of the develop build. Nothing ambigious about it.

> Are these same or similar changes as in WTP?

I think the implementation in that aspect is mostly similar to WTP.

> I understand there are probably a lot of small changes in AI combat movement here and there so it is impossible to cover them all.

Yeah there's lots of ideas I came up with while updating the AI here. More like it's a question of how much willing I would be to write a separate blog post about it when they're already in the code. I noticed that the vanilla AI stores all sorts of weird planning variables in the save game but basically all of them can be computed on the fly while the AI is doing its turn and not having to save them anywhere.

I think many game designers (even Soren Johnson) have stated getting the AI to do naval invasions is tricky because it requires coordination from so many units. I think that was a problem in many if not at all of the Civ games. Well, here it is then...

The pathfinding still has some search limits so might need to tweak it for Huge maps or larger. Actually I don't recommend playing on maps larger than Huge. And the AI might have to wait for longer so it has a bigger fleet available to launch one bigger landing, not many smaller ones.

And probably something else that might be found in testing. It's interesting to think about how Thinker plays the game for the most part without making any distinction if the opposing faction is human or AI. Currently none of the movement code makes any decisions based on that. So it doesn't garrison human borders more or make any distinction in that when choosing attack targets.

Re: SMACX Thinker Mod
« Reply #641 on: December 21, 2020, 01:11:32 PM »
Those changes listed are already part of the develop build. Nothing ambigious about it.

Not for you. However, I was confused seeing "Next Release" as release number. Is it installable? Is it finalized? Can I pull changes from it to my code already?

It's interesting to think about how Thinker plays the game for the most part without making any distinction if the opposing faction is human or AI. Currently none of the movement code makes any decisions based on that. So it doesn't garrison human borders more or make any distinction in that when choosing attack targets.

Why not? Human is definitely a better tactician than computer. Why shouldn't AI account for that and strengthen human borders more? It is already given enormous advantage against human everywhere in the game. At least placing more defenders on human border is not a cheat at they honestly produced and maintained.

Offline Induktio

Re: SMACX Thinker Mod
« Reply #642 on: December 22, 2020, 12:10:45 PM »
Would be more useful to think about what can be contributed here. I'm not sure what kind of code you wrote that deals with garrisoning priorities.

> Why shouldn't AI account for that and strengthen human borders more? It is already given enormous advantage against human everywhere in the game.

Does that mean we should implement some kind of "AIs team up against human player" mechanic. In the AI personality screen, there's already an option with that name but Thinker doesn't consider that option at the moment. It's not selectable in random map generator, so I think a more fitting option here would be "intense rivalry".

Actually it seems a good idea to add a few more twists on that game mode. Previously players said intense rivalry was not really meaningful as it made AIs irrationally aggressive. Did anybody play multiple games with it for comparison? It has some effects on diplomacy but this combat AI would be entirely separate from it.

Offline dino

Re: SMACX Thinker Mod
« Reply #643 on: December 24, 2020, 09:49:00 AM »
Mechanics changes is not a thinker focus, but I'd still love to at least have these changes added:

1) Adjustable repair rates ( implemented in WTP ): 10% per turn, 20% with Command Center, Nano Factory instead of completely healing in a single turn.

Helps AI with wearing down human defences with disorganised units stream, makes snowballing through AI with a small force impossible, because of necessary breaks for repairs.

2) Impact of reactor on unit cost, to keep the original cost formula I'd make a simple change:

There is 1/ (2*2^(n-1)) ( n reactor level ) component in the original cost formula, change it to 1/ (2*x^(n-1)) where x is adjustable in the ini.
With x=1,33 for example, each reactor level would give 25% unit cost discount, which is what I'd go for.
If you wanted to keep it simple for an average user, you could even just have a simple on/off for 25% discount instead of vanilla 50%.

Late game units are waaaay too cheap, lots of unnecessary micro with swarms of units and running into a unit limit issue.
This change would make R4 level units over 3x times more expensive, which would improve late game a lot imo.
Even without HP combat bonus, reactor techs double military production output with a single tech upgrade, 25% discount would put them more in line with other mil tech upgrades.

3) Monopole Magnets double roads speed instead of infinite moves ( implemented in WTP ).

Combined with 20% healing, it would be safe to let AI build them: less risk of snowballing, but a chance to retake lost bases before enemy can repair invading forces.

***
And a few ideas for AI improvements:

1) Unit Upgrades.

There is a huge AI vulnerability in an early midgame where most AI units are outdated if they didn't fought any wars. At the very least I'd give keeping half of units up to date a priority over facilities hurries and the same condition that makes threatened base switch production to military, should also trigger additional unit upgrades in a threatened base. In a peace time disbanding the most outdated units if the unit support takes too huge percentage of minerals, could be considered instead of upgrades.

2) Minimum military standing:

Since the early midgame, lets say after turn 50 at least 30% + ai_fight*10% should be consumed by military units, no matter how low the threat level is.
Or base it on the number of techs known, minimum military standing should increase from 30% in early midgame, to 60% at the end game.
You can also take a peak at WTP code regarding threat and military spending, a more naunced solution than simple rule I came up with above can be derived from it.

You can't make AI predict the time and angle of attack, but you can overcome some unnecessary unit support with cost_factor.
« Last Edit: December 24, 2020, 01:41:42 PM by dino »

Offline Induktio

Re: SMACX Thinker Mod
« Reply #644 on: December 24, 2020, 12:37:34 PM »
I recently did some AI testing on Veteran's map . This is a multiplayer only focused map with a very heavy emphasis on naval invasion. I think it's also maybe the hardest map type for AI for this very same reason...

I placed there two identical Peacekeepers factions on opposite ends of the map locked in an eternal vendetta, LOL. One of them was Thinker running an updated combat AI and the other one was vanilla combat AI with Thinker. This exposed some flaws in the new AI but nevertheless, it managed to coordinate multiple transports to land an invasion force on the opposite end of the map. That kind of invasion doesn't work without air superiority however, and the old combat AI doesn't understand how to move the air units over that long of a distance. Anyways... this is probably the worst case for AI performance given the layout for the map. With continents spaced closer it would play out a lot differently 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)
-=-
21 (7%)
XP Compatibility patch
-=-
9 (3%)
Gog version for Windows
-=-
84 (30%)
Scient (unofficial) patch
-=-
31 (11%)
Kyrub's latest patch
-=-
14 (5%)
Yitzi's latest patch
-=-
87 (31%)
AC for Mac
-=-
2 (0%)
AC for Linux
-=-
5 (1%)
Gog version for Mac
-=-
11 (3%)
No patch
-=-
15 (5%)
Total Members Voted: 279
AC2 Wiki Logo
-click pic for wik-

* Random quote

Mankind has been blind for thousands of years?for all of its history. We have come to a place whose wonders are a hundred-fold more amazing than anything on Earth. Around us is clear evidence of the will of a higher power. I bring the Vision to the blind eyes of men. I bring the Word to the deaf ears of men. I will make them see it. I will make them hear it.
~Prophet Cha Dawn 'Planet Rising'

* Select your theme

*