Author Topic: SMAX - The Will to Power - mod  (Read 155214 times)

0 Members and 3 Guests are viewing this topic.

Re: SMAX - The Will to Power - mod
« Reply #510 on: June 03, 2020, 07:36:34 PM »
# Version 64

* Borehole Square,  0, 2, 6, 0.
* Retroviral Engineering is level 5.
* Advanced Military Algorithms is level 6.
* Industrial Nanorobotics is level 7.
* Planetary Economics is level 8.
* Power SE model is reassigned to Superstring Theory (L5).

In essence - nerfed boreholes minerals and moved factories a little bit earlier.

Re: SMAX - The Will to Power - mod
« Reply #511 on: June 03, 2020, 07:39:55 PM »
Sounds good to me. I'd not even make them so expensive. The opportunity cost of building a facility over formers/colony pods is always considerable. I would hardly build any in the early game if they were not so cheap to rush-build.

Any production multiplying facility should be somewhat expensive by definition.
Genejack Factory is just 10/2 - very cheap comparing to benefits.

Offline Hagen0

Re: SMAX - The Will to Power - mod
« Reply #512 on: June 03, 2020, 08:31:07 PM »
I'm playing an older version. However, when I researched Quantum Power the game asked me to upgrade my units. The upgrade costs were negative and I made a ton of money, almost 1000 credits. Is this intended?   :)

Hit end turn on the save file to replay it.

Re: SMAX - The Will to Power - mod
« Reply #513 on: June 03, 2020, 08:45:45 PM »
I'm playing an older version. However, when I researched Quantum Power the game asked me to upgrade my units. The upgrade costs were negative and I made a ton of money, almost 1000 credits. Is this intended?   :)

Hit end turn on the save file to replay it.

Very intended! 😀
https://github.com/tnevolin/thinker-doer#unit-hurry-cost-and-unit-upgrade-cost

Feel free to scan readme. It is big I admit it. However, I tried to explain all key features there as clear as possible.

Re: SMAX - The Will to Power - mod
« Reply #514 on: June 05, 2020, 04:05:25 AM »
# Version 65

* Merged with Thinker 2.0.

A lot of changes. Proceed with caution.

Offline lolada

Re: SMAX - The Will to Power - mod
« Reply #515 on: June 05, 2020, 07:53:12 AM »
Quote
# Version 65

* Merged with Thinker 2.0.

A lot of changes. Proceed with caution.

 ;b; ;b; ;b; ;b; :danc: :danc: :danc: ;b; ;b; ;b;

Re: SMAX - The Will to Power - mod
« Reply #516 on: June 07, 2020, 10:26:01 PM »
Terraroming AI

I have started to work on terraforming AI to give computer some boost. Induktio has already done a lot on unit movement in Thinker. I hope to extend this a little in terraforming part only for now.

I use the computer worked tile placement algorithm to determine which changes will be accepted by base. For that I actually change map modeling future improved state and then recompute base to let it use these new improvements. Whether modification will be accepted or not depends greatly on base needs and governors settings. In this regards this algorithm lets AI decide which improvements they need based on their current model and base settings. Of course, it may accept more than one possible improvement options. In this case I weight them by each resource. Currently I set nutrients = 1.0, minerals = 1.0 and energy = 0.5. For nutrients and minerals I count additional surplus. For energy I summarize total economy, labs, and psych. This approach allows to automatically account for any multiplying factors as well as corruption. So essentially I project the net worth of given improvement.

I bundle some terraforming action into options so they correctly compare with other options. For example, farm/enricher + mine or farm/enricher + collector or rocky mine + road. I think this makes it fairer to compare them with a single purpose improvements like forest or borehole.

