Instantly share code, notes, and snippets.

Created March 15, 2021 04:26
Show Gist options
• Save mjtb49/4fc1befca5431c693fe157cfb9b509b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

### ha6000 commented Mar 16, 2021

wow! what exciting code!!

good job 👍

### arskiy commented Mar 25, 2021

awesome research! keep up the great work

how

### BrainStone commented Apr 4, 2021

Would be super cool if you added code to spit out the numbers for a known seed!

### BrainStone commented Apr 4, 2021

Btw the residue function can be simplified to this:

```    static boolean residueOrSeedReliable(Disk disk, Ore ore, long residueOrSeed) {
return ((disk.salt + residueOrSeed) & 0x10) == ((ore.salt + residueOrSeed) & 0x10);
}```

Updated snippet can be seen here: https://gist.github.com/BrainStone/8f4a453b05189645a4d077d0ace72fcc

You are free to merge these changes back into this main function here.

Would be super cool if you added code to spit out the numbers for a known seed!

Set `SS` to 1, remove this:
` if (useResidue) seed = ((r.nextLong() << 4) + residue) & mask; else seed = r.nextLong() & mask;`
and change the initialization of seed to `long seed =` <your seed>`;`
(If I'm not wrong)

### MrAn0nym commented Apr 18, 2021

Would be super cool if you added code to spit out the numbers for a known seed!

Set `SS` to 1, remove this:
` if (useResidue) seed = ((r.nextLong() << 4) + residue) & mask; else seed = r.nextLong() & mask;`
and change the initialization of seed to `long seed =` `;`
(If I'm not wrong)

*You have to make sure that you indicate your seed as long by adding `L` to the end of your seed ^^

### BrainStone commented Apr 18, 2021

Would be super cool if you added code to spit out the numbers for a known seed!

Set `SS` to 1, remove this:
` if (useResidue) seed = ((r.nextLong() << 4) + residue) & mask; else seed = r.nextLong() & mask;`
and change the initialization of seed to `long seed =` `;`
(If I'm not wrong)

Thanks for the comment. But I forked the project already and modified it, so it's all good ^^

Would it be possible to release this under a free software license?

You could just put something like the following text at the top:

```// Copyright (C) 2021 mjtb49 <https://github.com/mjtb49>
//
(Obviously, this text is for `Apache-2.0`. Replace it with whatever SPDX license expression under which you want to license the program, such as `CC0-1.0` or `MIT`.)