Beta 1.3+ Seeds. Post your seeds here!

Discuss the game, stories, screenshots, videos, ideas, creations, top score!?

Post Permalink
by Zaralith » 3/3/2011

Yes. The worlds generated from the seeds are the same, it is just the spawn that is different.
The god of computing wants a sacrifice, and volunteers are being called for.
Image
User avatar
Super Moderator
Level 53
Grandmaster Programmer
Posts: 2124
Joined: 11/11/10
Location: Kelewan
Says: I do not own Planet Minecraft
Minecraft: Zaralith
mc_server: Zar's Awesome Server

Post Permalink
by Swarmer2010 » 3/3/2011

Love the Saburo seed! The island rules.
User avatar
Level 29
Expert Pony
Posts: 81
Joined: 1/6/11
Location: California
Says: I may or may not be liable for anything that has ever happened.
Minecraft: Swarmer2010

Post Permalink
by Scuttles » 3/4/2011

Zaralith wrote:Yes. The worlds generated from the seeds are the same, it is just the spawn that is different.


Sometimes. I've had a few seeds that have the exact same spawn (characters actually fall on top of each other in SMP because the spawn point was only 1 specific block, no spawn area) and I've also had spawn points literally 5-10 minutes away from each other's location. What is strange is that the game must render each seed with a specific algorithm based on the seeds letters/numbers.
User avatar
Level 97
Elite Scuttles
Posts: 47
Joined: 2/4/11

Post Permalink
by Hibbsi » 3/5/2011

Scuttles wrote:
Zaralith wrote:Yes. The worlds generated from the seeds are the same, it is just the spawn that is different.


Sometimes. I've had a few seeds that have the exact same spawn (characters actually fall on top of each other in SMP because the spawn point was only 1 specific block, no spawn area) and I've also had spawn points literally 5-10 minutes away from each other's location. What is strange is that the game must render each seed with a specific algorithm based on the seeds letters/numbers.


If i'm correct, the same algorithm is used for every generation, but the parameters of the algorithm change. I'm assuming that the parameters are somehow derived or directly taken from the hash code of the seed string, meaning that it's possible (actually, certain) that two different strings can produce the same hash code, and therefore the same world.

**EDIT**
I was right, the generated world is directly related to the seed string's hash code, not system time, world name, or anything like that.
In Java, hash codes of strings are defined as:
Image

or, in terms of Java:
Image

Using this, the hash codes can be calculated by hand or by writing a Java class to print them out (easier, as .hashCode() does it for you).

You can take my word for it (or not, and you can check it yourself) that the following is true:
  • The hash code of the string "asd" (without quotes) is 96882.
  • The hash code of the string "bUE" (without quotes) is also 96882.

If the world generation is directly related to the seed's hash code, then these two seeds should give you the same world. Let's see...

Here's "asd":
Screen shot 2011-03-05 at 12.21.24 AM.png

and here's "bUE" (complete with lag from running octave in the background. I need to start using my desktop...):
Screen shot 2011-03-05 at 12.23.39 AM.png



et voilà 8-)



</awesome>
Last edited by Hibbsi on 3/6/2011, edited 3 times in total.
Image Image Image ImageImageImage
Level 1
New Miner
Posts: 46
Joined: 2/23/11
Location: College :D
Says: i makes teh pluginz
Minecraft: Hibbsi

Post Permalink
by GLoB1N » 3/5/2011

I typed in "Garo" and got spawned next to a very deep ocean with loads of squids.
User avatar
Level 34
Artisan Hunter
Posts: 26
Joined: 2/22/11
Location: Under My Pillow

Post Permalink
by Scuttles » 3/5/2011

Damn good find Hibbsi. So in that case, do you know which key words will affect which type of landscape. Also, under those circumstances it is possible to combine said keywords to have a combined world.
Example:
Key word 1 generates a massive amount of mountains
Key word 2 generates beautiful islands
Is it possible to generate a massive amount of mountainous islands or will the total string hash code become irrelevant when combining the two codes?

Side note:
I really like the bUE/asd world. XD
User avatar
Level 97
Elite Scuttles
Posts: 47
Joined: 2/4/11

Post Permalink
by bkk0715 » 3/5/2011

i typed in the seed ''asd'' and i got a world that i had made and deleted,but whit a few changes.every thing i did in the world i deleted was in asd.but there was a square island in the one i deleted,there was one in asd,but it was connected to land in asd.the other world i deleted it was just an island.I even spawned in the same area,same beach by that mountain.
Level 15
Journeyman Explorer
Posts: 1
Joined: 2/27/11

Post Permalink
by NakedGingerKid » 3/5/2011

The spawns are the same for me and my friends, we tested them...
NakedGingerKid
Image
User avatar
Level 47
Master Necromancer
Posts: 17
Joined: 1/27/11

Post Permalink
by Adrian3670 » 3/5/2011

I used the seed "Caves" whereupon I spawned on top of a never-ending cave complex, I found lapiz lazule and copper and stuff (the industrial mod) on my first day by just wandering around. The caves are gorgeous too.
Level 1
New Miner
Posts: 1
Joined: 3/5/11

Post Permalink
by Hibbsi » 3/6/2011

Scuttles wrote:Damn good find Hibbsi. So in that case, do you know which key words will affect which type of landscape. Also, under those circumstances it is possible to combine said keywords to have a combined world.
Example:
Key word 1 generates a massive amount of mountains
Key word 2 generates beautiful islands
Is it possible to generate a massive amount of mountainous islands or will the total string hash code become irrelevant when combining the two codes?

Side note:
I really like the bUE/asd world. XD

