Recommend
3 
 Thumb up
 Hide
37 Posts
1 , 2  Next »   | 

BoardGameGeek» Forums » Board Game Design » Board Game Design

Subject: Unique Number Generator? Mathematics Help Needed. rss

Your Tags: Add tags
Popular Tags: [View All]
Michael M.
United States
Bloomington-Normal
Illinois
flag msg tools
Avatar
mbmbmbmbmb
I am designing a game with a story telling component somewhat similar to the one in Arabian Nights, in the sense that what happens during any given turn will generate a number that you then refer to in a booklet that has a unique passage that corresponds with that number. In my game, the numbers correspond to characters that are present in the play area, each of which has a unique value. For example, take these characters:

Sebastian Seward (6)
Madeline Towers (17)
Jonathan Towers (9)
Bethany Carrington (1)
Hayden Frankel (13)

These numbers are completely arbitrary. Let's sat both Sebastian and Madeline were present in the game during a particular turn, the total value would be (23):

Sebastian Seward (6) + Madeline Towers (17) = Refer to Scenario (23)

What is vitally important for this system to work is that Sebastian and Madeline = 23 and 23 = Sebastian and Madeline ONLY. No other two, three four, or ten characters can add up to 23. For example, if Johnathan, Bethany and Hayden were present during a particular turn, that would also equal (23), which completely breaks the system.

It's easy enough to control for this with only a handful of characters, but I will probably have somewhere around 35 characters, all of which will have a unique number that when added to any number of other characters will produce a unique value.

Does anyone know of a formula/algorithm or online program that can do this? Where I can an input "I need 35 unique values" and generate numbers that will fit perfectly into this system? If there isn't an easy to apply formula, this may take me literally hundreds of hours to test...
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Joe McKinley
United States
San Jose
California
flag msg tools
When I heard the learn’d astronomer; When the proofs, the figures, were ranged in columns before me; When I was shown the charts and the diagrams, to add, divide, and measure them; When I, sitting, heard the astronomer, where he lectured with
badge
much applause in the lecture-room, How soon, unaccountable, I became tired and sick; Till rising and gliding out, I wander’d off by myself, In the mystical moist night-air, and from time to time, Look’d up in perfect silence at the stars. W.W.
Avatar
mbmbmbmbmb
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
262144
524288
1048576
2097152
4194304
8388608
16777216
33554432
67108864
134217728
268435456
536870912
1073741824
2147483648
4294967296
8589934592
17179869184
9 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Steve Wardell
United States
Indianapolis
Indiana
flag msg tools
May 25
badge
I think you ought to know I'm feeling very depressed.
Avatar
mbmbmbmbmb
The Unbeliever wrote:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096...


Exactly what I was about to suggest. Just make them powers of 2, from 2^0 through 2^34. Though with 35 characters, you are going to end up with a very large book.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Chris Nash
United Kingdom
flag msg tools
mbmbmb
An easy way to do it would be to use binary (powers of 2):
1, 2, 4, 8, 16, ...

This generates ALL possible numbers, with only one unique arrangement for each number.

Sadly, 35 characters would involve the highest numbered character having a number of 2 to the power of 34, or 17179869184.
That's a big number!

A better way might be to think of the number of separate chunks of text you would like, and plan the number of cards around that. For example, if you decided to have 64 separate pieces of text, you actually only need 7 cards (surprising, I know, but it's true).
For 128 separate pieces of text, you only need 8 cards.

I'm not sure of a better way, I'm afraid.

Chris

Edit: Man, 3 of us writing about it at exactly the same time! Spooooky!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Allan Morstein
United States
Unspecified
Unspecified
flag msg tools
Avatar
mbmbmbmbmb
The most obvious solution that comes to mind is to use powers of 2:

Sebastian Seward (1)
Madeline Towers (2)
Jonathan Towers (4)
Bethany Carrington (8)
Hayden Frankel (16)

By definition, every combination of these numbers will be a unique number. The downside is that the numbers will get fairly large if your cast expands too much.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Paul DeStefano
United States
Long Island
New York
flag msg tools
designer
badge
It's a Zendrum. www.zendrum.com
Avatar
mbmbmbmbmb
The Unbeliever wrote:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096...


He's saying binary notation.

But with 35 unique characters, you realize your paragraph book will end up several billion paragraphs long for every possible combination, right?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
DigitalMan
United States
flag msg tools
designer
Fretboard Gamer
badge
p/g
Avatar
mbmbmbmbmb
You mention "35 characters" as an idea for the total count, and you imply that "ten characters" might be a possible simultaneous group.

I believe that's around 183 million possible unique combinations of characters. Even if you can get 100 scenarios on a page, that's still 1.8 million pages of scenarios. Unless I'm misunderstanding what you mean by "scenario", I don't see this is even practical.

To answer your question, though... you could use a product of primes strategy. Assign every character a prime number:

Sebastian Seward (2)
Madeline Towers (3)
Jonathan Towers (5)
Bethany Carrington (7)
Hayden Frankel (11)

When you multiply any group of primes, you'll get a unique number (but it can very quickly get very, very large). The 35th prime number is 149... so if character #35 went on a scenario with the 5 characters above, we'd have 2x3x5x7x11x149 = Scenario #344190.

If just the 5 characters #31-#35 went on a scenario, it'd be: 127x131x137x139x149, or 47205940259 (47 billion).




3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Allan Morstein
United States
Unspecified
Unspecified
flag msg tools
Avatar
mbmbmbmbmb
As an aside, do you realize that if all 35 characters interact with each other character in a unique way, then you'll need 595 scenarios?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Joe McKinley
United States
San Jose
California
flag msg tools
When I heard the learn’d astronomer; When the proofs, the figures, were ranged in columns before me; When I was shown the charts and the diagrams, to add, divide, and measure them; When I, sitting, heard the astronomer, where he lectured with
badge
much applause in the lecture-room, How soon, unaccountable, I became tired and sick; Till rising and gliding out, I wander’d off by myself, In the mystical moist night-air, and from time to time, Look’d up in perfect silence at the stars. W.W.
Avatar
mbmbmbmbmb
If the interaction of every distinct group of 35 characters is each unique, you will need 34359738367 unique paragraphs per scenario.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ron Parker
United States
Fort Wayne
Indiana
flag msg tools
Avatar
mbmbmbmbmb
Unless I'm missing something, there are 2^35 different possible combinations of people in a given room. You said "no other two, three, four, or ten characters" but it's not clear whether you're saying that the maximum number of characters that can be in play is 10, or whether that's just an example.

If you could have all 35 characters in play, you're looking at somewhere in the neighborhood of 34 billion different combinations. Limiting it to no more than 10 characters at a time doesn't help much; there are still more than 300 million different combinations possible. (Assuming I did the math correctly, which is a big assumption.)

That's going to be a really, really big booklet.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Steve Wardell
United States
Indianapolis
Indiana
flag msg tools
May 25
badge
I think you ought to know I'm feeling very depressed.
Avatar
mbmbmbmbmb
The Unbeliever wrote:
If the interaction of every distinct group of 35 characters is each unique, you will need 34359738367 unique paragraphs per scenario.


If you can also have no characters, that's 34,359,738,368. Talk about replayability!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ron Parker
United States
Fort Wayne
Indiana
flag msg tools
Avatar
mbmbmbmbmb
DigitalMan wrote:
I believe that's around 183 million possible unique combinations of characters.


I thought that too. Then I realized that it's really

35c10 + 35c9 + 35c8 + ... + 35c2

which is significantly bigger.

(Edit: assuming no one-player games. Add 35 if that assumption is incorrect.)
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Joe McKinley
United States
San Jose
California
flag msg tools
When I heard the learn’d astronomer; When the proofs, the figures, were ranged in columns before me; When I was shown the charts and the diagrams, to add, divide, and measure them; When I, sitting, heard the astronomer, where he lectured with
badge
much applause in the lecture-room, How soon, unaccountable, I became tired and sick; Till rising and gliding out, I wander’d off by myself, In the mystical moist night-air, and from time to time, Look’d up in perfect silence at the stars. W.W.
Avatar
mbmbmbmbmb
parkrrrr wrote:
DigitalMan wrote:
I believe that's around 183 million possible unique combinations of characters.


I thought that too. Then I realized that it's really

35c10 + 35c9 + 35c8 + ... + 35c2

which is significantly bigger.


Its only 286,454,523
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ron Parker
United States
Fort Wayne
Indiana
flag msg tools
Avatar
mbmbmbmbmb
The Unbeliever wrote:
parkrrrr wrote:
DigitalMan wrote:
I believe that's around 183 million possible unique combinations of characters.


I thought that too. Then I realized that it's really

35c10 + 35c9 + 35c8 + ... + 35c2

which is significantly bigger.


Its only 286,454,523


What's a hundred million between friends, eh? (Though my rough guess in the previous post of more than 300 million was clearly off by a bit.)
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
DigitalMan
United States
flag msg tools
designer
Fretboard Gamer
badge
p/g
Avatar
mbmbmbmbmb
parkrrrr wrote:
DigitalMan wrote:
I believe that's around 183 million possible unique combinations of characters.


I thought that too. Then I realized that it's really

35c10 + 35c9 + 35c8 + ... + 35c2

which is significantly bigger.


You're absolutely right.

Of course, that just means we're trying to find a needle in a stack of haystacks instead of just a needle in a haystack.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Steve Wardell
United States
Indianapolis
Indiana
flag msg tools
May 25
badge
I think you ought to know I'm feeling very depressed.
Avatar
mbmbmbmbmb
With 34359738368 paragraphs, and 100 paragraphs per page, double-sided, and using copy paper with a thickness of 0.004 inches, the book will be less than 11 miles thick.
6 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Joe McKinley
United States
San Jose
California
flag msg tools
When I heard the learn’d astronomer; When the proofs, the figures, were ranged in columns before me; When I was shown the charts and the diagrams, to add, divide, and measure them; When I, sitting, heard the astronomer, where he lectured with
badge
much applause in the lecture-room, How soon, unaccountable, I became tired and sick; Till rising and gliding out, I wander’d off by myself, In the mystical moist night-air, and from time to time, Look’d up in perfect silence at the stars. W.W.
Avatar
mbmbmbmbmb
If you limit it to a maximum of 3 of 35 characters being involved in a given scenario, then you only need to write 7,175 different paragraphs per scenario.

If you limit it to a maximum of 3 of 10 characters being involved in a given scenario, then you only need to write 175 different paragraphs per scenario.

If you limit it to a maximum of 3 of 6 characters being involved in a given scenario, then you only need to write 41 different paragraphs per scenario.

If you limit it to a maximum of 6 of 6 characters being involved in a given scenario, then you only need to write 63 different paragraphs per scenario. And their character numbers are a convenient 1, 2, 4, 8, 16, and 32.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael Aldridge
United States
Nashville
Tennessee
flag msg tools
designer
publisher
Infinite Dreams Gaming
badge
Warehouse 13: The Board Game
Avatar
mbmbmbmbmb
Khedron wrote:
With 34359738368 paragraphs, and 100 paragraphs per page, double-sided, and using copy paper with a thickness of 0.004 inches, the book will be less than 11 miles thick.


Gotta make sure I order enough to get free shipping!
5 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Xavier Raabe
United States
flag msg tools
If you limit it to being a roleplaying game, you will only need to write 1 paragraph per scenario. Talk about efficiency!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael M.
United States
Bloomington-Normal
Illinois
flag msg tools
Avatar
mbmbmbmbmb
See, this is why I needed to pay attention in math class! thanks for all the quick responses, but HOLY ****ING ****!!! I was naive enough not to expect such a giant number. Jeez. Clearly, I have to find a way to lower this number. I like the idea of "chunks of text," but is there anything else that can be done?

Just to help come up with solutions, let me explain a few things about the game:

Each player starts the game with 1 randomly selected Steward (a unique character) and 1 Aristocrat (a unique character). All Stewards and Aristocrats are unique characters that would have a value ascribed to them as listed above. During the course of the game, the player may gain new Stewards and new Aristocrats. There are a total of 3 Stewards (including the starting one) and 5 Aristocrats (including the starting one) per player. There can only be one Steward at a time, however in theory all 5 Aristocrats may be in play at once. So, at any point during the game, a players "play area" (or whatever you want to call it) can look something like this:

Steward 1 OR Steward 2 OR Steward 3 PLUS One, All, or Any Combination of Aristocrat 1, Aristocrat 2, Aristocrat 3, Aristocrat 4, or Aristocrat 5.

Since every player can do this, and the game is meant to support 2-5 players, each player adds whatever their total value ended up being to those of the other players. That total number, in the current conception of the game, will refer to a scenario that involves every one of those characters and only those characters. Its also important to keep in mind that the Stewards and Aristocrats for each player are unique to that player. So, it's not as if all five players would be sharing the five aristocrats... if there were five players then there would be a potential of 25 Aristocrats (divided among 5 players) with 1 Steward each from a potential 15 Stewards (divided among 5 players).

So... yeah.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
W Scott Grant
United States
Indiana
flag msg tools
designer
mbmbmbmbmb
34 billion possibilities...Yeah.

I think you should look at the Lost Worlds series and how the mechanic works for player-versus-player combat using character books:http://www.boardgamegeek.com/boardgame/1421/lost-worlds

Essentially, this game uses a straightforward mathematical algorithm that is essentially two dimensional grid. The two books interact with a common grid to determine one of many possible outcomes. The grid is hidden from the player, but with time and study, one could theoretically recreate it.

I'm not sure exactly what you're trying to accomplish, but this might put you on a better path.


 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Hawaka Winada
United States
Stornhelm
Rivenspire
flag msg tools
badge
Avatar
M_Strauss wrote:


Sebastian Seward (6) + Madeline Towers (17) = Refer to Scenario (23)

Instead of looking for scenario 23, why not look for scenario (6,17)? You can still place the scenarios in numerical order: (6,17) is followed by (6,18), etc so they'd be easy to look up, and there's no problem of duplicating the entry if you always list the lower character number first.
All the other poster's comments about a gazillion scenarios still apply, you may want to lower the number of characters interacting with one another.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jordan Booth
United States
Chicago
Illinois
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
If you could make do with only 3 aristocrats maximum, that would get rid of 10 characters. I think this reduces the combinations by a factor of roughly 1,000.

Perhaps you could have separate tables for Stewards and Aristocrats. So first the players compare their Stewards to find the general scenario sheet, and then the aristocrat values on that sheet would give details for the outcome. I didn't do the math, so I'm not sure if that really helps any.

You can also consolidate outcomes by having multiple numerical outputs point to the same outcome. For instance if you know that any group that contains the Aristocrat "Argleblast" will always produce the same effect then there is no reason to write that outcome more than once.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Joe McKinley
United States
San Jose
California
flag msg tools
When I heard the learn’d astronomer; When the proofs, the figures, were ranged in columns before me; When I was shown the charts and the diagrams, to add, divide, and measure them; When I, sitting, heard the astronomer, where he lectured with
badge
much applause in the lecture-room, How soon, unaccountable, I became tired and sick; Till rising and gliding out, I wander’d off by myself, In the mystical moist night-air, and from time to time, Look’d up in perfect silence at the stars. W.W.
Avatar
mbmbmbmbmb
M_Strauss wrote:
See, this is why I needed to pay attention in math class! thanks for all the quick responses, but HOLY ****ING ****!!! I was naive enough not to expect such a giant number. Jeez. Clearly, I have to find a way to lower this number. I like the idea of "chunks of text," but is there anything else that can be done?

Just to help come up with solutions, let me explain a few things about the game:

Each player starts the game with 1 randomly selected Steward (a unique character) and 1 Aristocrat (a unique character). All Stewards and Aristocrats are unique characters that would have a value ascribed to them as listed above. During the course of the game, the player may gain new Stewards and new Aristocrats. There are a total of 3 Stewards (including the starting one) and 5 Aristocrats (including the starting one) per player. There can only be one Steward at a time, however in theory all 5 Aristocrats may be in play at once. So, at any point during the game, a players "play area" (or whatever you want to call it) can look something like this:

Steward 1 OR Steward 2 OR Steward 3 PLUS One, All, or Any Combination of Aristocrat 1, Aristocrat 2, Aristocrat 3, Aristocrat 4, or Aristocrat 5.

Since every player can do this, and the game is meant to support 2-5 players, each player adds whatever their total value ended up being to those of the other players. That total number, in the current conception of the game, will refer to a scenario that involves every one of those characters and only those characters. Its also important to keep in mind that the Stewards and Aristocrats for each player are unique to that player. So, it's not as if all five players would be sharing the five aristocrats... if there were five players then there would be a potential of 25 Aristocrats (divided among 5 players) with 1 Steward each from a potential 15 Stewards (divided among 5 players).

So... yeah.


Each player always has exactly one of 15 unique Stewards present, and each players has 1-5 of 25 unique Aristocrats present?

In that case, for a 5 player game, you would need over 100 trillion "scenarios".

15c5*(25c25+25c24+25c23+...+25c7+25c6+25c5)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Joe McKinley
United States
San Jose
California
flag msg tools
When I heard the learn’d astronomer; When the proofs, the figures, were ranged in columns before me; When I was shown the charts and the diagrams, to add, divide, and measure them; When I, sitting, heard the astronomer, where he lectured with
badge
much applause in the lecture-room, How soon, unaccountable, I became tired and sick; Till rising and gliding out, I wander’d off by myself, In the mystical moist night-air, and from time to time, Look’d up in perfect silence at the stars. W.W.
Avatar
mbmbmbmbmb
The only way we can help trim this down is if you give us some idea about how scenarios differ from one another based on the participants.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
1 , 2  Next »   | 
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.