Theres got to be some sort of pattern (Ill bet its horribly complex though). After all, logical computing can never be truly random. It can throw around and rearrage numbers according to innumerable formulas, but that still involves math, not chance.
if you want to learn the generation algorithm, youll have to either ask notch himself, or learn Java and dissect his code. now, being a programmer myself, i doubt he will actually outright tell you the algorithm, so youll have to dissect his code yourself. and ive looked at it a little. he used long, so theres 2^64 combinations. at most. and he didnt use double so decimals will screw it all up.
oh and one more thing. a seed doesnt generate terrain directly. demonstration is as follows:
int demo = Math.randomSeed(5);
for(int x = 0; x<11; x++; )
{
System.out.println(demo);
}
your output looks like this, but the numbers arent exact, theyre random:
15356
34553
64334
76542
98774
15356
34553
64334
76542
98774
notice anything? the numbers repeat. its using the same 5 numbers over and over. so, you could theoretically dissect his algorithm, but it would be quite difficult without comprehensive knowledge of Java.
edited: code was making a winky face
edited again: also, for those of you who are saying its COMPLETELY random, you are wrong. to an extent. yes you could argue that it might as well be random, but say you put in the seed 27,463,758. (commas are to help me explain, calm down). if you put that seed in, you would get a set of INITIALLY random numbers. a total of twenty seven million, four hundred sixty three thousand, seven hundred and fifty eight numbers that repeat over and over. now, when i say initially, is that, yes, it is kinda random, but the seed itself helps generate those "random" numbers. this is my last edit, so i will now respond.
perhaps if we turn the number form of the seeds into binary which the computer will eventually turn it into anyway then we will see a more simple pattern emerge. for example with to very different numbers like 13 and 4, and turn them into binary 1101=13, 100=4. now we see similarities that the computer would read as well like 1101, 100 .
There's a lot of stuff that been said about how seeds are calculated from text strings using the java procedure hashcode() and also how numeric seeds are handled by the MC world generator that is no longer true.
Especially much of what was stated back in 2011.
Here's the way things stand as of 1 July, 2013 as far as I can tell.
Java's hashcode() routine is definitely being used to Hash, or if you will convert, a text string into a numeric seed.
Any text that is entered into MC in the input window labeled "Seed for the World Generator" that contains something OTHER than +-0123456789, those 12 characters ONLY, will be considered a text string, NOT a number. So if you accidentally put a space anywhere in that window you will not get what you expected.
The hashcode() routine uses 32 bit math and the output is a 32 bit signed integer and this is exactly the same as doing a X=mod(x,2^32) calculation after EVERY math operation.
FYI: Mod(X,n) means divide X by n, throw away the quotient and keep the remainder. ie Mod(17,5) = 2.
Because of this 32 bit math entering a text string as a seed limits the seeds available to MC to the range of -2,147,483,648 thru 2,147,483,647.
These NUMERIC seeds are what will be displayed as the world's seed if you type in "/seed" while playing MC. Even if you entered a text string originally to create the world.
The number 32 crops up again for some reason (unrelated to the above I'm sure) in that the MC seed input window in the latest versions of MC will accept a MAXIMUM of 32 characters and no more. At one time it would only display 32 characters but would actually pass on much more to the hashcode() routine.
where: h(s) is the hash code for string s n is the length of s sis the ascii code for the ith ;character in string s, s[0] being the first character and s[n-1] being the last
Example: For the string "abcd" we first look up the decimal ascii code values for those letters.
(Only the decimal codes from 32 through 126 on the above table3 produce printable characters that the input window will accept.)
(Actually the MC input window will take ANY printable unicode character, not just those in the above table.)
a=97, b=98, c=99, d=100
the length, n, of "abcd" is 4 so our equation will b:
h = 97*314-1-0+ 98*314-1-1+99*314-1-2+100*314-1-3 or
h = 97*313 + 98*312 + 99*311 + 100*310 or
h = 97*29791 + 98*961 + 99*31 + 100*1 or
h = 2889727 + 94178 + 3069 + 100 or
h = 2987074
If anyone is interested I've developed an Excel spreadsheet that will take a text string and produce the same result that java's hashcode() produces. I'll upload the file and post a link if someone shows an interest. Unfortunately, Excel only takes ASCII codes through decimal 255.
MC's random seed generator, as far as I can tell, will produce a random 64 bit signed integer seed generated (probably) through some calculation involving the user's computer clock. This will occur whenever the seed input window is left blank or a 0 (zero) is entered.
The range of these seeds is -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807.
This same range without the commas (-9223372036854775808 through 9223372036854775807) is the acceptable input range for numeric seeds in the MC seed input window. Seeds within this range can be entered manually in the seed input box.
I'm pretty sure that a statement made over two years ago that the MC code only uses the lower 48 bits of these seeds is no longer true. My experiments show no truncation of numeric seeds. Truncation to 48 bits may have occurred in earlier versions of MC but definitely not lately.
There are no dangerous weapons. There are only dangerous people. R.A. Heinlein
If you aren't part of the solution, then you obviously weren't properly dissolved.
I think different numbers mean different things. For example, 7 = floating island 1= snow. So im thinking the seed 17 or 71 will result in being the same seed. Or 32 and 5
You add each digit together. so 111111111 could be the same as 9. Or its just completely random and im wasting my time
I think different numbers mean different things. For example, 7 = floating island 1= snow. So im thinking the seed 17 or 71 will result in being the same seed. Or 32 and 5
You add each digit together. so 111111111 could be the same as 9. Or its just completely random and im wasting my time
You're wasting your time.
Rollback Post to RevisionRollBack
There are no dangerous weapons. There are only dangerous people. R.A. Heinlein
If you aren't part of the solution, then you obviously weren't properly dissolved.
if you want to learn the generation algorithm, youll have to either ask notch himself, or learn Java and dissect his code. now, being a programmer myself, i doubt he will actually outright tell you the algorithm, so youll have to dissect his code yourself. and ive looked at it a little. he used long, so theres 2^64 combinations. at most. and he didnt use double so decimals will screw it all up.
oh and one more thing. a seed doesnt generate terrain directly. demonstration is as follows:
int demo = Math.randomSeed(5);
for(int x = 0; x<11; x++; )
{
System.out.println(demo);
}
your output looks like this, but the numbers arent exact, theyre random:
15356
34553
64334
76542
98774
15356
34553
64334
76542
98774
notice anything? the numbers repeat. its using the same 5 numbers over and over. so, you could theoretically dissect his algorithm, but it would be quite difficult without comprehensive knowledge of Java.
edited: code was making a winky face
edited again: also, for those of you who are saying its COMPLETELY random, you are wrong. to an extent. yes you could argue that it might as well be random, but say you put in the seed 27,463,758. (commas are to help me explain, calm down). if you put that seed in, you would get a set of INITIALLY random numbers. a total of twenty seven million, four hundred sixty three thousand, seven hundred and fifty eight numbers that repeat over and over. now, when i say initially, is that, yes, it is kinda random, but the seed itself helps generate those "random" numbers. this is my last edit, so i will now respond.
Especially much of what was stated back in 2011.
Here's the way things stand as of 1 July, 2013 as far as I can tell.
Java's hashcode() routine is definitely being used to Hash, or if you will convert, a text string into a numeric seed.
Any text that is entered into MC in the input window labeled "Seed for the World Generator" that contains something OTHER than +-0123456789, those 12 characters ONLY, will be considered a text string, NOT a number. So if you accidentally put a space anywhere in that window you will not get what you expected.
The hashcode() routine uses 32 bit math and the output is a 32 bit signed integer and this is exactly the same as doing a X=mod(x,2^32) calculation after EVERY math operation.
FYI: Mod(X,n) means divide X by n, throw away the quotient and keep the remainder. ie Mod(17,5) = 2.
Because of this 32 bit math entering a text string as a seed limits the seeds available to MC to the range of -2,147,483,648 thru 2,147,483,647.
These NUMERIC seeds are what will be displayed as the world's seed if you type in "/seed" while playing MC. Even if you entered a text string originally to create the world.
The number 32 crops up again for some reason (unrelated to the above I'm sure) in that the MC seed input window in the latest versions of MC will accept a MAXIMUM of 32 characters and no more. At one time it would only display 32 characters but would actually pass on much more to the hashcode() routine.
If you're interested, here's the formula for hashcode() from http://en.wikipedia....Java_hashCode():
where:
h(s) is the hash code for string s
n is the length of s
sis the ascii code for the ith ;character in string s, s[0] being the first character and s[n-1] being the last
Example: For the string "abcd" we first look up the decimal ascii code values for those letters.
(Only the decimal codes from 32 through 126 on the above table3 produce printable characters that the input window will accept.)
(Actually the MC input window will take ANY printable unicode character, not just those in the above table.)
a=97, b=98, c=99, d=100
the length, n, of "abcd" is 4 so our equation will b:
h = 97*314-1-0+ 98*314-1-1+99*314-1-2+100*314-1-3 or
h = 97*313 + 98*312 + 99*311 + 100*310 or
h = 97*29791 + 98*961 + 99*31 + 100*1 or
h = 2889727 + 94178 + 3069 + 100 or
h = 2987074
If anyone is interested I've developed an Excel spreadsheet that will take a text string and produce the same result that java's hashcode() produces. I'll upload the file and post a link if someone shows an interest. Unfortunately, Excel only takes ASCII codes through decimal 255.
MC's random seed generator, as far as I can tell, will produce a random 64 bit signed integer seed generated (probably) through some calculation involving the user's computer clock. This will occur whenever the seed input window is left blank or a 0 (zero) is entered.
The range of these seeds is -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807.
This same range without the commas (-9223372036854775808 through 9223372036854775807) is the acceptable input range for numeric seeds in the MC seed input window. Seeds within this range can be entered manually in the seed input box.
I'm pretty sure that a statement made over two years ago that the MC code only uses the lower 48 bits of these seeds is no longer true. My experiments show no truncation of numeric seeds. Truncation to 48 bits may have occurred in earlier versions of MC but definitely not lately.
There are no dangerous weapons. There are only dangerous people. R.A. Heinlein
If you aren't part of the solution, then you obviously weren't properly dissolved.
The latest release of Amidst, version 4.6 can be found here:
https://github.com/toolbox4minecraft/amidst/releases
You should probably also read this:
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-tools/2970854-amidst-map-explorer-for-minecraft-1-14
You can find me on the Minecraft Forums Discord server.
https://discord.gg/wGrQNKX
.1 = 1475
.2 = 1476
And so on
Also I tried typing in just 1473 and the seed came out the same as 1473
You add each digit together. so 111111111 could be the same as 9. Or its just completely random and im wasting my time
You're wasting your time.
There are no dangerous weapons. There are only dangerous people. R.A. Heinlein
If you aren't part of the solution, then you obviously weren't properly dissolved.
The latest release of Amidst, version 4.6 can be found here:
https://github.com/toolbox4minecraft/amidst/releases
You should probably also read this:
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-tools/2970854-amidst-map-explorer-for-minecraft-1-14
You can find me on the Minecraft Forums Discord server.
https://discord.gg/wGrQNKX
Look forward to seeing some more results come from this.