Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Computer Player spending priorities

Computer Player Spending Priorities
Looking at the racial tech spending table in Starmap.exe at 368E2 (thanks kyrub), I noticed the data before this at 367FC was probably tech related and eventually realised this was the computer player’s planetary and tech spending priorities. The possible spending priorities are based on racial objective when not at war then fixed when at war, so 7 combinations. First what does the guide say is expected.

Planetary/Tech spending (expected)
Base planetary spending ship/def/ind/eco 5% each, tech 20%.
Optional planetary spending 60% in 15x4% allotments allocated randomly weighted according to racial objective when not at war (guide actually quotes 60%=15x5%?)
Ensure at least minimum ECO needed to be clean, do not over-allocate ECO if full or any in IND if max (for current pop).
Re-allocate spending every 3-18 turns (3d6), never changing before period expired.
Tech spending allocated randomly weighted according to racial objective when not at war, with 100% in chosen field.
In expected table below for Planetary priority, figures mean that for a Diplomat at peace there is a 5/15 chance of each optional 5% net production being allocated to Tech, 4/15 chance each 5% to Ind etc. Tech priority figures mean that for a Diplomat at peace there is a 5/16 chance of choosing Force Fields as the field for 100% research, 4/16 for Weapons etc.

Planetary/Tech spending (actual)
Optional planetary spending is actually in 13 allotments – could be 4% or 5% each and I do not know what actual base allocation is.
Tech spending is 75% in one field (chosen here presumably) and 5% in each other field.
In actual table below for Planetary priority, figures mean for a Diplomat at peace there is a 5/13 chance of each optional allotment (4% or 5%) being allocated to Tech etc. Tech priority figures mean that for a Diplomat at peace there is a 4/16 chance of choosing Force Fields as the field for 75% research (rest at 5%), etc.


Planetary Priorities (expected)
tech ind def ship eco 5 4 3 2 1 Diplomat
ship tech ind def eco 5 4 3 2 1 Militarist
tech def ship ind eco 5 4 3 2 1 Expansionist
tech ind def eco ship 5 4 3 2 1 Technologist
ind tech def eco ship 5 4 3 2 1 Industrialist
eco tech ind def ship 5 4 3 2 1 Ecologist
ship tech ind def eco 5 4 3 2 1 At War – any objective

Tech Priorities (expected)
forc weap prop plan cons comp 5 4 3 2 1 1 Diplomat
weap forc prop comp cons plan 5 4 3 2 1 1 Militarist
forc weap plan prop cons comp 5 4 3 2 1 1 Expansionist
comp forc weap cons plan prop 3 3 3 3 2 2 Technologist
cons forc weap prop plan comp 5 4 3 2 1 1 Industrialist
plan forc weap cons comp prop 5 4 3 2 1 1 Ecologist
weap forc prop cons comp plan 5 4 3 2 1 1 At War – any objective

Planetary Priorities (actual) – what has changed
tech ind def ship eco 5 4 2 1 1 Diplomat (1 off def/ship)
tech ship ind def eco 5 4 2 1 1 Militarist (1 on tech, 1 off ship/ind/def)
tech def ship ind eco 5 4 2 1 1 Expansionist (1 off ship/ind)
tech ind def eco ship 6 3 2 1 1 Technologist (1 on tech, 1 off ind/def/eco)
tech ind def eco ship 5 4 2 1 1 Industrialist (1 on tech, 1 off ind/def/eco)
tech eco ind def ship 5 4 2 1 1 Ecologist (1 on tech, 1 off eco/ind/def)
tech ship ind def eco 6 4 1 1 1 At War – any objective (2 on tech, 2 off ind, 1 off ship/def)

Tech Priorities (actual) – what has changed
forc weap prop plan cons comp 4 3 3 2 2 2 Diplomat (1 off forc/weap, 1 on cons/comp)
weap forc comp plan prop cons 5 4 3 2 1 1 Militarist (2 off prop, 1 on comp/plan)
plan weap forc prop cons comp 5 4 3 2 1 1 Expansionist (2 off forc, 2 on plan)
comp forc weap cons plan prop 4 3 3 2 2 2 Technologist (1 on comp, 1 off cons)
cons forc weap prop plan comp 5 4 3 2 1 1 Industrialist (exact match!)
prop forc weap cons plan comp 5 4 3 2 1 1 Ecologist (4 off plan, 4 on prop)
weap forc cons comp plan prop 5 4 2 2 2 1 At War – any objective (2 off prop, 1 on comp/plan)


