Monster Mix
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Re: Monster Mix
I did some more testing on monsters distribution, I added some more statistic logging, ran several games where I set AIs to 0, monsters frequency to high and systems to 500, jus to see what results that would give me, and some other settings.
Some results where at least somewhat reasonable, but very often I got streaky results. One extreme example has been where Juggernauts got placed 5 times out of a total of 6 tries to place them, although the effective chance for placement has been 33%. Other results were 9 placements out of 16 tries with the same 33% effective chance, deviations on that scale have been very common.
On the other hand, the placement restrictions for Kraken, Snowflakes and Juggernauts are somewhat more restrictive than those for other space monsters. The new, more even empire homeworld distribution algorithm may play an important role, as more evenly distributed empire homeworlds most likely have substantially reduced the potential locations for space monsters that can only spawn several jumps away from those homeworlds.
Considering all that and the fact that the monsters distribution algorithm as it is probably is prone to produce odd results, I won't try to fix anything for 0.4.4. Too complicated at this stage, I say we leave it as it is now and try to fix it for the next release.
Some results where at least somewhat reasonable, but very often I got streaky results. One extreme example has been where Juggernauts got placed 5 times out of a total of 6 tries to place them, although the effective chance for placement has been 33%. Other results were 9 placements out of 16 tries with the same 33% effective chance, deviations on that scale have been very common.
On the other hand, the placement restrictions for Kraken, Snowflakes and Juggernauts are somewhat more restrictive than those for other space monsters. The new, more even empire homeworld distribution algorithm may play an important role, as more evenly distributed empire homeworlds most likely have substantially reduced the potential locations for space monsters that can only spawn several jumps away from those homeworlds.
Considering all that and the fact that the monsters distribution algorithm as it is probably is prone to produce odd results, I won't try to fix anything for 0.4.4. Too complicated at this stage, I say we leave it as it is now and try to fix it for the next release.
Re: Monster Mix
The odds of that are actually a full 1 out of 60, so not actually tremendously surprising, even if you did make far fewer than 60 samples.Vezzra wrote:Some results where at least somewhat reasonable, but very often I got streaky results. One extreme example has been where Juggernauts got placed 5 times out of a total of 6 tries to place them, although the effective chance for placement has been 33%.
similarly, the odds of getting 9+ out of 16 when there is a 33% success chance is actually a full 1 out of 20. So these deviations are not surprising. You can check such things with the binomial calculator at http://stattrek.com/online-calculator/binomial.aspxOther results were 9 placements out of 16 tries with the same 33% effective chance, deviations on that scale have been very common.
You're probably right about that. It's not that they're totally done away with, in my recent game with 200 systems and 7 AIs (albeit a Cluster layout which probably has more systems meeting the jump distances than other shapes would) there were over 10% of the systems meeting the requirements for Snowflakes and Krakens, and more than 5% meeting the reqs for Juggernauts. If I had been playing Medium or High monsters then I surely would have had some of each.On the other hand, the placement restrictions for Kraken, Snowflakes and Juggernauts are somewhat more restrictive than those for other space monsters. The new, more even empire homeworld distribution algorithm may play an important role, as more evenly distributed empire homeworlds most likely have substantially reduced the potential locations for space monsters that can only spawn several jumps away from those homeworlds.
Code: Select all
2014-08-20 21:16:31,833 DEBUG Server : Tracked Monster and Nest Summary (base monster freq: 3.3%)
2014-08-20 21:16:31,833 DEBUG Server : Monster | # placed | # valid sys locs | # valid nest planet locs
2014-08-20 21:16:31,833 DEBUG Server : SM_KRAKEN_1 | 0 | 24 | 27
2014-08-20 21:16:31,833 DEBUG Server : SM_SNOWFLAKE_1 | 0 | 24 | 25
2014-08-20 21:16:31,833 DEBUG Server : SM_JUGGERNAUT_1 | 0 | 13 | 15
That sounds fine, though I think your above point about the new empire homeworld spacing was a valid one, and a small adjustment could very well be good now, such as shifting the Snowflake, Kraken and Juggernaut spawnrates from 1.0, 0.5, 1.0 to 1.2, 0.6, 1.2 or perhaps even to 1.4, 0.7, 1.4Considering all that and the fact that the monsters distribution algorithm as it is probably is prone to produce odd results, I won't try to fix anything for 0.4.4. Too complicated at this stage, I say we leave it as it is now and try to fix it for the next release.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Monster Mix
The problem is not that these deviations occur, which is to be expected, but the rate at that these deviations occur. I get almost as much or even more very odd results than "normal"/"expected" ones. The occasional odd result is fine and even desired, but if it becomes the rule, something is off IMO.Dilvish wrote:So these deviations are not surprising.
Yep, that sounds reasonable. I'd go for the latter suggestion (1.4, 0.7, 1.4), probably raising Kraken a bit more. Apparently those got a lower spawnrate because they tend to have more potential spawn locations, but with only half the spawnrate of Juggernauts/Snowflakes they occur substantially less frequently than these. Maybe 1.4, 1.0, 1.4?a small adjustment could very well be good now, such as shifting the Snowflake, Kraken and Juggernaut spawnrates from 1.0, 0.5, 1.0 to 1.2, 0.6, 1.2 or perhaps even to 1.4, 0.7, 1.4
And probably lower the spawnrate for floaters/dyson forests a bit? Currently you get plenty of these, and only very few Snowflakes/Kraken/Juggernauts. Resulting in universes with rather dull distribution of space monsters - far too floater/dyson forest heavy.
Re: Monster Mix
We need to review the results of a series of these experiments to really get a good picture. I'll do that now and post my results in a few minutes.Vezzra wrote:The problem is not that these deviations occur, which is to be expected, but the rate at that these deviations occur. I get almost as much or even more very odd results than "normal"/"expected" ones. The occasional odd result is fine and even desired, but if it becomes the rule, something is off IMO.Dilvish wrote:So these deviations are not surprising.
Sure, Maybe 1.4, 1.0, 1.4 sounds fine to me.I'd go for the latter suggestion (1.4, 0.7, 1.4), probably raising Kraken a bit more. Apparently those got a lower spawnrate because they tend to have more potential spawn locations, but with only half the spawnrate of Juggernauts/Snowflakes they occur substantially less frequently than these. Maybe 1.4, 1.0, 1.4?
Well, I guess maybe a little, though the significant difference with floater/dyson versus the others-- the fixed element being armed and the roaming element being always unarmed-- makes them in my mind much easier to handle and therefore reasonable to sprinkle on a bit more thickly than the others. But sure, make whatever downward adjustment to floaters/dysons you deem suitable, I'm sure it will be fine.And probably lower the spawnrate for floaters/dyson forests a bit? Currently you get plenty of these, and only very few Snowflakes/Kraken/Juggernauts. Resulting in universes with rather dull distribution of space monsters - far too floater/dyson forest heavy.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Monster Mix
Well, we're not in a hurry here, because we can't do anything about it anyway for 0.4.4. Unless you're curious and want to find out right now - go aheadDilvish wrote:We need to review the results of a series of these experiments to really get a good picture. I'll do that now and post my results in a few minutes.
Re: Monster Mix
I settled for just raising Kraken, Snowflake and Juggernaut spawnrates to 0.8 / 1.2 / 1.2. Raising them more (1.0 / 1.4 / 1.4) and lowering Dyson Forest and Floater even a bit seems to throw the current balance off too much, that would require far more thorough tweaking than is reasonable for RC builds.
Re: Monster Mix
Ok so I gathered a bunch of data and made some charts. On the gathering data part-- I've been planning to implement some new command line options to help with testing the AI, and so started with one to help here
**edit to correct option spelling to quick-auto-quit**:If you first start up with a blank galaxy seed (not zero, but an empty string) then FO uses the clock for the seed, so you can do a repeated bunch of quickstarts and still get different seeds & results. In the attached patch is a script I used to do that for 300 runs and extract this monster data from the server log each time. I forget right now just how big the galaxy was, but I vaguely recall using the same settings as you. Also attached are the raw results from that (for 302 runs, 2 manual and 300 via script).
This data was mostly focused on how many monsters get placed over how many attempts. Since for any given monster different galaxies have a different number of placement attempts, the results can't just all be directly thrown together, but since a binomial like this approaches a gaussian with enough samples (and most galaxies probably had enough for this to be a reasonable approximation), I scaled each galaxy sample to a zscore which then can be compared across galaxies.
Below is the bar charts showing the results, which for the Krakens seem to be pretty close to the Gaussian curve that would be expected. For the Snowflakes and Juggernauts the distribution seems centered a little on the low side; maybe I'll try it again sometime with a much larger sampling (I think I could do a couple thousand overnight). This was just looking at how many placement attempts were successful, with some additional logging something similar could be done to assess the distribution of how many placement attempts are made.
**edit to correct option spelling to quick-auto-quit**:
Code: Select all
--quick-auto-quit
Starts a new quick-start game, bypassing the main menu, and immediately quits, for testing galaxy creation and turn zero Effects.
This data was mostly focused on how many monsters get placed over how many attempts. Since for any given monster different galaxies have a different number of placement attempts, the results can't just all be directly thrown together, but since a binomial like this approaches a gaussian with enough samples (and most galaxies probably had enough for this to be a reasonable approximation), I scaled each galaxy sample to a zscore which then can be compared across galaxies.
Below is the bar charts showing the results, which for the Krakens seem to be pretty close to the Gaussian curve that would be expected. For the Snowflakes and Juggernauts the distribution seems centered a little on the low side; maybe I'll try it again sometime with a much larger sampling (I think I could do a couple thousand overnight). This was just looking at how many placement attempts were successful, with some additional logging something similar could be done to assess the distribution of how many placement attempts are made.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Last edited by Dilvish on Wed Sep 03, 2014 12:32 am, edited 1 time in total.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Monster Mix
There is already a -q flag for quickstarting, and an important feature of this new function is apparently the quitting immediately after starting the game, so perhaps that should be indicated in the name?Dilvish wrote:Code: Select all
--quick-auto-start Starts a new quick-start game, bypassing the main menu, and immediately quits, for testing galaxy creation and turn zero Effects.
Re: Monster Mix
Doh!
My bad, I mistyped it there, as you can see in the patch, it is actually
My bad, I mistyped it there, as you can see in the patch, it is actually
Code: Select all
--quick-auto-quit
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Monster Mix
What about setting a dynamic min spawn value to reduce the possible spread? Like: statistically, in a galaxy of size x there should be about y monsters of this type, so place at least y/5 monsters? That would ensure that for a galaxy of sufficient size, there should be monsters of every type.
Attached patches are released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Monster Mix
More than a few of those such requirements can be difficult or impossible to guarantee along with all the other considerations that go into galaxy generation and population...Chriss wrote:...so place at least y/5 monsters? That would ensure that for a galaxy of sufficient size, there should be monsters of every type.
And is it really so bad if sometimes galaxies are generated differently? Not every game should have nearly-identical starting conditions...