Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
SMACX Thinker Mod

In an earlier post I mentioned creating a new thread for the Alien Crossfire AI improvement mod I've been developing, so here it is. Thinker mod features:

* New production AI for bases
* Improved terraforming AI (lots of condenser-farms, boreholes and forests)
* AI builds more crawlers and deploys them better
* AI will deploy colony pods much sooner instead of wandering on the map
* Customizable options for free formers and satellites for AI factions
* Does not affect player-run factions or game mechanics

Base production AI features:
* Rewritten from scratch to allow bigger modifications
* Builds military units based on the perceived threat from the other factions
* When there are no threats, builds a lot of facilities and formers
* Tries to avoid running out of minerals because of unit overbuilding
* Produces and redesigns most kinds of military units
* Can build satellites, pressure domes, and relocate HQ situationally

Project homepage: https://github.com/induktio/thinker

All the latest releases will be available there. The most recent one fixes most of the usual problems with the AI, but new features are still in development.
Reply

This question is from the other thread:
(August 22nd, 2018, 16:28)superjm Wrote: If Induktio is doing binary patching does that mean he can modernize the UI any?

Really, the wonky UI is the primary reason I haven't been able to get into SMAC despite falling in love with its mechanics and lore.

I'm not sure what kind of UI improvements do you mean, but it is perfectly possible to play this mod with the Pracx patch at the same time. The installation goes like this:

1. Extract Thinker mod files
2. Rename terranx_mod.exe to terranx.exe
3. Make sure Pracx installer patches the previous file
4. Now just start the game normally

Other than that, I'm not currently planning any UI changes because the scope of this mod is pretty much limited to AI improvements only. I might later patch some bugs in the original game which cause crashes but that's about it.
Reply

No updates for a long time, so nothing happening with the mod? Quite the contrary. wink

I recently ran a test to see how much difference this mod actually makes in the AI economy buildup. To make sure the starting locations were exactly equal, it was conducted on a flat standard size map with no oceans and only two factions, e.g. Gaians spawned twice. Thinker mod allows one to run the new AI side-by-side with the old AIs by tuning the factions_enabled parameter. In the screenshots the new AI is the one with the standard Gaian green color. I think around turn 100 the new AI already stopped expansion due to reaching the predefined base limit, which is not a low number.

Here are the labs output and gross economy income after some turns:

Quote:Turn  NewLabs  OldLabs  NewEconomy  OldEconomy
40      23      10     16      6
80      114     35     43     19
120    316     76     230    66

The difference is indeed pretty consistent and would be even more if the worker allocation used the boreholes more. It tends to neglect them often, a feature of the default governor. In this map it was able to build way more boreholes than normal due to the flat terrain though. This test was done using the develop build Thinker-dev-20180919 and it's available from the downloads page. That version also includes Scient's bugfix patches now.
Reply

That is a substantial improvement in AI performance. thumbsup Not quite jumping up to T-hawk's level, but certainly boosting the AI to a much stronger level of challenge.
Reply

Hmm yeah, some of the production decisions are inspired by T-Hawk's writeups in that Hive story. He probably would have transcended in the same timeframe though. Gaia could also very easily pop-boom in this game if the AI just figured out to switch to planned, but my mod just doesn't touch the social engineering code. Maybe it should?

Looks like the title of the most productive city belongs to Razorbeak Wood instead. Initially it was working only 2 out of 3 boreholes but in this case the governor would switch it to work all 3 at the next opportunity, making it produce 32 minerals (screenshot added). Apparently the governor will use the boreholes when it has a high enough nutrient surplus and for this purpose condenser-farms are needed. Other bases had a lot fewer condensers than usual, so that probably caused the problem of not working boreholes.
Reply

I assign my tiles the other way around. It's not first get a decent food surplus and use that to support other tiles; it's first work all the maximally productive tiles (boreholes) and then arrange food. Hopefully at a surplus if possible, but even a shortage is preferable to not working the big tiles. I don't know if you can make the AI think this way.

Can you get the AI crawlers to crawl more food? It's correct to crawl 1 food from a forest (or even fungus) instead of 2 minerals, if that 1 food makes the difference on pop-booming or supporting a borehole.
Reply

Currently the crawler preference was set roughly like the following:
1. minerals from rocky mines
2. nutrients from condensers
3. minerals from forests if 1 and 2 not available

The problem was that it did not attempt to crawl tiles which were already worked, and governor usually first selects the condensers. Apparently it is really simple to just "force crawl" any tile and the governor simply reallocates the workers so the tiles are not worked two times. Now that you mentioned this, nutrients should definitely get more crawling priority.

I've looked at the worked tile selection code at some detail and it was quite messy and pretty difficult to patch. Probably if I had to change it, I would end up rewriting the whole thing in C++ instead. Currently the governor pretty much thinks in terms of reaching the food demand first and everything else later. It's maybe not even necessary to patch if there was more priority on the condenser building and the food surpluses were increased that way. Also if all the tiles were worked due to pop growth, it would automatically start creating specialists without any need for extra patches.
Reply

Just to note, I do intend to repeat the same test scenario with the improved AI once a couple of obstacles are cleared. For a long time I avoided rewriting the former code and used a simpler patching method instead that made them build more useful improvements. I now decided to do a complete rewrite of the land-based former movement and it's somewhat working, but the details need some tuning. It's pretty complex to write any AI strategies for this kind of game, though.

Also now we have an issue that rarely if ever happened with the old AI: how to avoid excess eco damage due to all the minerals production. :D Currently the build queue deploys tree farms pretty quickly, but not sure if it should also build a centauri preserve or a hybrid forest to raise the clean mineral cap. I opted for the hybrid forests even though they're a) expensive, b) have high maintenance. The AIs don't have many places to spend the credits anyway since they don't rush production.
Reply

Well, I for one welcome the eco-damage. The cheapest way to raise the threshold is to just let it happen. Spend 30 minerals on an empath rover instead of a 240-mineral facility. Heck, it's even cheaper to build a colony pod and then another tree farm than a hybrid forest.

I never realized the AIs don't rush production. Of course that explains why they always have several hundred energy credits in the mid-game. Just getting them to do that would be another significant step.
Reply

Hmm, deployed a new build to downloads. Former movement is starting to be quite sensible now. It's certainly no simple task to overwrite some of the AI pathfinding, although now the setup is pretty flexible where I can selectively override almost any part of the AI behaviour.

Decided to get rid of the hybrid forests anyway. To be of any use it should check whether a fungal pop has already occurred, and I'm not currently sure where that variable is stored. Does the fungal pop have to be caused by the faction in question or do pops caused by other factions cause eco buildings to raise clean minerals? Not sure. Anyway, it's probably only an issue after the AI deploys genejack factories (yeah, they're high on the build queue).

Getting the AIs to rush production would be pretty simple, the problem is just coming up with a ruleset to decide when to do it. They can rush only a fraction of the items, but with the better economy it could be significant now. Maybe it's better to define some edge cases where rushing would be really useful, and start it from there.
Reply



Forum Jump: