Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Supercompression via Fractal-like Iterative generation  (Read 4306 times)

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Supercompression via Fractal-like Iterative generation
« on: July 11, 2008, 01:44:31 am »

I like teh big words.

It occurred to me that in a way, Toady one has struck on a method of compressing about 20 megabytes of data into 12 ten digit numbers (a 4 Kb text file)- and what's more, utterly losslessly. That is a compression ratio of 5654 to ONE.

That is to say, DF uses the world gen seeds- any seed will produce a world, and all that is needed to re-create that world is the dozen or so digits of the seed.

Now, looking back at the current system, we have a "practically" infinite number of worlds- there is never a need to re-use a world seed. That's not to say that there is no limit to the number of worlds- it's just that that limit is extremely high. Not counting mods, there are 10,000,000,000 worlds. That's enough to give everybody on earth their own world, with plenty to spare. AH! but there are more than that; since each seed can have two different worlds- one with a given name, and one without. Also, each world can be of any of 25 different sizes and shapes. Taken together, there are five hundred billion possible worlds.

Assuming that there are, oh, a thousand DF players world wide, and they have created around a hundred worlds each (both of those being extremely conservative estimates.), there have been 100,000 worlds actually created. Again, these are very conservative, but I believe that that accurately represents the number of fully completed and used worlds.

Using those numbers, we can derive that there is a 1 in five million chance that there has ever, in all the history of the world, been two DF worlds the same.

However, these numbers are only "practically" infinite. If all the people in the world became rabid DF fans overnight and each one generated a hundred worlds to play on, then there would not be enough worlds to go round! Only 75% of the total worlds would be unique.

But there is no need to panic, my friends.

Because, with this newest upcoming release, DF will have so many possible initial configurations- easily in the high billions, as well as enormous number of seeds in the number generator, that there will be enough unique worlds to last for several trillion, trillion, trillion times the population of earth, for all the foreseeable future- Which should give Toady One the time to allow the seed to include annother ten digits.

About (Trillion!)! worlds.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Lucid_Archon

  • Bay Watcher
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #1 on: July 11, 2008, 02:22:09 am »

Your wonderful math managed to be the highlight of my day, but I do have a gripe. Because there is a distinctly finite set of worlds that can be 'compressed' into seeds, it isn't really compression or it at least defeats the spirit of compression. Seeds generate the same thing, but they aren't really compressed sets of those worlds, more like instructions. Only because worlds can't be generated that don't conform to the set of compressible worlds does the illusion of useful compression exist.
Logged

Kagus

  • Bay Watcher
  • Olive oil. Don't you?
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #2 on: July 11, 2008, 03:16:38 am »

You can easily fit a blueprint into a suitcase.  A house is a little more difficult.

Hishan

  • Bay Watcher
  • [ALCOHOL_DEPENDANT]
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #3 on: July 11, 2008, 03:54:22 am »

You can easily fit a blueprint into a suitcase.  A house is a little more difficult.

 I love that, i may steal it and use it in witty conversation. I think what he means though, is that toady has not only put the briefcase in, but also the bricks and mortar. And they can be arranged in any number of ways.

Not to mention people dont live in a house for a day then move out. (people dont just play a world once then abando it)
Logged

Cajoes

  • Bay Watcher
  • "I'm a damn cat."
    • View Profile
    • http://none
Re: Supercompression via Fractal-like Iterative generation
« Reply #4 on: July 11, 2008, 11:47:50 am »

You can easily fit a blueprint into a suitcase.  A house is a little more difficult.
Not to mention people dont live in a house for a day then move out. (people dont just play a world once then abando it)

I do. 8D
Logged
Quote from: Roman Proverb
Do not argue against the sun. For it is a lot brighter than you are.

Zurack

  • Bay Watcher
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #5 on: July 11, 2008, 12:00:01 pm »

Well, It cannot be considered as "compression", because the world is "randomly generated", the world just uses the seed number to start the stuff, then something like a chain reaction happens, the number makes more numbers, then the numbers make even more numbers and so on...

Oh, and remember that with random chances, It's possible that everybody will get the same seed, no matter how much you try! (Ridiculously unlikely, but possible).
Logged
Pay attention to my avatar, see if you can find the secret pattern!

Zemat

  • Bay Watcher
  • Zemat, programmer, cancels coding: Too insane.
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #6 on: July 11, 2008, 12:10:32 pm »

It occurred to me that in a way, Toady one has struck on a method of compressing about 20 megabytes of data into 12 ten digit numbers (a 4 Kb text file)- and what's more, utterly losslessly. That is a compression ratio of 5654 to ONE.

I hope you aren't implying that Toady invented something new, because fractals and generative code as compression techniques are as old as PCs. Several computer games now use fractal like techniques and seeds to generate content. The oldest example I can recall of fractal compression is Strike Commander. When you install the game, all the mission maps, which are fixed and equal for all players, are fractal terrains generated from hardcoded seeds during installation instead of being extracted from the installation files. That's why they are quite complex and detailed yet the installer is still about 12 megs big.

Also, the reason fractals an generative techniques aren't very used for "compression" is because it's very hard to find a seed that has high correlation to a manually generated asset like and image or 3d object. It's easy when you are letting the fractal generation code be creative and do random colorful weird thing for you. But it gets harder the more specific and strict about what you want to see because if their chaotic nature.
« Last Edit: July 11, 2008, 12:17:19 pm by Zemat »
Logged
You too can help bring to life the RogueLife Project!

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #7 on: July 11, 2008, 12:14:25 pm »

