Author Topic: Resource Galaxy Statistics  (Read 11592 times)

Offline Wanderer

  • Master Member Mark II
  • *****
  • Posts: 1,579
  • If you're not drunk you're doing it wrong.
Re: Resource Galaxy Statistics
« Reply #15 on: March 31, 2012, 02:51:32 pm »
Normal distribution. Hmm, that would seem to imply that the game determines metal and crystal counts independently.

Anyways, actually, 1d6 has an expected value of 3.5 ((1+2+3+4+5+6)/6 = 21/6 = 3.5) As two dice rolls are independent, it follows that E(2d6) = E(1d6 + 1d6) = E(1d6) + E(1d6) = 3.5 + 3.5 = 7
For 1d12, E(1d12) = (1+2+3+4+5+6+7+8+9+10+11+12)/12 = 78/12 = 6.5. So actually, 2d6 has a slightly higher expected value than 1d12. Interesting.

So on a normal planet, the range for a single resource type is 0 to 4 (both bounds inclusive). What is the distribution of that? (again, on a SINGLE TYPE of resource)

This is actually (1d5 - 1) + (1d5 -1 )  You've not allowed for 0 in your dice comparison calculations, and thus your expected distributions is off.  As far as I've been able to determine, yes, the m and the c are distributed separately.
... and then we'll have cake.

Offline Eternaly_Lost

  • Sr. Member
  • ****
  • Posts: 336
Re: Resource Galaxy Statistics
« Reply #16 on: March 31, 2012, 03:00:52 pm »
Normal distribution. Hmm, that would seem to imply that the game determines metal and crystal counts independently.

Anyways, actually, 1d6 has an expected value of 3.5 ((1+2+3+4+5+6)/6 = 21/6 = 3.5) As two dice rolls are independent, it follows that E(2d6) = E(1d6 + 1d6) = E(1d6) + E(1d6) = 3.5 + 3.5 = 7
For 1d12, E(1d12) = (1+2+3+4+5+6+7+8+9+10+11+12)/12 = 78/12 = 6.5. So actually, 2d6 has a slightly higher expected value than 1d12. Interesting.

So on a normal planet, the range for a single resource type is 0 to 4 (both bounds inclusive). What is the distribution of that? (again, on a SINGLE TYPE of resource)


Well those numbers are correct, I normally like to drop the .5 as you can't roll a .5 on a die, even if it not perfectly correct.

And the fact that 2d6 has a slightly higher expected value is not only well know, but if you read any D&D optimization guide you notice that they always go for weapons that roll 2d6 or 2d4 over 1d12 or 1d8. Even more often is that they also look for brutal weapons as well, even not brutal, rolling 2d6 over 1d12 means a range of 2-12 versus 1-12, with the first averaging higher. Throw in brutal 1 and you get a range of 4-12, Brutal 2 becomes 6-12.

On the graph, it shows that 3,4 and 5 resources types make up the bulk of the galaxy, so balancing for 4 was not quite wrong. The greater issue likely is as it was pointed out, planets like the ones with ARS tend to have 5+ rather then finding an ARS on a planet with only 1 or 2. So maybe how those are being seeded should be adjusted rather then income from a harvester.

After all, you should need to take planets for resources, planets for ARS and if you are lucky they are the same planet, but it sounds like that is not the case.

Given that I personally only play Fallen Spire, I don't often look at how much each planet makes, as I am going to have to take them all anyway.

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: Resource Galaxy Statistics
« Reply #17 on: March 31, 2012, 03:03:30 pm »
Better to buff the AI in other ways if you think they became too powerful, then to increase the wall clock time waiting for things to get built, by reducing the income flow.
Basically: yea.  But the current numbers come pretty close to trivializing the m+c part of the game, which is a bit much :)  When harvesters are roughly equal to econ stations I think we'll be in a good place; normally you'd only unlock one or the other but if you really wanted to reduce waiting you could unlock both (for 6 planets worth of knowledge, but hey; and on FS I imagine if you want knowledge you just go glass a bunch of AI planets and laugh all the way to the bank).
I just got my Double Godlike this morning, and it was made possible only because of the new Harvester changes.  I'd tried repeatedly before, but never lasted more than a few hours before being overwhelmed.  This time, I went 13 HWs (8HW and 10 HW on the same map didn't work), and it was still touch and go for the first 3-4 hours.  I lost half my overall cryo-pods and settlements, for example.  That's how close this game was, even when the first thing I unlocked (at time 00:00:01) was Mk III Harvesters.  A little worse luck with the wave timings and it wouldn't have happened.  So, in my mind, even taking extreme advantage of the Harvesters, I was struggling with resources and build times for almost the entire game.  My M+C income was NEVER trivial, enough so that I was weighing the resources in system as much as things like Fabs or Golems.  I passed up on a system with a Fab and a Golem because it had no resources (and a Counter post) but took a system that had 7 resources but no other benefits.
And that's where I think you want resources to be:  important enough to matter.