I wish it would work like that, but it doesn't, for various reasons. The first and foremost reason is the fact that you can't "combine" them in the way that I think you are describing. Concatenation would make the string longer, and therefore the hash would be very, very different.

Consider the following: (I quote stuff to make it easier to read)
(as in Java, things in single quotes ('n') are characters, which have an integer value if used in context as a number. If you want to look them up, look here.)

The hash code of the string "foo" is calculated as follows:
Image

As you can see, adding a single character increases the hash code by a constant multiplied by 31 to the length of the new string minus 1, plus or minus the changes caused by shifting the powers to different characters, if the character was not inserted at the beginning of the string. That's a significant change, as printed characters have integer values of 33 to 126.

Also, hash codes are represented as integers. In Java (and many others), an integer value is limited to the range of -(2^31) to 2^31 - 1. If the hash code calculation results in a number above this range, it will overflow and start "counting" from the lower end of the range, which means the hash code can be negative.

Lastly, I assume that the hash code is used to generate a number of parameters that are used to generate the terrain, instead of the hash code used directly in the algorithms. The parameters are most likely generated using algorithms that have results that have different rates of change, meaning that a small change in the hash code could mean irregular, or at least hard to predict until the details of world generation are worked out, changes in the parameters and the terrain.

So, until somebody de-obfuscates the decompiled source (probably not going to happen, as it's illegal to redistribute it...) or somebody takes the time to gather LOTS of statistical data and organizes it in a logical manner, or Notch comes out and says, "Here's how it works!", or I take the time to crawl through the obfuscated source and work it out, world generation is a lottery ;)

EDIT:
I guess I should post a seed, since that's what this thread is supposed to have...

Code: Select all
jfoiwjzdhvkPu

(It's the same exact world as "Glacier", because I found it to have the same hash code 8-))
2011-03-06_02.17.23.png
Image Image Image ImageImageImage
Level 1
New Miner
Posts: 46
Joined: 2/23/11
Location: College :D
Says: i makes teh pluginz
Minecraft: Hibbsi

Post Permalink
by Zaralith » 3/6/2011

I think Notch or Jens explained what the seeds do. I think they have some kind of random number generation used in creating the world, and they seed that random number generator using the hash of the 'seed' that you provide. They said that if you provide no seed that the generator will seed itself with the system time. I am wondering how well their random number generator applies the avalanche affect, in that, if i generated a world with seeds that were 1 off, after hashing, would they be very similar worlds? If that random number sets some parameters before hand and never changes them, the worlds would probably be very different, however, if it generates the terrain based on the random number sequence in a specific way, it might be possible to have one world that can have the area you are in found in another world. That would be awesome.
The god of computing wants a sacrifice, and volunteers are being called for.
Image
User avatar
Super Moderator
Level 53
Grandmaster Programmer
Posts: 2124
Joined: 11/11/10
Location: Kelewan
Says: I do not own Planet Minecraft
Minecraft: Zaralith
mc_server: Zar's Awesome Server

Post Permalink
by Hibbsi » 3/6/2011

Zaralith wrote:I think Notch or Jens explained what the seeds do. I think they have some kind of random number generation used in creating the world, and they seed that random number generator using the hash of the 'seed' that you provide. They said that if you provide no seed that the generator will seed itself with the system time. I am wondering how well their random number generator applies the avalanche affect, in that, if i generated a world with seeds that were 1 off, after hashing, would they be very similar worlds? If that random number sets some parameters before hand and never changes them, the worlds would probably be very different, however, if it generates the terrain based on the random number sequence in a specific way, it might be possible to have one world that can have the area you are in found in another world. That would be awesome.


Yeah, I read that at one point. I knew that this was probably how it worked because of the class defined at java.util.Random has two constructors for an instance of Random. One uses a seed, the other one does not. Actually, the default constructor calls the parameterized constructor with the system time used as the parameter.

From what I've figured, the avalanche effect is quite prevalent.

Changing the seed from '#' (int value of 35) to '$' (int value of 36) is a change of 2.85%, and the worlds are very different.
Changing the seed from "Glacier" (hash code of 1772835215) to "Glacies" (hash code of 1772835216) is a change of 0.0000000564068%, and the worlds are very different as well.

I seems that the propagation of differences between seeds increase rapidly as the generation occurs. That's why I stated earlier that..
The parameters are most likely generated using algorithms that have results that have different rates of change, meaning that a small change in the hash code could mean irregular, or at least hard to predict until the details of world generation are worked out, changes in the parameters and the terrain.

The algorithms might be mutually recursive or nested (though I doubt that nested recursion is implemented, as it is often slow and takes up a LOT of space), so a change of a digit with little significance might change every other calculated parameter from that point onward, in every method called. (think of the propagation of differences for a small change in the parameters used in two methods that call each other until a condition is met)

Another thing is that there are losses in precision with division and overflow, even though the Random constructor uses an input of type long and hash codes are returned as integers. I'm assuming there's some type casting that causes some loss in precision, introducing another element of "randomness".

As far as having the same land formations as other worlds, it might, maybe, possibly, have an outside chance of being somewhere near the region of kinda remotely achievable. There's so many things that have to "line up" for that to happen, like all of the parameters at one point having common non-even prime roots as the other world, or after a few calls of .next(), you end up with the seed of the world that has those features. Even then, though, the methods that use the numbers generated will most likely make any resemblance irrelevant.
Image Image Image ImageImageImage
Level 1
New Miner
Posts: 46
Joined: 2/23/11
Location: College :D
Says: i makes teh pluginz
Minecraft: Hibbsi

PreviousNext

Return to Discussion