Actually, the number of possible worlds NOW is 4294967296*36, with a total of 154618822656, or roughly 155 billion worlds. That is, accounting for world sizes.

Once the new version hits, we will be able to separately enter terrain and civilization seeds. Depending on how long the new seeds are, we might get 155 billion to the power of 155 billion different possible worlds. If you like an exact number, it's 23906980319527578894336, or 24 sextillions (or trilliards, if you so like). I think that's a lot. :)
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Supercompression via Fractal-like Iterative generation
« Reply #8 on: July 11, 2008, 12:15:47 pm »

It occurred to me that in a way, Toady one has struck on a method of compressing about 20 megabytes of data into 12 ten digit numbers (a 4 Kb text file)- and what's more, utterly losslessly. That is a compression ratio of 5654 to ONE.

I hope you aren't implying that Toady invented something new, because fractals and generative code as compression techniques are as old as PCs. Several computer games now use fractal like techniques and seeds to generate content. The oldest example I can recall of fractal compression is Strike Commander. When you install the game, all the mission maps, which are fixed and equal for all players, are fractal terrains generated from hardcoded seeds during installation instead of being extracted from the installation files. That's why they are quite complex and detailed yet the installer is still about 12 megs big.

Oh, of course, of course. I know of several procedurally generated content used in games- Noctis, for instance. It's been a while since I played that.

And Sean- that's true. However, it's even more than that, because of the increased number of world gen configurations- increase sea level by 0.01, and it's a whole new set of unique worlds. Since there will be dozens of parameters and at least a 0-10 scale for each, take that end number and multiply it by something like 24^10.

« Last Edit: July 11, 2008, 12:19:41 pm by PTTG?? »
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Zemat

  • Bay Watcher
  • Zemat, programmer, cancels coding: Too insane.
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #9 on: July 11, 2008, 12:21:12 pm »

Oh, of course, of course. I know of several procedurally generated content used in games- Noctis, for instance. It's been a while since I played that.

Yeah, I liked Noctis too. But it gets repetitive and boring too fast. Too bad development for that game is pretty much dead.
Logged
You too can help bring to life the RogueLife Project!

Zurack

  • Bay Watcher
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #10 on: July 11, 2008, 12:22:36 pm »

It occurred to me that in a way, Toady one has struck on a method of compressing about 20 megabytes of data into 12 ten digit numbers (a 4 Kb text file)- and what's more, utterly losslessly. That is a compression ratio of 5654 to ONE.

I hope you aren't implying that Toady invented something new, because fractals and generative code as compression techniques are as old as PCs. Several computer games now use fractal like techniques and seeds to generate content. The oldest example I can recall of fractal compression is Strike Commander. When you install the game, all the mission maps, which are fixed and equal for all players, are fractal terrains generated from hardcoded seeds during installation instead of being extracted from the installation files. That's why they are quite complex and detailed yet the installer is still about 12 megs big.

Oh, of course, of course. I know of several procedurally generated content used in games- Noctis, for instance. It's been a while since I played that.

Oh my, NOCTIS! You really played Noctis?
Well, I played it too, It's crazy, but I stopped playing after a while...

Oh, there is another thing, the problem with seeds is that they take quite a while to "install" stuff, sometimes slower than downloading it completed (If you have a decent internet, I have dial-up). But I guess what really matter is the content X size, not the loading time. :P
Logged
Pay attention to my avatar, see if you can find the secret pattern!

Doppel

  • Bay Watcher
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #11 on: July 11, 2008, 12:42:37 pm »

Hmm, nice calculations, but a bit misleading. I think there should be a division between what is relatively the same, ie, two worlds that are practically the same excluding some minor (probably never to come across, except when specifically looking for them) differences. The permutations are mindbogling but do not create for a trillion entirely different worlds, just a trillion permutations. (a billion relatively different worlds is already high enough)
Logged
Doppel has been ecstatic lately. He took joy in playing DF lately. He slept on a rough cave keyboard recently.
He is a member of the Dwarf Fortress Forums.
Doppel likes the color Dark Blue, cats for their aloofness and girls for their silky soft brea beards.
He appreciates art and natural beauty.

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Supercompression via Fractal-like Iterative generation
« Reply #12 on: July 11, 2008, 12:59:44 pm »

Hmm, nice calculations, but a bit misleading. I think there should be a division between what is relatively the same, ie, two worlds that are practically the same excluding some minor (probably never to come across, except when specifically looking for them) differences. The permutations are mindbogling but do not create for a trillion entirely different worlds, just a trillion permutations. (a billion relatively different worlds is already high enough)

Any small change to the initial parameters would slightly change the way the world is generated- and the rejection parameters. Since these slight changes build up so rapidly, each world with even a fraction-point less annual temperate, for instance, would be totally different compared to the original.

Oh, and I forgot- there are two seeds now, and if you count the political situation of the world, we need to take Sean's finished multi-trillard number and square it.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Xehon

  • Bay Watcher
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #13 on: July 11, 2008, 01:10:50 pm »

Aren't you forgetting the raws? Small changes to the raws give a whole new set of world. This effectively makes the number of different possible world infinite.
Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Supercompression via Fractal-like Iterative generation
« Reply #14 on: July 11, 2008, 01:29:09 pm »

I think DF 1.0 will have exactly one googol of possible worlds. DF 2.0 will have one googolplex of them. :D
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India
Pages: [1] 2 3