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

0 Members and 7 Guests are viewing this topic.

Re: SMAX - The Will to Power - mod
« Reply #1740 on: February 04, 2022, 05:17:38 PM »
This is one thing I wanted to quantify. The amount of techs researched vs. acquired by other means (stolen, exchanged, given). After that I may start thinking on scrutinizing other means one by one to increase value of RESEARCH.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX - The Will to Power - mod
« Reply #1741 on: February 04, 2022, 07:32:08 PM »
WTP does a very poor job with probe teams lately.  Factions often don't make them at all.  If they do, they'll use them as defensive garrisons only.  I haven't had an AI faction try to run a probe team mission on me in eons.  I suspect you have made them too expensive for the AI to consider them worth building.

Since I hate probe team game mechanics, I haven't been inclined to complain about that.  But it does affect whether tech leakage happens or not, so I thought I should come clean.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX - The Will to Power - mod
« Reply #1742 on: February 04, 2022, 08:09:10 PM »
I'm making a cursory effort to understand WTP's source code and .ini options.  I'm not willing to get "deep into the weeds" with the code.  It's not my project, I'll never gain fame, glory, or money for bothering to spend a lot of effort on it.  Things that take a lot of effort, need to go into my own 4X commercial game work, that could potentially get me out of living out of my car poverty someday.  But, if I happen to spot something that's low hanging fruit and easy, I will at least make note of it.  I'm really only interested in whether there's 1 knob, somewhere, that can majorly change the AI performance by adjusting it.

I noticed the function, void evaluateLandColonyDemand() in aiProduction.cpp.  It looks to me like the algorithm is fundamentally opportunistic, driving colony production on the basis of available nearby empty space.  This is completely, flatly, strategically wrong. If I've guessed correctly as to what this function does, without really thinking hard about it or trying to deeply analyze it, the whole AI incompetence is based on this "map slidealong".

You don't colonize stuff because you can.  You colonize stuff because it's a valuable contribution to your empire.  That means it's got good resources, you can turn it into a big city, you don't have enough cities yet, it's close to the core of your empire, it's defensible, and it's not in danger of being overrun by mindworms or enemy factions.

If the algorithm is just trying to "fill up available space", without regard for the quality of the space, or the necessity of filling any space at all, then it explains why the AI is a complete child.

Re: SMAX - The Will to Power - mod
« Reply #1743 on: February 04, 2022, 11:07:45 PM »
WTP does a very poor job with probe teams lately.  Factions often don't make them at all.  If they do, they'll use them as defensive garrisons only.  I haven't had an AI faction try to run a probe team mission on me in eons.  I suspect you have made them too expensive for the AI to consider them worth building.

Since I hate probe team game mechanics, I haven't been inclined to complain about that.  But it does affect whether tech leakage happens or not, so I thought I should come clean.

Sure. I can crank their production. Keep in mind, though, that any AI tuning will change production balance. They cannot simply produce something more without producing something less.

Re: SMAX - The Will to Power - mod
« Reply #1744 on: February 04, 2022, 11:17:56 PM »
I'm making a cursory effort to understand WTP's source code and .ini options.  I'm not willing to get "deep into the weeds" with the code.  It's not my project, I'll never gain fame, glory, or money for bothering to spend a lot of effort on it.  Things that take a lot of effort, need to go into my own 4X commercial game work, that could potentially get me out of living out of my car poverty someday.  But, if I happen to spot something that's low hanging fruit and easy, I will at least make note of it.  I'm really only interested in whether there's 1 knob, somewhere, that can majorly change the AI performance by adjusting it.

I noticed the function, void evaluateLandColonyDemand() in aiProduction.cpp.  It looks to me like the algorithm is fundamentally opportunistic, driving colony production on the basis of available nearby empty space.  This is completely, flatly, strategically wrong. If I've guessed correctly as to what this function does, without really thinking hard about it or trying to deeply analyze it, the whole AI incompetence is based on this "map slidealong".

You don't colonize stuff because you can.  You colonize stuff because it's a valuable contribution to your empire.  That means it's got good resources, you can turn it into a big city, you don't have enough cities yet, it's close to the core of your empire, it's defensible, and it's not in danger of being overrun by mindworms or enemy factions.

If the algorithm is just trying to "fill up available space", without regard for the quality of the space, or the necessity of filling any space at all, then it explains why the AI is a complete child.