One best option for each tile is determined they are ranked by their benefit for nearest base (or the one that benefits from it). Then they are distributed among the available former in this region. Highest ranked target are distributed first then second, etc. This way all bases have a chance to claim some work to be done for their benefit and no base is left behind (providing there are enough former for that. Also bases with ongoing terraforming have their requests lowered to more or less distribute number of construction sites per base.

roads

That is a real pain and weak point of algorithm. It is impossible to weight them as resources since they serve different purpose. Thank you for lolada whi proposed some dynamical adjustment to road weight. Current approach is like that.
First, there is just a flat value for road/tube. Meaning if the best yield improvement mineral worth value is no better than road value - the road is prefered.
Second, there is an additional value for base connection network. So if potential road connects bases it has an increased value and likely will be build much sooner. Now how to determine where this connecting path goes is a big problem. I didn't want to overload computer with some super algorithm calculating this. I'll appreciate if someone can provide a cheap workable solution. Currently I did it in pretty sloppy way. Each base has four roads sticking out of it in four cardinal directions (N,S,W,E) 2 tiles long. I hope that these roads will somehow intersect with similar roads from other bases thus connecting them. Pretty pathetic. 🤣
On top of that I also try to connect unconnected roads on opposite side of the tile. This is all heavily untested now. Need to see how it works out.

condensers

That one is easy. I just explicitly increase moisture around it and base tells me how beneficial it is.

echelon mirrors

That one is easy too as yield calculation automatically account for any collector nearby.

rivers

That one is kinda hard to model mostly because it flows unpredictable. To lessen my pain I just add 2,4,6,8 additional rivers around aquifer depending on aquifer altitude. Not too exact but I don't think it requires super precision.

Offline vonbach

Re: SMAX - The Will to Power - mod
« Reply #517 on: June 07, 2020, 10:57:10 PM »
How do you get the ai to actually terraform properly? When I let the AI do it the AI always does stupid things like build farms and no solar collectors.

Re: SMAX - The Will to Power - mod
« Reply #518 on: June 08, 2020, 01:36:07 AM »
Are you asking about computer enemy AI or human player automation helper (like "fully automated former")? They are two completely different things.

I am working on computer enemy AI. And I make it to do right things by completely overriding its decisions the way I just described in post above.

If you meant human player automation helper then I didn't touch it and probably never will and probably no other modder ever will.

Re: SMAX - The Will to Power - mod
« Reply #519 on: June 08, 2020, 04:31:45 PM »
Separated distance penalty from building time penalty in terraforming AI. Building time is an investment. Whereas traveling is a complete waste. Therefore, they should be treated differently. Traveling distance penalty is harsher then build time one. With this formers seem to travel less but still doing sane things.

There are still some erratic behavior when nearby bases change their immediate needs by changing workers placement, growing in size, etc. I don't know if it makes sense to build for future. Meaning still build something even if it is currently not accepted by base due to not enough workers.

Offline lolada

Re: SMAX - The Will to Power - mod
« Reply #520 on: June 08, 2020, 07:18:27 PM »
Yes thats a really good idea separating those two times. Player kind of do this automatically even without realizing.

We do plan ahead a bit - so if i see that former can't improve specific tile that base is working atm i go and check if the base will grow soon. In that case i improve the best tile i can ahead of time. Its ok for base to have one extra tile improved than it can work. It can be used for micromanaging production/growth.
I presume AI will improve more food likely - while player will maybe go and improve mine - because its important to check if the base can grow more due to drone problem and Hab Complex limitation. If base can grow improved tile is usually one with the food.
Typical situation where i go and prepare base ahead of time is usually capital/production base - to ensure i have max production and growth so i can snipe secret projects.

Anyway, only if base can't grow or grow very slowly - i go and send former to other base to travel 1-2 turns.. rarely more than that - maybe in lategame. I build bases close so there's no need to travel much. Later i use more of speeder formers so they can travel far quickly.

Another thing is when former does not have good tile to work - say mid to lategame - i go and team them up to build smth like boreholes faster. Or they go build roads towards enemies or clear fungus. This is the time to build sensors or raise terrain for example.


Re: SMAX - The Will to Power - mod
« Reply #521 on: June 08, 2020, 07:41:59 PM »
Yes. I was thinking about planning ahead but this is gray area where easy to make mistakes and waste time even more. Will cautiously think about it.

Even with 3 formers per land base they never ran out of tasks for me. If they have nothing to do I do aquifers, mirrors, raise land on shores to get more territory, etc. Never ends. Water ones are different story. One probably need one water former per two bases and even then they will eventually sit idle.

Offline Induktio

Re: SMAX - The Will to Power - mod
« Reply #522 on: June 09, 2020, 12:30:49 PM »
Terraroming AI

I have started to work on terraforming AI to give computer some boost. Induktio has already done a lot on unit movement in Thinker. I hope to extend this a little in terraforming part only for now.

I use the computer worked tile placement algorithm to determine which changes will be accepted by base. For that I actually change map modeling future improved state and then recompute base to let it use these new improvements. Whether modification will be accepted or not depends greatly on base needs and governors settings. In this regards this algorithm lets AI decide which improvements they need based on their current model and base settings. Of course, it may accept more than one possible improvement options. In this case I weight them by each resource. Currently I set nutrients = 1.0, minerals = 1.0 and energy = 0.5. For nutrients and minerals I count additional surplus. For energy I summarize total economy, labs, and psych. This approach allows to automatically account for any multiplying factors as well as corruption. So essentially I project the net worth of given improvement.

I'm not sure the changes you're describing here will result in meaningfully better AI behaviour. Maybe it's necessary if you drastically changed the cost benefit for some terraforming improvements in this mod. Though implementing cost benefit calculations is something really tedious to do in this kind of situation. Some of the changes might duplicate behaviour that is already implemented in Thinker's former logic (can't be sure based on the description).

I've been testing a lot of different approaches when it comes to build order and terraforming strategies implemented in Thinker. To get any meaningful results it basically requires A/B testing of both versions simultaneously. I think the way to do it is to have two similar AIs play against each other on a symmetrical map (disable secret projects etc) and then watch which one of them will grow the fastest. Then you might get quite a good idea which approach is clearly better or worse. You could also run a regular game with all AIs but that is so random it's basically meaningless without a large sample size. But then again, I won't be developing stuff for forked versions only.

Re: SMAX - The Will to Power - mod
« Reply #523 on: June 09, 2020, 11:36:13 PM »
Continue to working on terraforming. This is a huge task so it'll be an incremental process.

* Fixed the bug when there are more formers than tasks. Apparently that actually happens sometimes.

* Devised simplified road network algorithm. It seems to work fine. The balance between improvements and roads can be tuned with parameters and it is the best that could be done, I guess. It is pretty difficult to compare and evaluate them.

* Properly calculated water regions accessibility. Now sea formers can get out of bases and cross through own bases connecting different water regions. Neat!

* Tuned construction and traveling time parameters a little. Now they seem to travel less and do sane things 90% of the time.

Observed that they build farms a lot and but not always second improvement on it. Maybe it is just not enough formers and they got distracted on other priorities or bases grow fast due to lot of farms?

Offline lolada

Re: SMAX - The Will to Power - mod
« Reply #524 on: June 10, 2020, 08:32:52 AM »
Quote
Observed that they build farms a lot and but not always second improvement on it. Maybe it is just not enough formers and they got distracted on other priorities or bases grow fast due to lot of farms?

Basically they value food a lot - maybe they should though. Its hard to tell what is the best approach. Take this scenario: base is working two 1-1-0 tiles:
a) Do you farm + solar first one for 2-1-2? Do you build a road before moving away?
b) Do you farm - move a tile or two - farm other? No roads for example. And then solar those farms when there's no good food tiles.

