Author Topic: some ideas for AI enhancement (terraforming)  (Read 2365 times)

0 Members and 1 Guest are viewing this topic.

Offline thedarkestcolors

some ideas for AI enhancement (terraforming)
« on: April 12, 2016, 05:31:34 PM »
Even transcend feels like settler difficulty on other civ games, what happened to the seemingly impossible to beat deity mode?
Sure I could make it harder by not building crawlers, not using adv. terraformng... but those things are part of what make smacs special, so I would prefer to have to use them and use them efficient in order to win.
~~> some ideas how to improve the not so well performing AI. I would be interested in the doability of those changes and some hints on how it could be possible, I assume it would all need exe modding :( or are there any scripts that can be added to scenarios? Ideas how to achieve something similar, but easier to acomplish are also welcome ;)


a) more Terraforming

give free (independent? trance? ) Terraformers every x turns for #bases/y..
~~> e.g. every 10 turns a terraformer appears in every 2nd AI Base
independent::  otherwise other units could be lost due to lack of minerals (e.g. from the 1 million transport vessels floating on the ocean)
trance:: they don't get eaten by worms the next turn (though maybe Deidre lovers are not too fond of this)



b) simulate advanced terraforming

since the AI refuses to build good improvements, just make what they use good for them
when "condition Nut1" is met -> all farms worked by that AI faction generate +1 nutrients (~~> simulates some Condensers build)
when "condition Nut2" is met -> all farms worked by that AI faction generate +2 nutrients (~~> simulates Condensers everywhere)
when "condition Nut3" is met -> all farms worked by that AI faction generate +3/+4 (?) nutrients (~~> simulates Condensers and SE everywhere)

when "condition Bore1" is met -> all Mines worked by that AI faction generate +1 Energy (~~> simulates some restricted Boreholes)
when "condition Bore2" is met -> all Mines worked by that AI faction generate +2 Energy (~~> simulates more restricted Boreholes)
when "condition Bore3" is met -> all Mines worked by that AI faction generate +1 Mins & +3 Energy (~~> simulates some Boreholes)
when "condition Bore4" is met -> all Mines worked by that AI faction generate +2 Mins & +6 Energy (~~> simulates full on Boreholes)

the values are just a wild guess, for now I just want to know if any of this is doable I would then experiment to see what works :)

the conditions could be linked to specific techs or to tech. levels (e.g. first E3 / D3 / B3 / C3 tech. researched unlocks Nut1)  or just M.Y.



c) decrease tech costs for AI over time ~> starting techs cost the same (as the AI is doing fine in the beginning), but tech. costs should increase by (far) less for each discovered tech.

d) free facilities at every base when discovering certain Techs (AI only of course)

d) decrease the cost of best/best units for the AI (but then they will probably just build more of them and let them go pop on each other)

e) limit max # of transport foils

Offline Dio

Re: some ideas for AI enhancement (terraforming)
« Reply #1 on: April 12, 2016, 05:50:49 PM »

d) free facilities at every base when discovering certain Techs (AI only of course)
The FreeFac faction bonus already allows this option regardless of executible patchs. I also know that Yitzi implemented the original (unused) feature that allowed the free appearance of specific facilities at newly constructed bases after the discovery of specific technologies.

Offline Dio

Re: some ideas for AI enhancement (terraforming)
« Reply #2 on: April 12, 2016, 05:59:41 PM »
a) more Terraforming

give free (independent? trance? ) Terraformers every x turns for #bases/y..
~~> e.g. every 10 turns a terraformer appears in every 2nd AI Base
independent::  otherwise other units could be lost due to lack of minerals (e.g. from the 1 million transport vessels floating on the ocean)
trance:: they don't get eaten by worms the next turn (though maybe Deidre lovers are not too fond of this)

The above would require extensive coding changes because it involves changes in the AI behavior. The AI behavior, especially movement and command controls, tend to have expansive functions.

Quote

b) simulate advanced terraforming

since the AI refuses to build good improvements, just make what they use good for them
when "condition Nut1" is met -> all farms worked by that AI faction generate +1 nutrients (~~> simulates some Condensers build)
when "condition Nut2" is met -> all farms worked by that AI faction generate +2 nutrients (~~> simulates Condensers everywhere)
when "condition Nut3" is met -> all farms worked by that AI faction generate +3/+4 (?) nutrients (~~> simulates Condensers and SE everywhere)

when "condition Bore1" is met -> all Mines worked by that AI faction generate +1 Energy (~~> simulates some restricted Boreholes)
when "condition Bore2" is met -> all Mines worked by that AI faction generate +2 Energy (~~> simulates more restricted Boreholes)
when "condition Bore3" is met -> all Mines worked by that AI faction generate +1 Mins & +3 Energy (~~> simulates some Boreholes)
when "condition Bore4" is met -> all Mines worked by that AI faction generate +2 Mins & +6 Energy (~~> simulates full on Boreholes)

the values are just a wild guess, for now I just want to know if any of this is doable I would then experiment to see what works :)

the conditions could be linked to specific techs or to tech. levels (e.g. first E3 / D3 / B3 / C3 tech. researched unlocks Nut1)  or just M.Y.
I suppose it appears reasonable, but the individual that implements the changes would have to find adequte space in the appropriate sections for the extensive addition of technology flags.

Quote
c) decrease tech costs for AI over time ~> starting techs cost the same (as the AI is doing fine in the beginning), but tech. costs should increase by (far) less for each discovered tech.
I suppose it sounds reasonable, and it would require less modification then the previous proposal.


Quote
e) limit max # of transport foils
The code indicates that the transport foils have a special identity for the AI because it treats them as military units in certain cases.

Offline vonbach

