AnvilStats
#1
AnvilStats has reached the first release-able milestone. It can calculate per-biome blocktype statistics for a level. Thus, it can be used to measure the amount of ores in the vanilla world and adjust the generator parameters.

Usage:
AnvilStats <method> [<path>]
<method> is a number, currently only 0 is supported, for blocktype statistics.
<path> is a path to MCA files, if not specified, current directory is used.

The process creates N + 1 threads (where N is the number of available cores) and processes all MCA files. In the end, three statistics files are written:
- Biomes.xls - amount of biomes in the level
- BlockTypes.xls - amount of blocktypes in the level
- BiomeBlockTypes - amount of blocktypes in each individual biome

I'm planning to add more statistics (mobs, spawnertypes, trees etc.) and even new methods (draw biome map, draw height map, ...)

Currently, you can only build the project from sources, there is no binary release. Also, the build has been tested on Windows only, it probably won't work on Linux (porting volunteers are welcome Smile

EDIT: Added example output files as attachments to this post.
EDIT2: Updated Biomes.xls with fixed format string.
Now I just need a large-enough world to run tests on. Unfortunately MLG ( http://www.minecraftforum.net/topic/1877...generator/ ) runs only single-threaded, so the generation is painfully slow. I might write my own MLG knockoff faster than it generates a decent worldTongue


Attached Files
.xls   Biomes.xls (Size: 3.94 KB / Downloads: 206)
.xls   BlockTypes.xls (Size: 5.91 KB / Downloads: 197)
.xls   BiomeBlockTypes.xls (Size: 135.77 KB / Downloads: 191)
Reply
Thanks given by:
#2
In rev 899 AnvilStats already calculates the statistics for mob spawners. I think I'm done with statistics now, I want to try to make it draw a biome map Smile
Reply
Thanks given by:
#3
AnvilStats in rev 908 can draw a nice map of the biomes. It's limited to making tiles, one region equals one map tile. It's not as good as Amidst, but it's good enough for us to be able to compare biomes in various Anvil worlds.
Reply
Thanks given by:
#4
So I've had MLG running for three days on my computer, so far it has generated a world about 30.000 x 50.000 blocks in size and 30 GiB worth on the disk. I think that might be good enough a sample Smile
Reply
Thanks given by:
#5
wow XD that's huge
Reply
Thanks given by:
#6
so with this we can finaly see how manny ores there are etc?Big Grin
Reply
Thanks given by:
#7
Yes.

It's still generating, says "76 % done, 1 day 2 hours remaining". I'm gonna let it finish, then I'll run the stats. Anyone want a 50k x 50k world? Expected size ~53 GiB Wink

I'll attach the stats here once I have them. Maybe even the biome map, if it's not too large.
Reply
Thanks given by:
#8
The generator finished, finally, last night. Now I'm trying to run AnvilStats on the generated world (52 GiB), and it's taking forever. And worst thing is, the CPU is not doing much, there's another bottleneck - the cFastNBT is not fast enough. It's still allocating all its cNBTTag-s from the heap and that uses some locking, which means the CPU is switching between threads like crazy - I've got 20k threadswitches in each of the 5 threads. I guess I'll have to develop a cHyperFastNBT that will allocate enough memory for all the NBT Tags at its start (by a guess) and then use that memory piece by piece, rather than calling "new cFastNBTTag".
And now that I think of it, I think the statistics' counters will overflow with such a huge world. I'll need to make the counters 64-bit.
Reply
Thanks given by:
#9
So it takes my computer 1.5 hr to process the 50 GiB into the few kilobytes of statistics. Right now I have the wrong statistics (overflowed int math), I'll run it again with fixed datatypes..
Reply
Thanks given by:
#10
And here are the statistics for the huge level. This time the counters didn't overflow, so the block counts should be accurate. That means the statistics have processed 9.765.625 chunks, 639.590.465.536 blocks. That is almost 600 GiB of data just for the block types, if uncompressed. The statistics pass took 70 minutes; slightly better than before because I tweaked cFastNBT preallocation size.

What surprised me quite a lot is that the river biome is the second "most popular" biome, after ocean. Although the overall differences are minimal, it might have been just a coincidence. Still, I've always considered river biome to be of minimum area.


Attached Files
.xls   BiomeBlockTypes.xls (Size: 138.73 KB / Downloads: 187)
.xls   Biomes.xls (Size: 4 KB / Downloads: 195)
.xls   BlockTypes.xls (Size: 6.14 KB / Downloads: 217)
.xls   Spawners.xls (Size: 530 bytes / Downloads: 210)
.txt   Statistics.txt (Size: 443 bytes / Downloads: 204)
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)