So you lose on energy but get more food 6+ turns faster. Its a trade of cca 6+ food for 12+ energy - and if city grows with that food then advantage snowballs. Energy could boost up research/rushing so that could turn out better - but in general its likely that food is better choice. I hate moving formers through rough terrain so i at least want roads so i can move back quickly - but thats maybe not optimal.

*Roads tend to grow in value the more cities and units there are around. If AI meets another AI it should really have its road network so it can reinforce during wars.

- I think AI spams a lot of formers - they have eventually a ton - maybe early they don't have enough so they go and for awhile spam farms, but that is how it goes i suppose
- They do grow quickly and AI cities can grow more than player's so they tend to spam farms way more

*one thing you can do is value energy slightly more - then they build solars more often on good tiles (+2/+3 energy) before moving to another food tile - not sure if it is a good idea overall - but it makes them move less work more

*food is hard to balance: AI likes to grow and then use the doctor or psych slider. And then they realize they have drone so they build Rec Commons. Player predicts this - so he doesn't focus food - no reason to grow - until he can build Rec Common and once base can actually grow - focus more back on food. Its interesting optimization - maybe some kind of it can be done for AI.
For example i like to have at least 2+ food if base can grow.. usually I don't go more then +4 +5 (lategame is different). Instead of boosting more food i boost production or energy. For minerals i like to have min 5-6 once base gets to size 3-4 so it can build facilities. AI too often ruins its bases with low min production and - support.

I am not sure how valid/good is using slider early on for drone issues - i think its bad idea in general, at least before Holo Theatres. AI likes to grow and uses slider more. I use it only if i have to to work extra mine for secret project. Slider for psych later on looks much more interesting because there are psych boosting facilities (like Holo Theatre) in play.





 

* User

Welcome, Guest. Please login or register.

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

The ancient Chinese had a name for it: Feng Shui. We call it energy flow. It is the same thing, the same thought: energy is everywhere, but only a fraction of it is tapped by humans for their purposes. Now the Progenitors have taught us that we can tap not only our own latent abilities, but the latent abilities of the Universe itself.
~Prophet Cha Dawn 'Planet Rising'

* 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: 45 - 1228KB. (show)
Queries used: 39.

[Show Queries]