Observations
Planetary spending priorities are close to expected but have been tweaked. Tech has increased priority, particularly when at war. Diplomat is now identical to Industrialist for planetary spending priorities.
Tech-wise Diplomat is more balanced, like Technologist but in different fields. Expansionist is helped by promoting Planetology at expense of Force Fields but does AI realise to prefer controlled environment for this objective over other choices?
Propulsion is nerfed for Militarist and when at war to boost Computers & Planetology – more slow AI ships!
Ecologist sees the biggest change with heavy nerf on Planetology to heavily boost Propulsion. This does not make sense to me. Did the original settings not work effectively or is this a bug? Thematically the Ecologist who prefers to spend more on ECO should be chasing Ecology techs (and preferring terraforming, soil etc. over controlled environments). Maybe they wanted some objective to favour Propulsion.
Paradoxically this means the AI Klackon’s favourite objective (Ecologist 33%) sees them favouring Propulsion despite many reports of poor AI expansion with the bugs!

Anyone want to offer any other views on this.
Reply

Congratulations for this discovery, sargon. We know so much more about AI behaviour now.

Notes:
0. I think that that some objectives are primarily designed to fit the races. See ecologist Klackons (+POP), expansionist Sakkras (planetology), diplomat = industrialist (for the planet spendings).

1. Ecologists could be renamed "pro-natalists". They just favour building-up their population before going for the factories! This is cool for Klackons, but pretty poor for Bulrathis. Is that why they usually suck in the early game? I guess so. (Pro-natalists could still enjoy some more accent on planetology tech.)

2. Everybody's quite keen on researching force field techs (and weapons, which is understandable). The designers wanted a good defense of the planetary bases? Not bad. But the force field advantage is gone with weapon tech 20+... About that time CP loses in my games. (Every human player knows that winning strategies are more expansion-population-industry oriented. Well, sometimes you will rely on missile bases for the 80% of the game, but you do not have the AI bonuses.)

3. How on earth do not industrialists go for Robotic controls (computers), is beyond my imagination.

4. How on earth is CP building less missile bases when at war?

5. What does ecology (or pro-natality) has in common with propulsion tech? Bulrathis' suicide tranports, I guess.

6. Finally, militarists not caring about construction (and even propulsion) is just riddiculous.


Note: I added a table in pdf with sargon's values, for a clearer view of the distributed odds.
Reply

sargon0 Wrote:Ensure at least minimum ECO needed to be clean, do not over-allocate ECO if full or any in IND if max (for current pop).
A question:
Does the strategy guide explain what exactly does CP with extra ECO or IND when they are "over the top"?
-Are they allocated automatically to research (a la Human player bars)? Or ships/defense?
- Or are they distributed evenly among other planetary fields?
- Are they re-rolled? Are they re-rolled without ECO / IND or with-and-loop-until-done?

(This is so important for the final distribution.)
Reply

The guide says at max Pop ECO will be limited to minimum to be clean. At max factories there will be no industry spending so no planetary reserve spending other than that last turn's overspend when they reached max. The implication is that any income intended for these fields will be spent according to its priorities in other fields. However I have not analysed this.

I have seen at game start on impossible the normal homeworld start is minimum ECO, rest in factories until max for current pop then re-direct industry spending equally to DEF & TECH, keeping DEF until about 20 MB's. I have not yet seen CPs using the spending priorities documented here but that may come later. Or it could just be another plan that is bugged or not put into action.
Reply

Planetary/Tech spending