Re: some ideas for AI enhancement (terraforming)
« Reply #3 on: April 12, 2016, 10:40:37 PM »
Give mines +1 nutrient. It helps a lot.

Offline thedarkestcolors

Re: some ideas for AI enhancement (terraforming)
« Reply #4 on: April 13, 2016, 09:02:18 AM »

d) free facilities at every base when discovering certain Techs (AI only of course)
The FreeFac faction bonus already allows this option regardless of executible patchs. I also know that Yitzi implemented the original (unused) feature that allowed the free appearance of specific facilities at newly constructed bases after the discovery of specific technologies.

Now if only that could count for old bases as well AND it would be possible to create custom facilities (I'm esp. thinking of duplicate Network Nodes (with infinite mineral costs -> so they cannot actually be build as a human)) that could be (ab)used to boost AI science rate at different stages of the game.

(I read somewhere that its possible to add new facilities, but the only thing they can "do" is have maintenance, negative maintenance could be used to give AI more Energy, but that would be a flat Bonus --> new found crap towns would turn into the AIs Superscience cities that way.. ~~> any kind of percentage bonus would be better)

Offline thedarkestcolors

Re: some ideas for AI enhancement (terraforming)
« Reply #5 on: April 13, 2016, 09:30:28 AM »
a) more Terraforming
[...]
The above would require extensive coding changes because it involves changes in the AI behavior. The AI behavior, especially movement and command controls, tend to have expansive functions.
ok too bad, I was hoping it would be easy to just spawn some formers and they would just "behave" like formers they build



b) simulate advanced terraforming
[...]
I suppose it appears reasonable, but the individual that implements the changes would have to find adequte space in the appropriate sections for the extensive addition of technology flags.
How would/did a an individual that implements the changes get a hand on the source code? I'd be highly intrigued to have a look at it  ;)



Quote
c) decrease tech costs for AI over time ~> starting techs cost the same (as the AI is doing fine in the beginning), but tech. costs should increase by (far) less for each discovered tech.
I suppose it sounds reasonable, and it would require less modification then the previous proposal.
I assume this would be the most effective fix (space in the appropriate section for the individual / reasonability of the AI-boost  )
It wouldn't help the AI to increase city Pop though --> not sure how well they can handle drones so that might even be a good thing, but it also means that later on they are lacking the minerals to build any of the fancy stuff they just researched



Quote
e) limit max # of transport foils
The code indicates that the transport foils have a special identity for the AI because it treats them as military units in certain cases.

:D ... if they had as much as a laser mounted somewhere the seas would become a very unsafe place.. Might that be the result of IoD's acting as both military and transport unit?

Offline thedarkestcolors

Re: some ideas for AI enhancement (terraforming)
« Reply #6 on: April 13, 2016, 09:48:32 AM »
Give mines +1 nutrient. It helps a lot.
Too bad that only Fungus yield can be changed on a per faction basis.. I don't like that human players would get the bonus as well, as this leads to "forestable" rocky tiles. And despite mines being my least favored improvement, I usually still have more of them then the AI.
In fact I really like how things work out for the human player, its just that the way things are, the AI might as well not exist..
« Last Edit: April 13, 2016, 01:17:56 PM by thedarkestcolors »

Offline Mart

Re: some ideas for AI enhancement (terraforming)
« Reply #7 on: April 16, 2016, 05:41:54 PM »
Scenario editor has a flag for AI:
- build more formers.
So if someone wants to go to trouble of assigning such flags in SP game, that can be done at the game beginning.
It would be self-preparation of scenario and one can do it without knowing details of the map, etc.

However, I recently work on so-called Rebalance Mod [RM], which would be nothing more than modification of alphax.txt in a way changing game rules as little as possible, but allowing better game experience.
what I noticed, is that giving a game more time, it eventually let's AI develop better including terraforming.
Simple playing with tech-stagnation improves AI somewhat.

Yet another idea is to place pre-defined former units in alphax.txt section. AI builds fungicidal formers quite well though. It could, however build more formers in the first turns. Yet pre-defined units cause AI to pick them for building more often.

Offline DrazharLn

Re: some ideas for AI enhancement (terraforming)
« Reply #8 on: May 02, 2016, 06:04:17 PM »
How would/did a an individual that implements the changes get a hand on the source code? I'd be highly intrigued to have a look at it  ;)

No one on this forum has access to the SMAC source code, as far as I know it could well have been completely lost by this point.

Starting with scient, a number of people have made changes to the games by opening the binaries with a disassembler and rewriting bits of the assembly.

More recently, there was an attempt to decompile the game, but the project rather lost steam after a core member created a useful resource, an IDA database, then went AWOL before sharing it.

The most advanced hacking available to us at the moment is thanks to PlotinusRedux. He built a system that injects a rather small amount of code into the binary that gets it to load an external library. At runtime, the pracx.dll library effectively redirects a whole bunch of SMAC functions from the binary, to functions within the pracx library. This lets us write new code for SMAC in C++, which is pretty great if you want to add new features or whatever.

As far as I know, the other .exe modders don't use PRACX, but I've almost finished documenting the code to make it a bit less daunting, so maybe that will change a bit in the future.

Still, modding SMACX is still pretty difficult: there's very little public documentation and you still have to learn some assembly.

If the IDA database ever gets released, things will be a lot better on the documentation front. Until then, the best you can do is acquire the mac release of the game and run the IDA disassembler on it. The mac version is the best one to use because the function names have not been obfuscated.
« Last Edit: May 02, 2016, 06:40:20 PM by DrazharLn »

 

* 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

This unusual specimen is not so much a classic particle as a connector?a kind of string attaching two particles. As distance increases the connective power becomes attenuated, but if it is cut the power vanishes: forever.
~Academician Prokhor Zakharov 'For I Have Tasted the Fruit'

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