cave update oregen research stuff.

This commit is contained in:
Peter 2021-02-20 22:39:37 +08:00
parent a74ac696a7
commit e0457e8913
4 changed files with 73 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,34 @@
<a class="link" style="left:1%; top: 1%; position: absolute;" href="https://npc-strider.github.io">🔗 Back to home page</a><br><br><br>
These graphs are interactive - scroll controls the zoom (alternatively, hover over the bottom-left corner and use the magnifying glass to select an area). Use the home icon to reset the view.
<div style="text-align: center;">
<h1>Absolute frequency</h1>
<iframe id="inlineFrameExample"
title="Absolute frequency"
src="abs_freq.html"
onload="this.style.height=this.contentWindow.document.body.scrollHeight;this.style.width=this.contentWindow.document.body.scrollWidth;">
</iframe><br>
*Note that unfortunately the ore per chunk layer doesn't appear on the right y-axis. You can add the right axis by using the formula: y/(2*512/16)**2<br><br>
<hr>
<h1>Relative frequency</h1>
<iframe id="inlineFrameExample"
title="Relative frequency"
src="rel_freq.html"
onload="this.style.height=this.contentWindow.document.body.scrollHeight;this.style.width=this.contentWindow.document.body.scrollWidth;">
</iframe>
</div><br>
<hr><br>
This text was copy-pasted from the github repo at https://github.com/npc-strider/minecraft-ore-analysis
<h1 id="minecraft-ore-analysis">Minecraft ore analysis</h1>
<h2 id="let-s-see-how-the-new-cave-update-ore-generation-compares-to-the-old-">Let&#39;s see how the new cave update ore generation compares to the old!</h2>
<h2 id="go-to-https-npc-strider-github-io-cave-update-ore-analysis-for-interactive-graphs-">Go to <a href="https://npc-strider.github.io/cave-update-ore-analysis">https://npc-strider.github.io/cave-update-ore-analysis</a> for interactive graphs!</h2>
<h3 id="both-tests-performed-with-seed-0-and-single-biome-mode-enabled-extreme-hills-biome-only-to-include-emerald-ore-statistics-size-of-1024-1024-scanned-">Both tests performed with seed 0 and single biome mode enabled (Extreme hills biome only, to include emerald ore statistics). Size of 1024*1024 scanned.</h3>
<h3 id="original-world-files-used-for-research-are-located-at-https-drive-google-com-drive-folders-1rsmfdp4nl5kafwfcpl5sank6cgup45to-usp-sharing">Original world files used for research are located at <a href="https://drive.google.com/drive/folders/1RsmfDp4nl5KaFWfCpL5sanK6cGUp45TO?usp=sharing">https://drive.google.com/drive/folders/1RsmfDp4nl5KaFWfCpL5sanK6cGUp45TO?usp=sharing</a></h3>
<p>#</p>
<p>The scripts I&#39;ve created take advantage of a slightly modified <a href="https://github.com/DonoA/PyAnvilEditor">PyAnvilEditor</a> to parse the region files.</p>
<p>I&#39;ve replaced the code in the <code>276</code> (and everything else under <code>def close(self):</code>) of the <code>world</code> class of PyAnvilEditor with <code>true</code> - this is because I&#39;m not writing to the world file, I only intend to read from it. This saves a large amount of time spent writing that would go to waste.</p>
<p>To generate the graphs I&#39;ve used Matplotlib and I use mpld3 to convert these graphs into interactive html files for use on my website.</p>
<p>We load a large section of the world into memory - ideally, you want to set the block size to the maximum as this is quicker than loading small sections of the world repeatedly. Then we iterate through each coordinate in the block - this takes about 90 seconds with a block radius of <code>128</code>. At each coordinate we iterate each count for a tile in a particular layer. Once a whole block has been processed, we add it to the total.</p>
<p>The &#39;sum&#39; represents the total amount of a particular ore block within the whole sample (A 1024*1024 square meter area). The relative frequency represents the proportion of the total amount of a particular ore that occurs at a particular y-level.</p>
<p>This sample size can be improved on but it would obviously take longer given that my RAM is limited.</p>

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,9 @@
Programming ramblings - do not expect clean code here!<br> Programming ramblings - do not expect clean code here!<br>
<a href="https://npc-strider.github.io/code">https://npc-strider.github.io/code</a><br> <a href="https://npc-strider.github.io/code">https://npc-strider.github.io/code</a><br>
<br> <br>
Graphs/analysis showing differences in ore generation between 1.16.5 and cave update snapshots.<br>
<a href="https://npc-strider.github.io/cave-update-ore-analysis">https://npc-strider.github.io/cave-update-ore-analysis</a><br>
<br>
<br> <br>
<br> <br>
<br> <br>