Author Topic: Resource Galaxy Statistics  (Read 11608 times)

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Resource Galaxy Statistics
« Reply #30 on: March 31, 2012, 07:33:54 pm »
I think I still have that auto-made save from right after I won a 7.3/7.6 game, would that help?

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: Resource Galaxy Statistics
« Reply #31 on: March 31, 2012, 07:42:03 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.
I'd suspect there are other factors we are not considering that account for the seeming peak at 4 before I would question the RNG.  I seem to remember that AI War uses a Mersenne Twister?  That's a high-quality RNG that's not too complicated, and there are reliable implementations in many languages/packages.

Now, about that distribution... What we're looking at is, in theory, a chi-squared test, using the expected values for a Uniform distribution.  With 2000+ samples, we've more than enough data.

chi-squared = SUM ( (Oi - Ei)^2 / Ei )    -    Where Oi = the number of observed counts in cell i,  Ei = the number of expected counts for cell i.  Ei = n * .20 in this case.   n = 20 * (120 - 3) = 2340, so Ei = 468.
Then compared the result to a chi-squared table with 4 degrees of freedom, which thar interwebs tells me is for p=0.10, 7.78;  and for p=0.05, 9.49.
If c4sc4 feels like posting his counts, or doing this calulation, we can see what we get.
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.

That's... difficult to count, I think.  Heavily depends on play style and game options.  And map shape, for that matter.  In my game I just finished, I had 43 worlds, on a 64 star Maze map.  But 3 of those I took during the approach the the AI homeworlds, and 13 of them were my Homeworlds.  When I play Fallen Spire (pretty much always), I take MANY more systems than I would otherwise.  Usually, as many as I can hold, in fact.  If they help me put cities down, take them.

Compare that to GUDare/Wanderer's 9-through-10 AAR series of games. He took somewhere between 10 and 17 systems on a 40 star map.  I would have taken about 20, just to have more solid chunks of worlds.

Offline c4sc4

  • Sr. Member
  • ****
  • Posts: 253
Re: Resource Galaxy Statistics
« Reply #32 on: March 31, 2012, 09:01:15 pm »

If c4sc4 feels like posting his counts, or doing this calulation, we can see what we get.


There had to have been an easier way to count these but anyway,

0: 471
1: 478
2: 441
3: 450
4: 520
Total: 2360

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: Resource Galaxy Statistics
« Reply #33 on: March 31, 2012, 10:30:52 pm »

If c4sc4 feels like posting his counts, or doing this calulation, we can see what we get.


There had to have been an easier way to count these but anyway,

0: 471
1: 478
2: 441
3: 450
4: 520
Total: 2360
Thank you.  Although, total = 2360?  Shouldn't it be 120 - 3 (1 human HW, 2 AI HW) = 117 * 20 trials = 2340?

Now, math time.
Ei = 2360 * 0.20 = 472
Oi - Ei:
471 - 472 = -1  =  -1^2  =  1
478 - 472 = 6  =  6^2  =  36
441 - 472 = -31  =  -31^2  =  961
450 - 472 = -22  =  -22^2  =  484
520 - 472 = 48  =  48^2  =  2304
SUM = 3786
X2 = 3786 / 472 = 8.02
That's a p-value of a little over 0.09.  We would fail to reject the null hypothesis, that the distribution is Uniform, at the a=0.05 level.
Hmm.  I still wonder about other factors influencing that 4 spike.  But in general, it's safe to assume that any given system has an equal chance of being 0 crystal as being 4 crystal.
If the M/C resources are independent of other items in a system (ARS, golems, datacenters, etc), then those systems with extra "goodies" will be much higher on the priority list for capture than anything else.

Offline c4sc4

  • Sr. Member
  • ****
  • Posts: 253
Re: Resource Galaxy Statistics
« Reply #34 on: March 31, 2012, 10:39:24 pm »
Thank you.  Although, total = 2360?  Shouldn't it be 120 - 3 (1 human HW, 2 AI HW) = 117 * 20 trials = 2340?

With the grid map type, the planets are arranged in a square so 120 planets is actually 121 (11^2).

Offline Wanderer

  • Master Member Mark II
  • *****
  • Posts: 1,579
  • If you're not drunk you're doing it wrong.
Re: Resource Galaxy Statistics
« Reply #35 on: April 01, 2012, 05:27:47 am »
If the M/C resources are independent of other items in a system (ARS, golems, datacenters, etc), then those systems with extra "goodies" will be much higher on the priority list for capture than anything else.

