A thought occurred to me... what if the truncated parts of seeds were actually set aside as secondary/tertiary/n-ary seeds, each independently run through the process by which pseudorandom numbers are generated, and checked against previous seeds in some manner to produce results different from any one of the seeds? If this were so, you wouldn't need infinitely-sized variables, as each could be stored in its own dynamic variable. There may be a finite number of seeds, but with a system like this, there'd be a theoretically infinite number of possible seed combinations. Only problem is that the longer your seed, the more time world generation would take (though I imagine this wouldn't become an issue until a very large number of seeds were used).
I doubt it's actually implemented like this, but would this not be possible?
Also, must be a spelling nazi here: it's googol, not google, and googolplex, not googleplex. A googol is a number (specifically, 10^100). Google is a company. A googolplex is a number (specifically, 10^googol). The Googleplex is the HQ of Google.
It could be implemented like that, but its adding unnecessary complexity to the world generation process. Why would you ever need more than 1.8x10^19 different worlds? More than 180,000,000,000,000,000,000 (180 quintillion?) worlds?
Oh, like I said, I don't think it's actually implemented like that - nor would I make it so, were I Notch. The point was that it's possible to do world generation in such a way that, provided an unlimited world size (not provided in Minecraft as-is), it actually is possible to generate an infinite number of unique worlds. I had assumed that from the get-go we were talking about possibility, not practicality.
Quote from TrapVader »
Yes, granted they have the same seed. But if seeds were randomly generated, think of the chances. If you got the EXACT same map as, per say, your friend on MC, then I'd consider investing in a lot of lottery tickets.
Oh, like I said, I don't think it's actually implemented like that - nor would I make it so, were I Notch. The point was that it's possible to do world generation in such a way that, provided an unlimited world size (not provided in Minecraft as-is), it actually is possible to generate an infinite number of unique worlds. I had assumed that from the get-go we were talking about possibility, not practicality.
You would still be limited by hardware. Having an infinite amount of anything on a computer is impossible, as you will always have to have somewhere to store it and some way to access it.
However, the way computers generate random numbers is a bit... bad.
To randomly form a number, the computer rotates through all numbers in a chaotic manner and chooses just one.
The seed is like the starting point for that selection.
The seed you type in when you generate a world is the seed for all the generation of the rest of the world.
The reason we both get the same world from the seed 'notch', for instance, is a great example of how computers' 'random' process is not really random.
That's why it's called pseudo-random. In fact, determinism is kind of the point.
Well, technically, the seeds are not random, they are Pseudo-Random numbers based of constantly changing variables, like your system clock. While the amount is not truly infinite, it is so astronomically huge that it would be unlikely that two users would get the same seed.
it's googol, not google, and googolplex, not googleplex. A googol is a number (specifically, 10^100). Google is a company. A googolplex is a number (specifically, 10^googol). The Googleplex is the HQ of Google.
My bad. I got the googol part right though.
So, we're all agreeing that there's only 10^19 possible seeds?
P.S. 94- number of characters, and there is infinite characters you can enter onto the generator, so its to the power of infinity. SO.... IT IS TRUE!
Er, nothing can hold an infinite amount of characters.
The best way I can sum up the definition of Infinity in a way that even the zombies in Minecraft can grasp, is infinity is something you can never reach no matter how hard you try.
For reference a computer the size of the entire universe would not have enough power to count to infinity, even if it could count a googolplex a microsecond. :smile.gif:
Rollback Post to RevisionRollBack
I have Asperger's Syndrome, a mental disorder of the Autistic Spectrum, apologies in advance if my posts seem a bit off.
For reference a computer the size of the entire universe would not have enough power to count to infinity, even if it could count a googolplex a microsecond. :smile.gif:
For reference a computer the size of the entire universe would not have enough power to count to infinity, even if it could count a googolplex a microsecond. :smile.gif:
That's misleading, though. It's not that infinity is so large it cannot ever be reached - infinity is simply Not aNumber.
The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2011
Posts:
43
Member Details
Quote from bdiddy »
I was just thinking about the seeds. If there is a seed for every single world, then they aren't just randomly generated. There must be a set amount of worlds, right? Am I the only one who thought of this?
...someone help me...
I won't spend all day reading the page after page of responce.. but I will add one myself. :wink.gif:
To think the worlds are not Infinite might be a bit of a letdown, but consider Reality itself is comprised of up - down - and strange qaurks, which can only be assembled in So Many patterns before they have been assembled in Every pattern. So Infinity itself is finite too.
Perspective ..
No human being has ever counted to 1 billion. . Never.
Why? Because Humans only live for a little over 2 billion Seconds.
A number more than you could count to in a lifetime.. Now... the number of possible worlds in MineCraft?
A Billion times That!
Edit 2: The following is wrong. After a little more reading, specifically the blog post on mojang.com, it seems that Minecraft uses a 32 bit hash for the seed, at least for user supplied seed strings, so I guess the number of possible worlds is 2^32, or 4,294,967,296. It is still possible that when the user doesn't provide a string that the total number of worlds is 2^48
Original forum post:
Assuming Minecraft uses the java.util.Random class, either directly or through the Math.random() method, there are 281,474,976,710,656 possible starting worlds. (2^48 possible seeds).
Why is this answer different to everyone else? Because no one here checked the actual Java API docs.
The java.util.Random class uses a 48 bit seed. (To create a Random object, you can provide a Long, which is 64 bits. The constructor for the Random object then reduces that Long to 48 bits via some simple bitwise operations).
It is possible to subclass Random and override the Random.setSeed(Long seed) method, allowing up to 64 bit seeds. But without any evidence of Notch doing such a thing, there is no reason to postulate that he has.
Edit: Should also repeat that I am assuming use of the java.util.Random class. The Minecraft world generator might make no use of it... in which case, all we have is speculation.
I don't know where you're getting your information..
The seed is stored as a long. A long is 64 bits, so there are 2^64 = 1.8x10^19 possible seeds no matter how you shake it.
If you let the game decide for you, it invokes the following code:
long l = (new Random()).nextLong();
Which will generate a 48 bit long according to Random API specifications. There is no overriding implementation of Random in the source code, so we have to assume that we are using the default Random class.
So without user input, the number of worlds allowable (not possible, because it will always be possible to have 10^19) is 2^48, as you mention.
If you specify a seed, the game first tries to parse a Long from what you put in with this code:
try
{
long l1 = Long.parseLong(s);
if(l1 != 0L)
{
l = l1;
}
}
catch(NumberFormatException numberformatexception)
The game tries to parse a long from the string you entered. If you did enter a fully numeric string(with or without a leading '-' to indicate sign), then it simply takes the parsed long and assigns that as the seed. This is where it is allowable to have the full amount of seeds possible.
If the string entered was not a numeric string, then it takes the hashcode of the string. A hashcode is an int, which is 32 bits, resulting in only 4 billion different seeds allowable.
So:
Enter an alphanumeric string: 32 bit seed
Allow game to pick your seed: 48 bit seed
Specify your own numeric seed: 64 bit seed
But do note that a 32 bit seed is the same thing as a 64 bit seed with leading 0s. So seed 1234 is the same as seed 00000000000000000001234.
Through simple experimentation, I have just found that I was right... there really is only 2^48 worlds.
Try, for example, these two seeds:
299070898683631
17595921972975
You'll find they are the same world (baring any dramatic change in starting location). There really are only 2^48 possible worlds. (Otherwise, I should not have been able to so effortlessly find two different longs that produce the same world).
Through simple experimentation, I have just found that I was right... there really is only 2^48 worlds.
Try, for example, these two seeds:
299070898683631
17595921972975
You'll find they are the same world (baring any dramatic change in starting location). There really are only 2^48 possible worlds. (Otherwise, I should not have been able to so effortlessly find two different longs that produce the same world).
That's weird, because according to the source code I quoted, those should generate different seeds.
Through simple experimentation, I have just found that I was right... there really is only 2^48 worlds.
Try, for example, these two seeds:
299070898683631
17595921972975
You'll find they are the same world (baring any dramatic change in starting location). There really are only 2^48 possible worlds. (Otherwise, I should not have been able to so effortlessly find two different longs that produce the same world).
That's weird, because according to the source code I quoted, those should generate different seeds.
How'd you come about those two seeds?
Wait, you said Random only accepts 48 bit seeds. That would explain a little bit.
*EDIT*
Yup, putting them in as a seed yields the same sequence. Here is my test output:
Input: 299070898683631
First random long in sequence: -1016646732801583824
17595921972975
First random long in sequence: -1016646732801583824
That's weird, because according to the source code I quoted, those should generate different seeds.
How'd you come about those two seeds?
Magic.
Quote from trunksbomb »
Wait, you said Random only accepts 48 bit seeds. That would explain a little bit.
Damn, ok, not really magic. Lots of intuition then. Take a look at those numbers in hexadecimal. Also take a look at how Random reduces a long down to 48 bits.
Quote from WhatGravitas »
...
Oh, another Culture fan :biggrin.gif:
Edit: Erm, I meant 'in hexadecimal', not 'in a hex editor'.
Why is this discussion still continuing? The actual number of seeds available is posted at least once on every page of topics. What more is to be said?
Why is this discussion still continuing? The actual number of seeds available is posted at least once on every page of topics. What more is to be said?
Because we've been wrong all along.
Both of those seeds posted yield a seed of 17613665163394 for the random number generator.
You are welcome :3
P.S. 94- number of characters, and there is infinite characters you can enter onto the generator, so its to the power of infinity. SO.... IT IS TRUE!
Oh, like I said, I don't think it's actually implemented like that - nor would I make it so, were I Notch. The point was that it's possible to do world generation in such a way that, provided an unlimited world size (not provided in Minecraft as-is), it actually is possible to generate an infinite number of unique worlds. I had assumed that from the get-go we were talking about possibility, not practicality.
If only probability worked like that.
You would still be limited by hardware. Having an infinite amount of anything on a computer is impossible, as you will always have to have somewhere to store it and some way to access it.
That's why it's called pseudo-random. In fact, determinism is kind of the point.
My bad. I got the googol part right though.
So, we're all agreeing that there's only 10^19 possible seeds?
Er, nothing can hold an infinite amount of characters.
The best way I can sum up the definition of Infinity in a way that even the zombies in Minecraft can grasp, is infinity is something you can never reach no matter how hard you try.
For reference a computer the size of the entire universe would not have enough power to count to infinity, even if it could count a googolplex a microsecond. :smile.gif:
what about a nanosecond? :wink.gif:
That's misleading, though. It's not that infinity is so large it cannot ever be reached - infinity is simply Not a Number.
I won't spend all day reading the page after page of responce.. but I will add one myself. :wink.gif:
To think the worlds are not Infinite might be a bit of a letdown, but consider Reality itself is comprised of up - down - and strange qaurks, which can only be assembled in So Many patterns before they have been assembled in Every pattern. So Infinity itself is finite too.
Perspective ..
No human being has ever counted to 1 billion. . Never.
Why? Because Humans only live for a little over 2 billion Seconds.
A number more than you could count to in a lifetime.. Now... the number of possible worlds in MineCraft?
A Billion times That!
Original forum post:
Assuming Minecraft uses the java.util.Random class, either directly or through the Math.random() method, there are 281,474,976,710,656 possible starting worlds. (2^48 possible seeds).
Why is this answer different to everyone else? Because no one here checked the actual Java API docs.
The java.util.Random class uses a 48 bit seed. (To create a Random object, you can provide a Long, which is 64 bits. The constructor for the Random object then reduces that Long to 48 bits via some simple bitwise operations).
http://download.oracle.com/javase/6/doc ... andom.html for some light reading on how Java does randomness.
It is possible to subclass Random and override the Random.setSeed(Long seed) method, allowing up to 64 bit seeds. But without any evidence of Notch doing such a thing, there is no reason to postulate that he has.
Edit: Should also repeat that I am assuming use of the java.util.Random class. The Minecraft world generator might make no use of it... in which case, all we have is speculation.
http://mad-freedom-huddle.blogspot.com/
The seed is stored as a long. A long is 64 bits, so there are 2^64 = 1.8x10^19 possible seeds no matter how you shake it.
If you let the game decide for you, it invokes the following code:
Which will generate a 48 bit long according to Random API specifications. There is no overriding implementation of Random in the source code, so we have to assume that we are using the default Random class.
So without user input, the number of worlds allowable (not possible, because it will always be possible to have 10^19) is 2^48, as you mention.
If you specify a seed, the game first tries to parse a Long from what you put in with this code:
The game tries to parse a long from the string you entered. If you did enter a fully numeric string(with or without a leading '-' to indicate sign), then it simply takes the parsed long and assigns that as the seed. This is where it is allowable to have the full amount of seeds possible.
If the string entered was not a numeric string, then it takes the hashcode of the string. A hashcode is an int, which is 32 bits, resulting in only 4 billion different seeds allowable.
So:
Enter an alphanumeric string: 32 bit seed
Allow game to pick your seed: 48 bit seed
Specify your own numeric seed: 64 bit seed
But do note that a 32 bit seed is the same thing as a 64 bit seed with leading 0s. So seed 1234 is the same as seed 00000000000000000001234.
Try, for example, these two seeds:
299070898683631
17595921972975
You'll find they are the same world (baring any dramatic change in starting location). There really are only 2^48 possible worlds. (Otherwise, I should not have been able to so effortlessly find two different longs that produce the same world).
http://mad-freedom-huddle.blogspot.com/
they really think you guys are dumb enough to click those links???
You have just read this. You are also manually breathing.
That's weird, because according to the source code I quoted, those should generate different seeds.
How'd you come about those two seeds?
Wait, you said Random only accepts 48 bit seeds. That would explain a little bit.
*EDIT*
Yup, putting them in as a seed yields the same sequence. Here is my test output:
I'm bookmarking this paradoxical thread.
Magic.
Damn, ok, not really magic. Lots of intuition then. Take a look at those numbers in hexadecimal. Also take a look at how Random reduces a long down to 48 bits.
Oh, another Culture fan :biggrin.gif:
Edit: Erm, I meant 'in hexadecimal', not 'in a hex editor'.
http://mad-freedom-huddle.blogspot.com/
Because we've been wrong all along.
Both of those seeds posted yield a seed of 17613665163394 for the random number generator.
So, yea, there are 2^48 possible seeds.