Aka, make the AI harder in other ways, but I am just loving the reduction in down-time - and savescumming less frequently, because minor mistakes don't kill me as often.

Offline Eternaly_Lost

  • Sr. Member
  • ****
  • Posts: 336
Re: Resource Galaxy Statistics
« Reply #18 on: March 31, 2012, 03:21:19 pm »
Better to buff the AI in other ways if you think they became too powerful, then to increase the wall clock time waiting for things to get built, by reducing the income flow.
Basically: yea.  But the current numbers come pretty close to trivializing the m+c part of the game, which is a bit much :)  When harvesters are roughly equal to econ stations I think we'll be in a good place; normally you'd only unlock one or the other but if you really wanted to reduce waiting you could unlock both (for 6 planets worth of knowledge, but hey; and on FS I imagine if you want knowledge you just go glass a bunch of AI planets and laugh all the way to the bank).
I just got my Double Godlike this morning, and it was made possible only because of the new Harvester changes.  I'd tried repeatedly before, but never lasted more than a few hours before being overwhelmed.  This time, I went 13 HWs (8HW and 10 HW on the same map didn't work), and it was still touch and go for the first 3-4 hours.  I lost half my overall cryo-pods and settlements, for example.  That's how close this game was, even when the first thing I unlocked (at time 00:00:01) was Mk III Harvesters.  A little worse luck with the wave timings and it wouldn't have happened.  So, in my mind, even taking extreme advantage of the Harvesters, I was struggling with resources and build times for almost the entire game.  My M+C income was NEVER trivial, enough so that I was weighing the resources in system as much as things like Fabs or Golems.  I passed up on a system with a Fab and a Golem because it had no resources (and a Counter post) but took a system that had 7 resources but no other benefits.
And that's where I think you want resources to be:  important enough to matter.

Aka, make the AI harder in other ways, but I am just loving the reduction in down-time - and savescumming less frequently, because minor mistakes don't kill me as often.

Did you do it by Fallen Spire or the normal way to play the game?

Offline c4sc4

  • Sr. Member
  • ****
  • Posts: 253
Re: Resource Galaxy Statistics
« Reply #19 on: March 31, 2012, 03:36:39 pm »
Ok I just finished collecting the data for just crystal nodes in 120 P# galaxies. These were all generated with Grid type, no homeworlds were counted.

This data is interesting.

First off, like before, every trial had a min of 0 and a max of 4, no real surprise there with 120 planets. Interestingly, the median was 2 for each trial and the average was close to 2 for each trial.

The mode though, that one is strange. In the 120 planets where I counted all of the resources, the mode was 4 for 6/10 trials, 5 for 2/10 and 3 for 2/10 trials. The overall mode was 4 and the mode of the mode was also 4. This was not the case with just crystal though. When only counting the crystal, across the 10 trials I had the mode be all possible values. There was a mode of 4 for 2/10 trials, a mode of 3 for 1/10, mode of 2 for 2/10, a mode of 1 for 3/10 and a mode of 2 for 2/10 trials. The overall mode of all 1180 planets was 4 while the mode of the mode was 1.

Now for the overall statistics.

Average: 2.070338983
Median: 2
Mode: 4
Min: 0
Max: 4
St. Dev.: 1.42947343

And the graph:



Well, that is definitely not normally distributed.

Offline Cyborg

  • Master Member Mark III
  • *****
  • Posts: 1,957
Re: Resource Galaxy Statistics
« Reply #20 on: March 31, 2012, 03:54:00 pm »
This morning's game I played with Minotaur, and the resource changes are actually kind of nice. They may be overpowered in comparison to the command station, but it did improve the pace of the game. It might be something we want to spend more time looking at.
Kahuna strategy guide:
http://www.arcengames.com/forums/index.php/topic,13369.0.html

Suggestions, bugs? Don't be lazy, give back:
http://www.arcengames.com/mantisbt/