You nailed it. AI is completely child. I am absolutely 100% with you on that it may be somewhat more sophisticated. However, actual programming is quite rudimentary taking this is a patch and the original code is pretty flat and stupid. I have to solve algorithmic problems every time I am trying to teach it something sane. Takes long.

So each of "it's got good resources, you can turn it into a big city, you don't have enough cities yet, it's close to the core of your empire, it's defensible, and it's not in danger of being overrun by mindworms or enemy factions" thing turns into hundreds lines of code. The worst thing is that I cannot work on just some AI feature in isolation. They need to work at least somehow consistently. So I need to create similar code for all types and all activities at the same time and this alone is a big pain. Making small steps at a time. From 1-year-old child to 2-year-old and so on. It already beats vanilla AI per Induktio testing. Maybe we can make it even better.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX - The Will to Power - mod
« Reply #1745 on: February 05, 2022, 12:01:17 AM »
Quote
it's got good resources, you can turn it into a big city,

These are simple tile proximity metrics.  Aren't filter functions for analyzing this stuff already available somewhere?  Like finding the 2 radius intersection of resource specials.

Quote
you don't have enough cities yet,

Why isn't that 5 lines of code?

Quote
it's close to the core of your empire,

Why isn't that 10 lines of code?

Quote
it's defensible, and it's not in danger of being overrun by mindworms or enemy factions

To a first approximation, don't settle next to fungus if you're not a PLANET friendly faction.  If you're close to a faction that could turn aggressive on you, don't settle in that direction.  This isn't hundreds of lines of code.  It's some proximity and distance metrics.  Sure you may not have a "good" estimate of whether a faction will turn hostile, but you can know that it's near you, and presume it hostile.  More refinement would be estimating the health of your relationship, like if it's an alliance of permanence or convenience, and your relative faction power.  Push forward if you're strong, settle the other direction if you're weak.

Quote
The worst thing is that I cannot work on just some AI feature in isolation. They need to work at least somehow consistently. So I need to create similar code for all types and all activities at the same time and this alone is a big pain.

In the specific cases I've enumerated above, I'm not seeing the problem.  That may be because I have no idea how SMAC + Thinker + WTP is actually implemented.   ;lol  But in a clean slate design, these would be fairly trivial, very basic rule encodings.  It's the kind of basic stuff I apply as a human player over and over and over again.

Offline Rocky

Re: SMAX - The Will to Power - mod
« Reply #1746 on: February 05, 2022, 10:46:47 PM »
(Image below) I've been getting these popups from time to time in my games.

===

I agree with bvanevery about the expansion rate for the AI. It's a difficult issue and the Ai is undoubtedly better than stock AI but I noticed that even around the year 2300 the AI factions are often still in an expansion/terraformer phase.

They set up a large amount of near unusable seabases filled with drones, and their core bases are still popping out (sea) colony pods/(sea) formers.

« Last Edit: February 06, 2022, 12:07:05 AM by Rocky »

Re: SMAX - The Will to Power - mod
« Reply #1747 on: February 06, 2022, 03:58:03 AM »
Good point. I'll be working on that.

From the other hand do you stop expansion as a human? How do you define this limit for yourself when it is no use to build even another single base?
Another question is what if all factions follow this limit and do not populate entire planet? Is it optimal?

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX - The Will to Power - mod
« Reply #1748 on: February 06, 2022, 07:54:36 AM »
How do you define this limit for yourself when it is no use to build even another single base?
As I said some posts ago: boredom.  The factor working against boredom, is recognizing there's some "minimum necessary" clump of cities to do the job of stomping others.  If I've made enough cities to do the job, then I don't need more.  "Enough" in my current AAR about Thinker turned out to be 15 cities.  This was based on a procedure of happiness facilities, penalties due to EFFIC / Bureaucracy, and resources in the vicinity of my capitol.

Quote
Another question is what if all factions follow this limit and do not populate entire planet? Is it optimal?

Please try to remember that you can conquer the entire Planet, if you're really so inclined.  You do not have to personally spawn every city yourself.  If you can get things legal, you can also raze cities to the ground, so that you don't have to deal with them.  Developing the infrastructure for lots of conquered cities can get to be a real chore.  The farther away they are from my core empire, the less I am inclined to do it.

Offline Rocky

Re: SMAX - The Will to Power - mod
« Reply #1749 on: February 06, 2022, 02:14:13 PM »
Good point. I'll be working on that.

