AI Energy System Mechanisms

For those of us who are curious and like to poke around in the game's data files and scripts as well as glitching. Caters to anything from unit/building stats to level data to telling how to glitch and stories of game errors.
Post Reply
User avatar
CharlotteLabyrinth
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 379
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

AI Energy System Mechanisms

Post by CharlotteLabyrinth » Sun Feb 18, 2018 4:36 pm

I was initially going to write about this topic earlier, but since I already had begun my long journey towards attaining a PhD degree... I was very busy recently but finally I'm free this weekend! :D

With some experiments and revising the old memos I made, I was able to figure out the precise energy system formula that AI uses in the game.

The unit creation costs for AI are indeed always dynamic and variable, and the costs for manufacturing additional units do increase gradually, in relation to the numbers of all units controlled by the AI host station. :)



The current unit creation costs for AI can be neatly demonstrated by this following formula:

(k*5/8)+(kn/40)

Here, ‘k’ denotes the normal energy cost of units; where ‘n’ denotes the current number of units the AI host station controls.



By making use of this formula we can deduce some interesting facts about the AI energy system, such as:

In comparison to players, AI can build its first 15 units cheaper than the players. :woah:

The unit creation costs for AI becomes normal (identical to players) when creating its 16th vehicle.

However, starting from its 17th vehicle and onwards AI starts to receive a cost penalty; as the creation costs begin to exceed the standard values. :geek:

The summation of creation costs up to the 31st vehicle that AI spent is equal to the total amount of energy that players would spend for the same number of a unit. :ugeek:

Demonstration:
Image

From its 32nd unit and onwards the total sums of net energy spent by AI for creating vehicles start to exceed total sums of net energy spent by players up to this point.

The creation cost of 56th AI unit becomes twice as expensive as their original cost! :o No wonder why enemy AI host stations are always out of energy all the time in later levels where they usually control huge contingents of vehicles and flaks.


It also explains why AI can only able to create small amounts of cheaper units when it has a large number of flak stations and unit squadrons deployed under its control.

In my opinion, this AI energy system presents harsh disadvantages to AI in comparison to players. Especially when considering there is no valid unit limit in single-player games. :|


NOTE: Building costs have no numerical deviations and thus remain identical for AI under any circumstances (same as the player's costs).
;----------------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;----------------------------------------------------------

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I absolutely have no affiliation whatsoever with that!

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 859
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: AI Energy System Mechanisms

Post by Ormu » Sun Feb 18, 2018 8:47 pm

Interesting finds... I agree that this can be disadvantageous to the AI, especially against experienced players, but I see some logic here.

The initial reduction of cost allows the AI to quickly create a decent army to defend itself or attack during the early stages of play, or when it's being heavily attacked. Is this necessary? Maybe not, but it looks like a reasonable part of the AI design.

The increase of costs (basically, the lack of cost cap in this case) may have been implemented to slow down the growth of the enemy armies when the player plays slowly or passively. It's helpful for beginner players and it can also prevent performance issues caused by large numbers of vehicles on the map.
Image
Matthew Lever wrote:Take out Ormus as soon as you see them.
Not all Ormus are mine. When in doubt, please ask...

GoldStar611
BlackSect Creator
BlackSect Creator
Posts: 890
Joined: Sun Dec 02, 2007 1:16 am
Location: USA
Contact:

Re: AI Energy System Mechanisms

Post by GoldStar611 » Tue Feb 20, 2018 12:50 am

This is bad for AI! actually, if we had a nice way to change this value (perhaps Zidane's UA_Source) it could make "intense" mods even more challenging. I guess the developers thought the AI was too good and they needed to handicap it somehow.

Were you able to utilize Zidanes work for this research or perhaps from the visual source safe?
Image
Image

User avatar
CharlotteLabyrinth
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 379
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: AI Energy System Mechanisms

Post by CharlotteLabyrinth » Tue Feb 20, 2018 12:48 pm

Ormu wrote:
Sun Feb 18, 2018 8:47 pm
The initial reduction of cost allows the AI to quickly create a decent army to defend itself or attack during the early stages of play, or when it's being heavily attacked. Is this necessary? Maybe not, but it looks like a reasonable part of the AI design.

The increase of costs (basically, the lack of cost cap in this case) may have been implemented to slow down the growth of the enemy armies when the player plays slowly or passively. It's helpful for beginner players and it can also prevent performance issues caused by large numbers of vehicles on the map.
I absolutely agree with these points! Especially a consideration regarding game's performances makes perfect sense. I know UA developers were extremely concerned about the general stability of the game (those multiplayer levels with 'telephone' icons next to them with a very low unit limit...). :D Although it is quite unfair that only the AI is handicapped by such restrictions, whilst players have no unit limits and can create supposedly infinite amount of vehicles and flaks in single player games.

Personally, I would also prefer a small revision at the current AI energy systems. Maybe setting reasonable maximum cost caps at certain thresholds, as well as slightly decreasing the amount of incremental penalty rates and early creation costs of units.

GoldStar611 wrote:
Tue Feb 20, 2018 12:50 am
Were you able to utilize Zidanes work for this research or perhaps from the visual source safe?
Neither, I initially attempted to search for the relevant blocks of codes from those two mentioned sources to reinforce my research but it was unsuccessful. It is likely that the whole math calculations for this are being conducted over multiple addresses instead of one. :) So I eventually figured it out on my own through extensive experiments while also revising my past recorded notes about the AI energy mechanisms, and the resultant conditions for AI were always in accordance with the formula I made. At this point, I'm 100% convinced of the veracity and universality of the formula in AI modules.

I would appreciate any additional correction or verification on this subject so we could formulate the 100% accurate and evidence-supported information about the AI logics that will be described at Stoudson Corporation Wiki!
;----------------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;----------------------------------------------------------

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I absolutely have no affiliation whatsoever with that!

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 859
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: AI Energy System Mechanisms

Post by Ormu » Wed Feb 21, 2018 8:31 pm

I prepared a wiki page about the energy system. It's in the modding namespace but listed under Gameplay on the main page because at first I didn't know which category would fit best. :P

http://wiki.metropolisdawn.com/modding:energy_system
Image
Matthew Lever wrote:Take out Ormus as soon as you see them.
Not all Ormus are mine. When in doubt, please ask...

User avatar
CharlotteLabyrinth
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 379
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: AI Energy System Mechanisms

Post by CharlotteLabyrinth » Thu Feb 22, 2018 6:05 pm

Thank you very much, Ormu! I would like to add more details and contents at the created page by myself, but in this and next year I will have to dedicate every second and minute to my academic scientific research in the laboratory. :)

Perhaps in 2020, I should be finally able to start working on a massive revision of the entire Stoudson Corporation wiki pages that will be focused on rectifying any remaining vestiges of factual errors or typo/formatting mistakes. ;)
;----------------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;----------------------------------------------------------

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I absolutely have no affiliation whatsoever with that!

Post Reply