Planetcracker. Believe it.

The stigma of hunger. http://wayw.re/Vi12BK

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: Resource Galaxy Statistics
« Reply #21 on: March 31, 2012, 05:25:34 pm »
The mode though, that one is strange. In the 120 planets where I counted all of the resources, the mode was 4 for 6/10 trials, 5 for 2/10 and 3 for 2/10 trials. The overall mode was 4 and the mode of the mode was also 4. This was not the case with just crystal though. When only counting the crystal, across the 10 trials I had the mode be all possible values. There was a mode of 4 for 2/10 trials, a mode of 3 for 1/10, mode of 2 for 2/10, a mode of 1 for 3/10 and a mode of 2 for 2/10 trials. The overall mode of all 1180 planets was 4 while the mode of the mode was 1.

(snip)

Well, that is definitely not normally distributed.
Actually, that looks pretty much like a Uniform distribution to me.  Too lazy to prove it, but from what you describe about the mode plus the graph below, it seems that way.  Although I do wonder about the spike at 4.
Just as a note, a graph of the distribution of two Uniform distributions added together does not look uniform;  instead it looks more like a triangle.  And the more distributions you add, the more it converges to a Guassian distribution.

A few questions for you.
1)  How are you getting this data?  Are you counting by hand, or do you have a tool you created to parse the save file?
2)  Have you happened to mark down any "other things present" for your datapoints, like ARS/Fab/etc?  That might explain the spike at 4, if there's a bonus for those systems.

Thanks for doing this, by the way.  It's great to see some actual numbers.


Did you do it by Fallen Spire or the normal way to play the game?
I started planning to do Fallen Spire, hence why all my HWs were under attack early - I'd left gaps to put cities in.  However, I stopped after the refugees to get some serious defenses built before starting the Exowaves (at 13HW 10/10, the refugee chase event included multiple Golems), and never quite got around to triggering the next phase.

Offline c4sc4

  • Sr. Member
  • ****
  • Posts: 253
Re: Resource Galaxy Statistics
« Reply #22 on: March 31, 2012, 05:42:02 pm »
Actually, that looks pretty much like a Uniform distribution to me.  Too lazy to prove it, but from what you describe about the mode plus the graph below, it seems that way.  Although I do wonder about the spike at 4.

Yeah that's what I was thinking.

Just as a note, a graph of the distribution of two Uniform distributions added together does not look uniform;  instead it looks more like a triangle.  And the more distributions you add, the more it converges to a Guassian distribution.

Heh, my Stats professor was actually teaching us this this week.

A few questions for you.
1)  How are you getting this data?  Are you counting by hand, or do you have a tool you created to parse the save file?
2)  Have you happened to mark down any "other things present" for your datapoints, like ARS/Fab/etc?  That might explain the spike at 4, if there's a bonus for those systems.

Thanks for doing this, by the way.  It's great to see some actual numbers.

Basically, I generate a galaxy and then take a screenshot of the galaxy map with the resource used overlay and then I just type the numbers into a spreadsheet.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Resource Galaxy Statistics
« Reply #23 on: March 31, 2012, 05:55:33 pm »
Hmm, so under the assumption that number of resource spots of one type is a uniform distribution, the average would be,
(0 + 1 + 2 + 3 + 4) / 5 = 10/5 = 2

So Keith's guess was entirely correct.

However, the fact that 4 spots seems to be slightly more common than the other is odd. I'm not convinced that the sample size is hight enough that we couldn't just write it off due to random "noise", but it might be worth looking into.

Offline c4sc4

  • Sr. Member
  • ****
  • Posts: 253
Re: Resource Galaxy Statistics
« Reply #24 on: March 31, 2012, 06:34:24 pm »
I collected 10 more galaxies worth of data on for crystal only. For these 10, the median was 2 throughout again and 2 of the 10 trials had an exact mean of 2. The mode was all over the place again, this time with an overall mode of 0 with the mode of the mode being 3.

For the overall stats with all 20 trials:
Average: 2.029661017
Median: 2
Mode: 4
St. Dev.: 1.43974995

Here's the new graph:



Still a peak at 4.

Offline rickynumber24

  • Newbie Mark II
  • *
  • Posts: 17
Re: Resource Galaxy Statistics
« Reply #25 on: March 31, 2012, 06:40:58 pm »
It looks to me, from those graphs that it's *probably* uniform, with possible quirks in the RNG.  (... although, they've gotten pseudo-random number generators pretty good, by now...)