1st routine: planetary
every 2-6 turns
- Base planetary spending: ship/def/ind/eco/tech 5/5/10/clean/25
- Industrial development: +50ind until some condition with xy=4/3*population.
- Racial trait dependent allocation: +10eco for Sakkra, Bulrathis (under some xy conditions), +15eco for Klackons (under some wz conditions), +15shp for the Cats, +20tech for Psilons.
- Special planet allocations: +25tech fro artifact, +10 ships and +20 ind for rich and u-rich planets. And a special option for Orion (blimey).
- Last: optional planetary spending (3-10%) randomly weighted according to racial objective when not at war, until 100%. This may be actually only a few increments, that is, perhaps, why spending allocation seemed non-working. It has only a small weight for the decisions.

2nd routine:
always
- maxed industry gets split in between DEF and TECH (well noticed, sargon). - missile bases maxed at some xyz condition (factories, population), then moved in ships (minor bug here)

3rd routine: tech
every 10 turns
- When <30 turns there is 50% chance that propulsion is chosen.
- 25% chance for racial trait domination: Bulrathi, Mrrshans = weapons, Alkari = propulsion, Darloks = comps, Meklars = construction & planetology (50/50).
- Tech spending allocated randomly weighted according to racial objective or to war condition, always with 75% in chosen field (others 5%).


You can see that the racial trait and the racial objective have a very strong portent on the tech allocation result. However, this does not follow the observations made in the games and in the savefiles. Very often, the tech distribution are very similar or do not seem to follow any strict rule. Now, there is an explication, the Tech allocation bug:
The problem is that the variables for the race and the objective were put into the 1st routine and are, consequently, put in action only every random 2-6 turn. When the third routine comes into the spotlight (every 10th turn + number of player), it has therefore about 75% chance to not have the right race/objective variable. It will behave according to one of the previous races instead. Its own real racial/objective trait will trigger a 75% bonus only at about 6% of cases.

- An important side effect from this is, that what comp_players are researching is heavily influenced by all other comp_players races/objectvies present in the current game. If you have both Bulrathis and (militarist) Mrrshans in a map, for instance, all your opponents will research a lot of weapon tech. (This may be good to know for some extreme OSGs)
- The old discussion about the races "balanced in research" being stronger than the others cannot be decided through past experience fro mthe game. Nobody is balanced, they strangely share their objectives and racial emotions.
- You'll notice that shields tech is absent and disadvantedged, construction+planetology are 50/50 and therefore minor, prop and comps are normal and weapon tech has the biggest probability to feature heavily in your opponents tech lists (Psilon's autogauss, anyone?).

This explanation is hopefully correct, though I have not tested the outcome, just read it in the code. Maybe if anybody can confirm this via experience...?
Reply

Good to see the actual logic, kyrub. Now we can see how much the optional spending actually covers. On observations:

1st planetary:
have seen 2-6 turns as specified, counter is straight after player objective in savefile
cannot confirm allocations match base and other considerations but these seem reasonable, will check next time I look into this

3rd tech:
racial trait domination - interesting with Meklars not going for their best field (computers) but the chosen ones are strong economically, surprised not to see Sakkra and Planetology since it does seem to feature
tech split is always 75%/5x5% except at game start I have seen propulsion research 100% for a few turns

bug:
cannot confirm this but one to look out for now I know

Before this I would have guessed tech field selection was heavily racially motivated. Needs further analysis to see how often this is the norm and how often the bug skews the choice. Thanks for the insight.
Reply

sargon0 Wrote:except at game start I have seen propulsion research 100% for a few turns
Interesting. Must be set at the beginning of the game. "Few turns" could probably equal to the number of the player in question?

sargon0 Wrote:surprised not to see Sakkra and Planetology since it does seem to feature
I am surprised too; I forgot to mention them, Sakkra, planetology, definitely.

sargon0 Wrote:bug:
cannot confirm this but one to look out for now I know
Before this I would have guessed tech field selection was heavily racially motivated. Needs further analysis to see how often this is the norm and how often the bug skews the choice. Thanks for the insight.
It should be (after turn 35 for anyone): chance for racial trait =25% (basic chance) + (objective trait allocation) * 75% (the rest).

The potential bug: I'll be grateful. Just remember that the subroutine is cycled from 1 to 5, so look always for the next player or two players after .... So, if you run into a savegame with (preferably) Mrrshans and Bulrathis as first and second players, you should witness a heavy influence on all others. Sakkra, Meklars, that should do as well (planetary).
Reply



Forum Jump: