Stellaris - AI Ascension Perk Weighted Random Abnormalities

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

TTFTCUTS

Private
71 Badges
Aug 29, 2011
18
29
  • Europa Universalis III: Chronicles
  • Magicka
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III
  • Cities: Skylines Deluxe Edition
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Age of Wonders: Planetfall Premium edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Together for Victory
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV
  • Stellaris: Federations
  • Age of Wonders: Planetfall Season pass
  • Age of Wonders: Planetfall Deluxe edition
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: La Resistance
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall - Revelations
  • Europa Universalis III Complete
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Stellaris: Lithoids
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
EDIT: It's since come to my attention that this whole thing might be poining in the wrong direction, in which case the example will be less useful, but at least there's a repro case for the weights being wrong. Oh well... post edited to remove now irrelevant info.

Description
AI Ascension Perk Weighted Random Abnormalities

Game Version
3.4.5

What version do you use?
Steam

What expansions do you have installed?
All of them

Do you have mods enabled?
No, but modifications were made to show the issue, detailed below

Please explain your issue is in as much detail as possible.

When an AI chooses an ascension perk, it picks a random choice, weighted by the weights specified in the definition of the perk. The results do not match the given weights, resulting in an incorrect distribution of perk picks.

Initially during modding I was experiencing an issue where I could not get the AI to pick a perk, no matter how high the weights were. This led me to investigate possible causes, and eventually led me to making a single modification to the vanilla ascension perk file to test the behaviour in as simple way as possible.

To that end, I commented out the requirements for Galactic Wonders, and matched its weight to the 10000 of the ascension path finishers. This should make the chance, when weighted against the other perks available at the start, roughly 10000 in 10160, around 98.5%.

I then ran ten test games, observing the order in which an AI picked its perks. In all but one case (a gestalt), it was picked between second and seventh, most often fourth, despite the apparent 98.5% chance to be picked at each step. At this chance, being picked fourth should be a 1 in 241000 occurance, and seventh should be 1 in around 86 billion.

I worked the weights manually in a spreadsheet for the first two test games, and then went on to assume a rough 1.5% chance for other perks to be picked after that as each instance was roughly the same. A screenshot of the spreadsheet is attached.

Results:
1. 3rd perk
2. 4th perk
3. 4th perk
4. 4th perk
5. 1st perk (this game was a gestalt, and I believe it happened because several other early perks are unavailable to them)
6. 6th perk
7. 4th perk
8. 2nd perk
9. 7th perk
10. 6th perk

These results, assuming that the weights were being calculated correctly and a 4th perk pick being 1 in 241000, were unlikely to say the least, so something's definitely up. The attached perk file has the modifications.

Steps to reproduce the issue.
Use the changes to galactic wonders listed above or in the attached 00_ascension_perks.txt file to alter the perk and observe the AI failing to pick it despite the apparent overwhelming chance.

Upload Attachment
File(s) attached
 

Attachments

  • spreadsheet.png
    spreadsheet.png
    100,7 KB · Views: 0
  • 00_ascension_perks.txt
    36 KB · Views: 0
Last edited:
  • 3Like
Reactions: