Bay 12 Games Forum

Please login or register.

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

Author Topic: Alphanumeric Seeds  (Read 1614 times)

Neonivek

  • Bay Watcher
    • View Profile
Alphanumeric Seeds
« on: July 11, 2008, 02:14:21 am »

So I was trying to make a seed and I put in my name... Learning that it doesn't take letters I transformed my name into a sequence of numbers 11422914 and was happy to behold a totally weird world covered in Snow with little water... where the absolute top was practically Lava (it also had a large number of Volcano)

So even though uttarly pointless in everyway shape or form other then being a cool gimic

Id like it if the Seed could take Letters as well... either by making the seed Alphanumberic (so 0-9-A-Z) or by having it secretly behind the scenes convert your letters into numbers.

*Runs and hides*
Logged

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: Alphanumeric Seeds
« Reply #1 on: July 11, 2008, 02:41:58 am »

While not really useful in any way, this is a tiny tweak that wouldn't be bad at all to throw in sometime.   Unless there's some issue I'm not foreseeing.
Logged

Goran

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #2 on: July 11, 2008, 09:18:58 am »

Do it yourself. $p34|< 1337.
Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Alphanumeric Seeds
« Reply #3 on: July 11, 2008, 11:55:27 am »

Actually, the world seed takes any number up to 2^32. That's around 4.3 billion. If you take alphanumerics, that's 36 symbols, 26 letters + 10 numbers. The closest number not above the limit is 36^6, and that's around 2.2 billion. If you rig a program to split a 12-letter string into two 6-letter strings, and add the two results together, you end up slightly (by almost a hundred million) above the limit if your string ends with Z's. In other words, you can make a simple converter program to convert an alphanumeric string into a normal numeric string. It would, of course, be easier if the game allowed such things by itself.
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

Omega2

  • Bay Watcher
  • Too productive for his own good
    • View Profile
Re: Alphanumeric Seeds
« Reply #4 on: July 11, 2008, 01:10:07 pm »

Actually, the world seed takes any number up to 2^32. That's around 4.3 billion. If you take alphanumerics, that's 36 symbols, 26 letters + 10 numbers. The closest number not above the limit is 36^6, and that's around 2.2 billion. If you rig a program to split a 12-letter string into two 6-letter strings, and add the two results together, you end up slightly (by almost a hundred million) above the limit if your string ends with Z's. In other words, you can make a simple converter program to convert an alphanumeric string into a normal numeric string. It would, of course, be easier if the game allowed such things by itself.
Wouldn't it then be a matter of embedding that program in the game?
Logged
Fire in the disco! Fire in the disco! Fire in the dining hall!

Draco18s

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #5 on: July 11, 2008, 01:10:32 pm »

*Cough*
62 characters if you allow UPpEr and loWer CaSE.
And about 94 if you use every symbol on a standard keyboard.


Not that doing that helps.  At that point you'd convert the symbol into it's hexadecimal representation, then convert to decimal.  Which if maintaining the limits of DF, you'd get 700 million (62^5) and 78 million (94^4) results.
Logged

Joseph Miles

  • Bay Watcher
  • DF isn't a game, its a way of life!
    • View Profile
    • http://bugger92.proboards91.com/
Re: Alphanumeric Seeds
« Reply #6 on: July 11, 2008, 01:17:47 pm »

I don't really see much of a point in adding letters to seeds at all.
Logged
Cog - He's the new Urist.
Yes they are a bunch of drunken unstable retards, but they're MY drunken unstable retards, and I will take care of them.
It could be worse, that cat could be alive.

ArchMageOmega

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #7 on: July 11, 2008, 01:35:58 pm »

There's no need to restrict it to just the number of characters that fits the existing limits. Instead, you simply wrap any excess around the ends. Still, there are standard ways to do this, so it'd be easiest to just find some free code to do string hashing.
Logged

Align

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #8 on: July 11, 2008, 01:42:13 pm »

I don't know what language DF is in, but surely a type conversion is very easily done in this case?
Logged
My stray dogs often chase fire imps back into the magma pipe and then continue fighting while burning and drowning in the lava. Truly their loyalty knows no bounds, but perhaps it should.

Neonivek

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #9 on: July 11, 2008, 07:05:12 pm »

"I don't really see much of a point in adding letters to seeds at all"

for the most part... Letters are more personal then numbers...

I guess you could put your phone number, address, or age... However letter have
-Your name
-Your Girlfriend's name (The Planet of your Girlfriend)
-Your Friend's name
-The name of your favorite movie / Game / Book
-Your country / Town / State / Province / Territory
Logged

Yourself

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #10 on: July 12, 2008, 12:37:33 am »

Introducing letters, however, essentially destroys the uniqueness of a seed.  If you allow an alphanumeric string as an input and then run it through some kind of hashing function to yield a 32-bit value, it's possible for two completely different inputs to produce the same world.

Not that this is a technical problem or anything; it's just a little counter-intuitive. 
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #11 on: July 12, 2008, 07:04:35 am »

But what are the chances that you would stumble upon two of the exact same seeds knowing that there are already over a billion combinations?
Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Alphanumeric Seeds
« Reply #12 on: July 12, 2008, 10:58:39 am »

You will never ever get two identical seeds if you treat the string as a number in base 36, or however many symbols you want to allow.

It's basically just the matter of Toady choosing a specific limit for the generator. If the seed wasn't limited to four bytes (8x4=32bits, 2^32), alphanumeric seeds of some 6-8 length would be possible.
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

Keldor

  • Bay Watcher
  • Blood for the blood god!
    • View Profile
Re: Alphanumeric Seeds
« Reply #13 on: July 12, 2008, 11:43:55 pm »

There's actually an interesting ramification that you're missing.  Allowing letters in seeds will reduce the number of digits needed to represent a given number.  Simply adding in (non-case sensitive, for simplicities sake) letters will allow a 10 digit number to be represented in merely 7 digits!  A 9 digit number would only take 6 digits!  The use for this is simple - which seed is easier to remember - 386521925, or D7GNPX?
« Last Edit: July 13, 2008, 12:01:31 am by Keldor »
Logged
If ignorance is bliss, why are my dwarves all tantruming?

Calessa Lynn Orphiel

  • Bay Watcher
    • View Profile
Re: Alphanumeric Seeds
« Reply #14 on: July 13, 2008, 12:34:09 am »

I wouldn't bother to memorize a seed.  I'd write it down.
Logged
Pages: [1] 2