Universe Table gives badly skewed results

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Universe Table gives badly skewed results

#1 Post by eleazar »

I've complained about this before, but, it is starting to be a significant impediment to content testing/building. It's hard to play test organic species when most of their EPs are very rare, or the growth special resources when they only occur on very rare planet types.

I filed a bug here.

In short universe generation doesn't work as expected, and the numbers cannot readily be tweaked so that some planet types aren't super abundant and/or super rare.

Here's a distribution graph with everything regarding planet type zeroed
skewed.png
skewed.png (18.86 KiB) Viewed 790 times
I'm just asking that fixing these would be bumped up in priority.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Universe Table gives badly skewed results

#2 Post by Geoff the Medio »

I can replace all the planet-generating code with uniform distributions in size and type that ignores anything in the universe tables...

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Universe Table gives badly skewed results

#3 Post by eleazar »

Geoff the Medio wrote:I can replace all the planet-generating code with uniform distributions in size and type that ignores anything in the universe tables...
Sounds like a fine hot-fix.

Can you leave one table active that references size, but not type?
That way the Tiny/Planetoid size can be excluded (as currently) or re-included.

Zireael
Space Dragon
Posts: 429
Joined: Mon Aug 15, 2011 5:33 pm

Re: Universe Table gives badly skewed results

#4 Post by Zireael »

Maybe something could be done with the proliferance of asteroids, and, especially, gas giants.

marhawkman
Large Juggernaut
Posts: 938
Joined: Fri Jan 20, 2006 9:34 pm
Location: GA

Re: Universe Table gives badly skewed results

#5 Post by marhawkman »

IMO Asteroids and gas giants should be common.

So which data tables are actually used right now?

EDIT: AFAIK, the universe generation uses a deterministic algorithm that doesn't actually have random factors. It uses a sort of random number generation, but the universe configuration options are what initializes the "random" numbers. Example: all 500 star elliptical galaxies have the same star layouts(including HW positions and star names). Changing the age changes what types of stars spawn(and to a certain extant what planets). Changing number of planets affects what planets spawn. Changing number of warp points affects nothing but the number of warp points spawn. Specials and magnate civilizations are linked to planets so anything that messes with planet spawns will change them too.

Maybe add an option for a random number seed? That'd make it less predictable. It's still a deterministic algorithm, but a much more variable one.
Computer programming is fun.

User avatar
em3
Vacuum Dragon
Posts: 630
Joined: Sun Sep 25, 2011 2:51 pm

Re: Universe Table gives badly skewed results

#6 Post by em3 »

@marhawkman

As far as I remember, constant seed is a temporary solution so that development and testing is easier. Finished game will have, indeed, random generation seed.
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Universe Table gives badly skewed results

#7 Post by eleazar »

em3 wrote:As far as I remember, constant seed is a temporary solution so that development and testing is easier. Finished game will have, indeed, random generation seed.
Correct.

marhawkman
Large Juggernaut
Posts: 938
Joined: Fri Jan 20, 2006 9:34 pm
Location: GA

Re: Universe Table gives badly skewed results

#8 Post by marhawkman »

One thing I was thinking of adding was a way to specify the seed during galaxy creation. That way you can recreate a specific galaxy if you remember the seed used, or make a new one to mine for statistical data.
Computer programming is fun.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Universe Table gives badly skewed results

#9 Post by eleazar »

marhawkman wrote:One thing I was thinking of adding was a way to specify the seed during galaxy creation. That way you can recreate a specific galaxy if you remember the seed used, or make a new one to mine for statistical data.
That would probably serve our purposes equally well-- as long as it was easy to find out what the seed was after you created the universe.

Post Reply