From the other hand do you stop expansion as a human? How do you define this limit for yourself when it is no use to build even another single base?
Another question is what if all factions follow this limit and do not populate entire planet? Is it optimal?

The question I ask myself is when do I reach a point when expanding no longer feels necessary for securing the game, when it starts becoming a chore and/or when efficiency becomes too much of an issue. I may still expand at times depending on different factors, like for example coming across a spot with some really good mineral deposits. In that case I would settle another base and rush all cheap buildings in it to turn it into a military production center/forward base.

The Will to Power/Thinker AI is much more efficient in building up its infrastructure than the stock AI. It can get away with less bases and still be a major powerhouse.

In the Thinker AI document we have an option to tell the AI how many bases it should settle at max. Currently it's 50 but I feel that's too much. If the setting was 15-25 at max with autoscale on 1 (so the AI would still expand if the human player has more than 15-25 bases) the AI would likely turn towards infrastructure quicker. Well developed infrastructure would allow for faster military production and more options.

If I expand as a human player it kind of goes like this:

1. Expanding with first wave of colony pods. I try to create a ring around my main base.
2. More colony pods, I start to produce basic infrastructure in my Headquarters/second base.
3. If at peace I expand until I hit the efficiency limit. Core bases produce more infrastructure. If at war, core bases produce military stuff.
4. I stop expanding a few bases over the efficiency limit. At peace all bases make infrastructure/formers. At war I still have two core bases produce stuff like Tree farms/Research Hospitals (So I don't get too much behind in tech) Unless it's a war for survival.
5. When my first wave of expansion bases have the basic infrastructure in place or if I increase my efficiency rating I do a second wave of expansion, filling up spaces which have choke points, resources or act as forward bases.

Usually I end up somewhere around 15-25 bases. (My current game is an exception as I have around 40 as the Pirates─But I find that sea expansion depends on different factors than land and I expanded aggressively because I knew the Ai was doing the same)

Overall the WtP/Thinker Ai could expand in waves (based on efficiency and new drones), doing another round of expansion when the core bases have been developed. Or based on a hard cap in the Thinker.ini file.

A few things I noticed:

1. On land the AI keeps a minimum amount of distance between bases according to the Thinker.ini file. But on sea the Ai keeps much more room between its bases. Especially for the Pirates this means overextended empires which are difficult to defend. When the Ai expands on sea it should try to expand close to the core bases first and then slowly move outwards in a ring pattern. (I haven't seen the Pirates AI settle on land yet)

2. Sea formers seem to pick unusual locations to terraform. I've seen the Ai send their sea formers across the map to aid an outer sea base, while there are other (sea) bases nearby and closer to Headquarters which also need help. This causes the Ai to lose valuable terraform time.

3. There have been a few instances the Ai prioritized expanding on sea over land. There was one game the Believers had around 3-4 land bases, and ignored the rest of their landmass for settling sea bases. It doesn't happen that much but it did cripple them in that game.
 
« Last Edit: February 06, 2022, 04:33:33 PM by Rocky »

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX - The Will to Power - mod
« Reply #1750 on: February 06, 2022, 05:59:30 PM »
When the Ai expands on sea it should try to expand close to the core bases first and then slowly move outwards in a ring pattern.

Yes and my current Thinking about Pirates AAR shows exactly how to do this right.  15 bases.  Basically I grabbed all the good resources that were nearby.  One difference though, is Thinker gives +1 sea minerals to AQUATIC factions and WTP does not.  I don't think that belies the general principle of tight concentric circles based on best resources though.

Re: SMAX - The Will to Power - mod
« Reply #1751 on: February 06, 2022, 07:57:03 PM »
Thank you for interesting notes.

1. On land the AI keeps a minimum amount of distance between bases according to the Thinker.ini file. But on sea the Ai keeps much more room between its bases. Especially for the Pirates this means overextended empires which are difficult to defend. When the Ai expands on sea it should try to expand close to the core bases first and then slowly move outwards in a ring pattern. (I haven't seen the Pirates AI settle on land yet)

It values every piece of land but not water as it is all equal and it is usually a lot of it. That's why it rushes for ocean resources first regardless of distance.

2. Sea formers seem to pick unusual locations to terraform. I've seen the Ai send their sea formers across the map to aid an outer sea base, while there are other (sea) bases nearby and closer to Headquarters which also need help. This causes the Ai to lose valuable terraform time.

Need algorithm tuning for yield vs distance priority. Also sometimes it takes direct distance into account when path to it could be very curved. Not that sophisticated yet. May work on it with your observations in mind.

3. There have been a few instances the Ai prioritized expanding on sea over land. There was one game the Believers had around 3-4 land bases, and ignored the rest of their landmass for settling sea bases. It doesn't happen that much but it did cripple them in that game.

Didn't work on this yet. For now they just expand in every directions land or sea alike. May add some "placement quality" factor in future.

Offline dino

Re: SMAX - The Will to Power - mod
« Reply #1752 on: February 06, 2022, 11:47:27 PM »
In mid game colonization should be different:

Send together with colony pod few formers and few crawlers to home in new base, or in case of WtP send few colony pods to start with few pops instead and rush punishment sphere, to provide huge food and mineral input from the start, send few military units to protect the base, rush essential infrastructure with money. Basically rapidly grow new bases tall with help of the whole empire, there is not enough time for them to grow organically and there is too much risk of a conflict that could sweep them away before they'd amount to anything growing organically.

If a new base is close to the other faction border, or is far enough for inefficiency to eat away close to half of energy output, specialize the base in the warmashine industry: terraform for food and minerals, rush build punishment sphere, mineral multiplier facilities, defensive and unit improving facilities and then start pumping, either military units, or supporting rapid development of another base.

If a new base could have decent energy output and is relatively far from enemies, terraform for energy and scrap punishment sphere after rushing drone control facilities, build enrgy multiplying facilities, but generally unless the faction is behind most of the competition in energy output new production bases should be prioritized in later midgame.

It should keep expanding, if it's too much for someone, he should play on a smaller map.

Re: SMAX - The Will to Power - mod
« Reply #1753 on: February 07, 2022, 12:08:31 AM »
Send together with colony pod few formers and few crawlers to home in new base, or in case of WtP send few colony pods to start with few pops instead and rush punishment sphere, to provide huge food and mineral input from the start, send few military units to protect the base, rush essential infrastructure with money. Basically rapidly grow new bases tall with help of the whole empire, there is not enough time for them to grow organically and there is too much risk of a conflict that could sweep them away before they'd amount to anything growing organically.

I guess this is a whole idea to support new bases in mid game with whole empire power. Otherwise, they won't amount to something interesting.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX - The Will to Power - mod
« Reply #1754 on: February 07, 2022, 01:44:25 AM »
One thing about PS though is you won't get a Golden Age, so no money and growth bonus for that.  If it's relatively close to your empire core, where those things are attainable, then the PS is not a good idea.  And if the base is far away from your empire core, to the point where people are too unhappy to be providing you money and growth bonuses... then did you NEED that base?  Logistically, wasn't it far enough away, that you had to project force a long distance to get it?  And didn't you already have the force to do the job?  It's like, I already won, so why do I have to prepare to win some more?

PS makes the most sense when you capture a large, distant enemy base, that you don't really have the generic infrastructure to pacify normally.  But how often does that really happen?  I usually beat factions at SP happiness stuff.  I usually have lots of money to rush basic happiness facilities, like Rec Commons and Hologram Theaters.  I'm usually spending some part of my budget on PSYCH by the time I'm projecting force across the globe.  And finally, big captured bases often have advanced facilities, like tree farms, that you're losing a lot of benefit of, if you put in a PS.

I think the PS is kind of a solution in search of a problem.  I allow them very early in my mod.  I never found them to actually be a useful early game strategy.  Simple Rec Commons, SPs, and some Non-Lethal Methods are more effective, for the amount of growth you're probably going to have early game.

I understand the theoretical potential of "giant early manufacturing city".  In practice, it's been a lot of work, and I haven't seen an obvious benefit, compared to other methods.  I think it would take a detailed After Action Report with some impressive early gains, for me to be convinced otherwise.  People saying "do it", by itself, isn't all that convincing.  I have done it, and it didn't work so well, at least for how I understood the game and was playing.

My opinion is, generally I can beat up AIs just fine.

 

* 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

The prevalence of anoxic environments rich in organic material, combined with the presence of nitrated compounds has led to an astonishing variety of underground organisms which live in the absence of oxygen and 'breathe' nitrate. Likewise, the scarcity of carbon in the environment has forced plants to economize on its use. Thus, all our efforts to return carbon to the biosphere will encourage the native life to proliferate. Conversely, the huge quantities of nitrate in the soil will be heaven to human farmers.
~Lady Deirdre Skye 'The Early Years'

* 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]