There may be a weighting of some kind to include them on those planets, but I've taken 0/1 ARSs as well as 3/4 ARSs.
... and then we'll have cake.

Offline orzelek

  • Hero Member Mark III
  • *****
  • Posts: 1,096
Re: Resource Galaxy Statistics
« Reply #36 on: April 01, 2012, 06:05:11 am »
Looking at experiences here.. maybe consider buffing a bit Mk I's, leaving Mk II's and nerfing a bit Mk III's and then modifying a bit K costs.
Main idea behind that would be to give a bit better resource flows overall due to people noticing that waiting time got lowered now - aka economy is quite weak in general.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Resource Galaxy Statistics
« Reply #37 on: April 01, 2012, 09:11:24 am »
Looking at experiences here.. maybe consider buffing a bit Mk I's, leaving Mk II's and nerfing a bit Mk III's and then modifying a bit K costs.
Main idea behind that would be to give a bit better resource flows overall due to people noticing that waiting time got lowered now - aka economy is quite weak in general.

I can agree with this. It seems that the problem is mostly that the disparity between Mk. I and Mk. III is crazy high. This would fix that, though as noted, Mk. III knowledge costs would have to go down too.

Offline Nodor

  • Sr. Member
  • ****
  • Posts: 254
Re: Resource Galaxy Statistics
« Reply #38 on: April 01, 2012, 11:52:56 am »
I've got a minor model together, I'll try to post it later today.  It looks like Harvester 3's should be about 50 a second.

Offline rickynumber24

  • Newbie Mark II
  • *
  • Posts: 17
Re: Resource Galaxy Statistics
« Reply #39 on: April 01, 2012, 01:06:08 pm »
If the M/C resources are independent of other items in a system (ARS, golems, datacenters, etc), then those systems with extra "goodies" will be much higher on the priority list for capture than anything else.

There may be a weighting of some kind to include them on those planets, but I've taken 0/1 ARSs as well as 3/4 ARSs.

Heck, I've taken a 0/0 ARS...

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: Resource Galaxy Statistics
« Reply #40 on: April 01, 2012, 01:32:38 pm »
There had to have been an easier way to count these but anyway,
I tried to look through the save files, but was unable to spot where resources are stored.  I found planets.  I found ships and structures on planets.  I found a Nuked? boolean for planets.  Resources?  Encoded somewhere non-obvious.  So, sorry, no easy scripting to do the checks for us.


I've got a minor model together, I'll try to post it later today.  It looks like Harvester 3's should be about 50 a second.
Got mathy this morning, and started writing this post to prove that Harvesters were fine.

Metal ~ U[0,4]
Crystal ~ U[0,4]
CoVar = 0

Then the total resource distribution probability looks like this:
Resources     Probability    Mk I Income    Mk II Income    Mk III Income    50/sec   
00.040000
10.081.62.485.844
20.124.87.4417.528
30.169.614.8835.0412
40.201624.858.440
50.161624.858.440
60.129.614.8835.0412
70.084.87.4417.528
80.041.62.485.844

Expected Income for x Planets
Planets    Mk I      Mk II      Mk III      50/sec    Econ Stations I-III   Econs + Mk Is
180124292200160240
5400620146010008001200
1080012402920200012802080
20160024805840400016963296
403200496011680800023365536
6048007440175201200029767776
80640099202336016000361610016
1008000124002920020000425612256
1209600148803504024000489614496
That's the expected per second income of Metal + Crystal combined, if you held X normal planets, from harvesters ONLY vs Econ Stations.

Hmm.  So, yeah.  See how the Mk III column is ALWAYS larger than the Econ Stations + Mk Is column?  As currently balanced, the Harvesters are always the better choice.  Always.  Even completely ignoring the Homeworld(s) and the excessive resources there.  At 50/sec for Mk IIIs, it's better to use Econ Stations only up to 10 planets.  At 11 or more, Mk IIIs is the better choice. 