Eyeballing that second graph, it looks like the 4 bar is no more than 10% higher than the others.  I'm not very good at statistics (I'm not entirely sure how I managed to pass prob & stat when I had to take it...) so perhaps someone else could figure out what the odds of that just being noise is?  The absolute margin looks like it's still about what it was in the first graph. (... where it was around +40, I'd estimate)

I hate to say it, but I think you need more data before you can say with confidence that it's actually skewed.

Offline Eternaly_Lost

  • Sr. Member
  • ****
  • Posts: 336
Re: Resource Galaxy Statistics
« Reply #26 on: March 31, 2012, 06:52:41 pm »
It looks to me, from those graphs that it's *probably* uniform, with possible quirks in the RNG.  (... although, they've gotten pseudo-random number generators pretty good, by now...)

Eyeballing that second graph, it looks like the 4 bar is no more than 10% higher than the others.  I'm not very good at statistics (I'm not entirely sure how I managed to pass prob & stat when I had to take it...) so perhaps someone else could figure out what the odds of that just being noise is?  The absolute margin looks like it's still about what it was in the first graph. (... where it was around +40, I'd estimate)

I hate to say it, but I think you need more data before you can say with confidence that it's actually skewed.
Looking at it myself without running numbers and the sample sizes, I would say that it is not peaking at 4, but rather is within random limits. Granted you have to run formulas that I long forgot to prove it, but it looks like the lowest value is 450ish and the highest is 510. So it looks like the difference between the highest and the lowest is 2.5% of the total sample size, and I am sure that falls within random error.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Resource Galaxy Statistics
« Reply #27 on: March 31, 2012, 07:08:45 pm »
The numbers I'd really be interested in are:

- At the mid-game (gotta pick an arbitrary time... say, when you've found an AI HW and are beginning the plan to take it down, something like that), how many planets do you have?  How many metal spots?  How many crystal spots?

- At the end-game (about to actually assault a HW; in theory that could be the halfway mark but double-kill seems pretty popular nowadays), how many planets, metal spots, and crystal spots?

On one hand, sometimes you've got to take planets with really low resource counts.  On the other, there does seem to be a correlation between ARS/AdvFact/etc planets and higher spot counts.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline rickynumber24

  • Newbie Mark II
  • *
  • Posts: 17
Re: Resource Galaxy Statistics
« Reply #28 on: March 31, 2012, 07:21:52 pm »
The numbers I'd really be interested in are:

- At the mid-game (gotta pick an arbitrary time... say, when you've found an AI HW and are beginning the plan to take it down, something like that), how many planets do you have?  How many metal spots?  How many crystal spots?

- At the end-game (about to actually assault a HW; in theory that could be the halfway mark but double-kill seems pretty popular nowadays), how many planets, metal spots, and crystal spots?

On one hand, sometimes you've got to take planets with really low resource counts.  On the other, there does seem to be a correlation between ARS/AdvFact/etc planets and higher spot counts.

Novice anecdote from game between AI kills, though it's a small sample size:
Base game 7/7; 40 planet galaxy; took 20; only 5 had <4 total resources.
It looks like I took about half the planets with <4 resources.  However, I did intentionally pass up one planet because it didn't seem worth the AIP for a 1-resource planet, even though it was sort of in the middle of a secured area.

I expect that the number of planets may creep up somewhat for more stars in the galaxy.  On the other hand, I'd say the limiting factor for what to take was really more knowledge than resources.  Resources you can always wait for.  Knowledge is finite.

Offline c4sc4

  • Sr. Member
  • ****
  • Posts: 253
Re: Resource Galaxy Statistics
« Reply #29 on: March 31, 2012, 07:24:57 pm »
The numbers I'd really be interested in are:

- At the mid-game (gotta pick an arbitrary time... say, when you've found an AI HW and are beginning the plan to take it down, something like that), how many planets do you have?  How many metal spots?  How many crystal spots?

- At the end-game (about to actually assault a HW; in theory that could be the halfway mark but double-kill seems pretty popular nowadays), how many planets, metal spots, and crystal spots?

On one hand, sometimes you've got to take planets with really low resource counts.  On the other, there does seem to be a correlation between ARS/AdvFact/etc planets and higher spot counts.

Not sure if I can help you there seeing as I've never actually beat this game yet. Well, actually I have a ton of saves from somewhere in the middle of the game, if you want I could load those up and count those for you.