Author Topic: AI treatment of support costs (possible bug)  (Read 1794 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

AI treatment of support costs (possible bug)
« on: November 14, 2013, 06:53:30 PM »
While I usually don't deal with AI, I found a piece that may be bugged, and I'm going to be adjusting it anyway to allow for variable (unit-cost-dependent) support costs, so I need to know how I should deal with it.

The way a lot of the AI works is that certain options are assigned a "value", which I presume is then combined (either as positive or negative) with other values of other features to find the value for various possible approaches, which the AI would then optimize (possibly with a random factor).

For support costs (to determine the importance of SUPPORT rating), the value (which is actually a cost; lower is better) is determined for each supported unit: It is equal to the unit's support cost, plus (unit support cost-raw base production/2) if the unit is taking up more than half the base's production, plus another (unit support cost-raw base production/2) if the unit is taking up all the base's production (or more).

This seems like it may be a mistake, as it means that a 10-production base with 10 units each costing 1 support will not face the "penalty" cost, i.e. the AI will not make sure to use SUPPORT rating to spending most or all its production on support unless it's spent on only 1 or 2 units.

So I suspect what it might be supposed to be is a value equal to {total support cost, plus (TOTAL support cost-raw base production/2) if that's positive, plus (TOTAL support cost-raw base production/2) if the base's production is all being spent on units (even more than one unit.)

Because this is an AI rule and AI does not make the shortlist, I will not be adding it as an option; either it's a bug and I'm fixing it, or it's not a bug and I'll leave it how it is.

Thoughts?

 

* 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

I sit in my cubicle, here on the motherworld. When I die, they will put me in a box and dispose of it in the cold ground. And in all the million ages to come, I will never breathe, or laugh, or twitch again. So won't you run and play with me here among the teeming mass of humanity? The universe has spared us this moment.
~Anonymous, Datalinks

* 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: 37.

[Show Queries]