Unfortunately, I've even convinced myself here.  Harvesters need a nerf.   :'(


Note:  This math is all for the general case, and individual games can be expected to vary wildly based on random resource distribution.  Past performance not indicative of future results.  Void where prohibited.  Side effects of harvester nerfing may include excessive waiting, desperate rebuilding, popping of distribution nodes, and death at the hands of the AI.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Resource Galaxy Statistics
« Reply #41 on: April 01, 2012, 01:48:38 pm »
I could live with 50/s for Mk. III. Not sure if they need a knowledge cost reduction of that were to happen though. What is the current Mk. II and Mk. III income rates and k costs

In terms of save games, you won't find resource spots in it. Resource spots are generated when loading a savegame. (it uses a constant RNG seed that is saved with the file to ensure consistency)
Wormhole locations operate in a similar way.
That is why any changes to the RNG and the map seeding process must be done with care, as changes to them might break existing savegames. (which has happened before)

EDIT:
For those who feel that the current economic pace is about right, a less severe reduction in Mk. III could be combined with a buff to Mk. III econ stations. Enough to make the "turning point" still around 10 planets.
Or maybe even leave Mk. III harvesters untouched, and buff Mk. III Econ stations that much more.

EDIT2: And remember Mk. II and Mk. I harvesters and Econ stations can also be adjusted to fit a new economic pacing goal model.
« Last Edit: April 01, 2012, 01:55:55 pm by techsy730 »

Offline Nodor

  • Sr. Member
  • ****
  • Posts: 254
Re: Resource Galaxy Statistics
« Reply #42 on: April 01, 2012, 04:40:14 pm »
Ok.  Semi-detailed model attached.

Assumptions:
  • Due to every player having a homeworld you must build that into the model.
    Average of 4.25 resource nodes/planet.
    Energy produced/cost by command stations should be rolled into the M&C value
    Multi-homeworld will need special adjustments not considered here.
    Baseline uses logistic stations.

As M&C Stand Now:


The extra harvesters on the homeworld means that Econ 3's never catch up.  Note, I think this is the reason that Harvester 3's are currently as excessive as they are.  This does not look balanced to me.

With Harvester 3's set to 50 per second:.



What I like about this is that Harvester 3's give you a nice boost, econ 2 and harvester 2's becomes a viable choice (8K vs. 9K knowledge) and the numbers are close enough that you have to look at your early planets to determine if the resource node counts justify one or the other.   In the long run, Harvester 3's win out due to the lack of a cap, but in the short run, Econ 3's probably outperform as I strongly suspect your first 3 planets will not average 4.25.   - Most of the "pick the best resource route to my target" comes after planet 5 for me and if that is the case, the Harvester numbers are overstated early, but will catch up later. 


Questions that come out of this for me:.
1. What is the target M&C number players need to be successful in the mid game and late game?
2.  How would modeling in energy costs (as fleet size grows for instance) impact these figures? Is a better measurement "available M &C?
3. How many planets is "mid game" vs. "end game"? - How does map size effect this?
3. If you need 8 planets worth of knowledge to buy 4 ARS's mark 3 ships, is the problem with the Econ 3 command station the cap? 

Also, why is Open Office so .. ugly?

Offline _K_

  • Full Member Mark III
  • ***
  • Posts: 219
Re: Resource Galaxy Statistics
« Reply #43 on: April 01, 2012, 08:59:56 pm »
Quote
Due to every player having a homeworld you must build that into the model.
Average of 4.25 resource nodes/planet.
Eh, but why? We know that homeworlds contain 12 resource nodes on average. And since keith used a "1 homeworld" for his basic colculation, why not do the same and go with a "1 homeworld with 12 resources".

It doesnt make the math that much harder.
Quote
Baseline uses logistic stations.
Once again, why? Why not the econ stations? Since our research only considers maximising economical output, we always use highest available mark of an eco station. A possibility of setting logistics and combat stations are just some points to be considered later.

Finally, i dont see your charts incorporate efficiecy per K spent. I mean sure, if you only compare MKIII harvesters vs MKIII stations its fine, but to really check how it goes with MKII's, you need study K cost efficiecy.

Quote
3. How many planets is "mid game" vs. "end game"? - How does map size effect this?
Thats a big question to actually consider. It seems like the end game can be anywhere from 12-15 to 30-40, with mid-game going all the way from 1 to these values. The eco stations reach their full potential at 13 planets, usually more because sometimes you have to pop other kinds of stations. In my opinion, it means that at 15-17 planets they should become inferior to harvesters, and thats not counting the opportunity cost of not using the other station types.

I've built a model of my own to provide those graphs for my post in the .031 thread. It assumes theres 1 homeworld with 12 resources, 4 resources per system on average, Eco stations of max available level are being built in each system. The income calculated is "bonus income", as compared to all-MK1 economy.
And since i also suggested K cost changes there, the model calculates 2 things: total (bonus) income provided by a given upgrade, and its knowledge efficiecy (total income/K spent).
Since this thread proves that the average is 4, ill go recalculate a little and post some graphs.

Above is the current situation. So obvious its boring.


And this is what i have suggested there. 4000/5000 -> 3000/6000 on both eco stations and harvesters research, 32/44 on harvester income, 90/150 on eco station income. As you can see, this makes pretty much ANY combination of techs viable, including MKII ecos+MKII harvesters, and so on. One could argue that MKIII harvesters would be overnerfed, but imo, no they wouldnt. Dont forget the whole opportunity cost, it matters quite alot, and MKIIs while efficient, cant generate much income. So, people who want more moneys and want to use their battle stations will still enjoy them, i bet.


Also, i cant believe people are suggesting to actually boost eco station to the OP level of the harvesters. Come on, if you want easy money, just use a handicap. The economy has been becoming easier and easier for the last i dont know how many updates, along with many other things. And in all that time the AI got what? The hybrid antagonizer? Boosts to some ships which might end up in its bonus type list? Thats not very much to compensate for all the boosts the humans got. First eco stations come, massively superior to harvester upgrades, everyone abuses the hell out of them and starts considering the eco boost they give normal, now this happens and people get used to it so damn quickly that they even start getting opposed to reverting to where it was.

Oh, and derp at people bashing me for my previous comment. I know the devs are pretty cool guys, but i kinda expected to get more credit after spending so much time doing that awesome research over there. The reason i keep talking about it everywhere, eh.
« Last Edit: April 01, 2012, 10:04:45 pm by _K_ »

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Resource Galaxy Statistics
« Reply #44 on: April 01, 2012, 10:04:34 pm »
Just for reference
Layout is two sets of semicolon separated values. First set is income per second, second is knowledge costs, with 0 indicating unlocked at start.
Layout within each set is Mk.1/Mk. 2/Mk. 3
Both for ONE type of resource income

Econ Station: 32/80/160;0/4000/5000
Harvester: 20/31/73;0/2000/2500 (remember, as there are two lines for harvesters, practical K costs are these multiplied by 2)

Logisitics Station: 24/48/96;0/4000/5000
Military Station: 16/32/64;0/4000/5000


Under Nodor's suggestion, Mk. III harvesters should get 50/s. He did state that knowledge costs would need to be adjusted, but did not give any concrete suggested value.

Under _K_'s suggestion,


Econ Station: 32/90/150;0/3000/6000
Harvester: 20/32/44;0/1500/3000 (remember, as there are two lines for harvesters, practical K costs are these multiplied by 2)

So under _K_'s model, both Mk. IIs get a moderate buff (a little more income for a little less knowledge), but Mk. IIIs get a pretty chunky nerf, (a lot less income for a moderate increase in knowledge)

Although it's sad to see Mk. III incomes go down greatly, it does seem like the best way to going to make getting Mk. IIs and not getting Mk. IIIs a competitively viable choice under some circumstances.

My only concern is if that will cause the game to have those long chunks of waiting that was one of the things this change was trying to fix in the first place. Not that I am advocating that the current situation is fine (it isn't), but I don't want it to go back where we were before.
However, as under _K_'s model, Mk. IIs do get a buff, and even with the nerf, Mk. III harvesters are still better than they were before this whole thing started, I'm pretty sure the economic pace will fall in a much more balanced middle compared to the slowness at mid game we had before and the crazy fast at all stages we have now.

EDIT: And just for lols, here is the harvesters as they were before:
Harvester: 20/28/36;0/3250/4000 (remember, as there are two lines for harvesters, practical K costs are these multiplied by 2)

EDIT2: _K_, I am assuming that in your model, Logisitics and Military knowledge costs are adjusted too, and will receive a similar progression of income increase relative to their Mk. I income?
EDIT3: If I use the income ratios for econ stations and apply them to logistics and military
Mk. II / Mk. I = 90/32 = 2.8125
Mk. III/ Mk. I = 150/32 = 4.6875
Using these ratios on the other stations yields
Logisitics Station: 24/67.5/112.5;0/3000/6000
Military Station: 16/45/75;0/3000/6000

Notice that although the higher marks get a buff to their economic output, they are still quite inferior to econ stations in terms of economic output.
Also, their economic growth rate over mark could actually be a little less than econ stations and still remain competitively viable, thanks to their other effects also scaling with Mk.
« Last Edit: April 01, 2012, 10:18:21 pm by techsy730 »