Results 1 to 28 of 28
-
2010-09-28, 02:17 PM (ISO 8601)
- Join Date
- Oct 2008
Calling all math nerds: How to Determine Arbitrary Random Numbers?
Assuming that I want to represent a random number at the table that sits between 1 and an arbitrary upper bound, inclusively, what is the best way to do it that doesn't involve a computer or calculator?
I don't think that dice will cut it, because I can't think of any combination of dice that could be used to represent 1 in 37 or 1 in 19 chance.
Does anyone have any good ideas?
-
2010-09-28, 02:21 PM (ISO 8601)
- Join Date
- Jul 2010
- Location
- Kitchener/Waterloo
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Cards are a decent way. So it rolling a d% or several and just re-rolling when you get too high.
Lord Raziere herd I like Blasphemy, so Urpriest Exalted as a Malefactor
Meet My Monstrous Guide to Monsters. Everything you absolutely need to know about Monsters and never thought you needed to ask.
Trophy!
-
2010-09-28, 02:26 PM (ISO 8601)
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
The simplest way would, of course, be a computer.
For low enough numbers (like 19), roll the next highest-sized die, ignoring out-of-range results. (E.g., roll 1d20, ignoring any 20s.)
Failing that, I would roll Nd10, with N being log10 of your target number, rounded up; reading the dice similarly to percentile dice. This is the same as above, really, just using an arbitrary decimal bound instead of normal d%. Take 10N divided by your target number, rounded down. Divide your die roll result by this to get your random value. If the result is out of range, re-roll.
Example:
Target = 37
N = 2
102 / 37 = 2
{table]Die Roll|Random Result
01 | 1
14 | 7
50 | 25
74 | 37
75+ | re-roll, ignoring results > 74[/table]Last edited by Duke of URL; 2010-09-28 at 02:31 PM.
-
2010-09-28, 02:27 PM (ISO 8601)
- Join Date
- Jun 2006
- Location
- Fairfield, CA
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Wiki - Q&A - FB - LIn - Tw
d20r Compilation PDF - last updated 9.11.14
d20r: Spells (I-L) - d20r: Spells (H) - d20r: Spells (G) - d20r: Spells (F) - d20r: Spells (E) - d20r: Spells (D) - d20r: Wizard class
-
2010-09-28, 02:28 PM (ISO 8601)
- Join Date
- Jan 2009
- Location
- Iceland
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Numbered cards, say from 1-100 (or however many you need). Keep them ordered, and when one of those stupid 1-in-prime-number-above-3 chances comes up, take out as many as you need, shuffle, and draw.
Have someone re-order them while they are waiting their turn in combat.Last edited by Ernir; 2010-09-28 at 02:28 PM.
Halfling healer avatar by Akrim.elf.
My sarcasm is never blue.
Personal stuff: The Diablo 2 game (DMing), BBCode syntax highlighter for KDE
CharOp: Lists of Necessary Magic Items
Homebrew: My proudest achievement, a translation of vancian spellcasting to psionic mechanics. Other brew can be found in my Homebrewer's Extended Signature.
-
2010-09-28, 02:28 PM (ISO 8601)
- Join Date
- Mar 2008
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
You need geometry and dice manufacturing nerds, not math nerds. That said, with the standard D&D dice (multiple d4s, d6s, d8s, d10s + percentiles, d12s and d20s), I usually do the following if I need to roll XY, where X is the tens digit and Y is the ones digit.
I take a bright colored dA, where A is as close to X as possible while A>X, and use it to represent my tens digit. If the dA rolls above X, I re-roll it.
Then I take a different bright-colored dB, where B is as close to Y as possible while B>Y, and use it to represent my ones digit. If the dB rolls above Y, I re-roll it.Originally Posted by The Giant
-
2010-09-28, 02:33 PM (ISO 8601)
- Join Date
- Aug 2007
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
1 in 37: 1d4 for first digit, 4 => 0. 1d10 for second digit. Re-roll on 38 and 39 (5% chance of reroll)
1 in 19: 1d20, re-roll 20. 5% chance of re-roll.
General: It may help to get dice numbered starting at 0. Round up whatever you want, pick the right dice (usually including 1 or more d10s), then re-roll if the answer is invalid.So you never have to interrupt a game to look up a rule again:
My 3.5e Rules Cheat Sheets: Normal, With Consolidated Skill System
TOGC's 3.5e Spell/etc Cards: rpgnow / drivethru rpg
Utilities: Magic Item Shop Generator (Req. MS Excel), Balanced Low Magic Item System
Printable Cardstock Dungeon Tiles and other terrain stuff (100 MB)
-
2010-09-28, 02:37 PM (ISO 8601)
- Join Date
- Sep 2007
- Location
- Earth... sort of.
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Avatar by K penguin. Sash by Damned1rishman.
MOVIE NIGHTS AND LETS PLAYS LIVESTREAMED
-
2010-09-28, 02:40 PM (ISO 8601)
- Join Date
- Jul 2009
- Location
- In the T.A.R.D.I.S.
- Gender
-
2010-09-28, 02:43 PM (ISO 8601)
- Join Date
- Jun 2007
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Last edited by Kurald Galain; 2010-09-28 at 02:47 PM.
Guide to the Magus, the Pathfinder Gish class.
"I would really like to see a game made by Obryn, Kurald Galain, and Knaight from these forums. I'm not joking one bit. I would buy the hell out of that." -- ChubbyRain
Crystal Shard Studios - Freeware games designed by Kurald and others!
-
2010-09-28, 02:57 PM (ISO 8601)
- Join Date
- Oct 2008
-
2010-09-28, 02:59 PM (ISO 8601)
- Join Date
- Jun 2009
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
The general method: generate a large random number (say, 5d10 read as a value from 0 to 99999), divide by 37 (or whatever), and use the remainder. That won't give a perfectly even distribution, but then neither do physical dice (cue Lou Zocchi spiel here). Of course, I guess some people would find that hard without a calculator.
In many cases, you can also roll a slightly higher number that's more convenient, and re-roll if the result is too high. E.g., for d37, roll d4 and d10 to get a value from 0 to 39, then reroll if that's out of range.Last edited by Skorj; 2010-09-28 at 03:00 PM.
-
2010-09-28, 03:02 PM (ISO 8601)
- Join Date
- Sep 2008
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Some wargames use "chits" -- similar to the card idea, but much smaller (typically a die-cut playing piece with a number or code on it describing the result). It actually works pretty well, and is great if you want to generate several random numbers with no duplicates.
-
2010-09-28, 03:08 PM (ISO 8601)
- Join Date
- Feb 2006
- Location
- Seattle, WA
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Yea, if a calculator was allowed, I wrote a script for my TI-83 that uses the RANDINT function and a simple while loop to roll XdY dice, where X and Y were any positive interger.
With small odd numbers, its pretty easy. As someone said, just roll the next larger die size and reroll any numbers higher than your target. This is the easiest way to arbitrate Mirror Images. You have a 1 in X chance of hitting the real wizard, where X is the number of images plus one. If there are 7 images, thats a 1 in 8 chance, or 1d8 (hit on a 1). If one image gets popped, you now have 6 images, for a 1 in 7 chance. Thats just 1d8, rerolling 8s, and hitting the wizard on a 1.
Simple simple. You might have to roll a LOT for numbers that are just above the threshold, given standard probability distributions (like rolling a d31 with a percentile), but you'll eventually get there and its about as unbiased as you can physically get unless you fix the dice.
-
2010-09-28, 03:09 PM (ISO 8601)
- Join Date
- Jan 2009
- Location
- Georgia + Inner World
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
http://www.random.org/integers/
If you have internet at the table that's useful.
Edit: Re-read and no computers... Drat.Last edited by The Mentalist; 2010-09-28 at 11:09 PM.
Having trouble writing up hard stat blocks but I'm doing a lot of sharing ideas and soft mechanics lately.
-
2010-09-28, 10:29 PM (ISO 8601)
- Join Date
- Sep 2010
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
You desire a random integer from 1 to K.
Choose a larger upper bound N that you can simulate (for example a d20 and a d100 for 2000).
Also figure out the largest multiple of K which is less or equal to N. Call it M.
Draw X from 1 to N. If X<=M, you're done. If X>M, redraw X, and repeat.Last edited by ffone; 2010-09-28 at 10:30 PM.
-
2010-09-28, 10:52 PM (ISO 8601)
- Join Date
- May 2005
- Location
- Somerville, MA
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
I vote for rolling something above what's needed and rerolling if you go over. It's usually quicker than dividing.
Modular arithmetic can work too, but I've only seen it for low values. It still works higher up. Let's say you need 1d31. Roll 1d100 (or 2d10 as the case may be). If your value is above 31, subtract 31 and check again. Then repeat. You'll have to drop any values above 93 though (since there are 3 complete 31s in 1-100) or your roll will favor 1-7 as they can appear a 4th time each.
I'm still not sure when you'd ever need 1d31 though.If you like what I have to say, please check out my GMing Blog where I discuss writing and roleplaying in greater depth.
-
2010-09-28, 11:18 PM (ISO 8601)
- Join Date
- Feb 2005
- Location
- Western Australia
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Lots of people are suggesting numbered cards. This would seem to me to be completely missing the part where you need an arbitrary upper bound. Say you need a random number on [1,1000] -- what, you have 1000 cards? And then what about smaller numbers? Draw from the 1000-card deck and discard invalid results? Divide to get close to the valid range?
This has all been suggested for dice, which are much less unwieldly. Duke of URL got the simplest solution(s) in one go. To recap without the reference to logs and exponents: If it fits within a nice easy bound like [1,20], roll the d20 and drop out-of-bound rolls. Otherwise:
- Pick the nice round decimal number, like 100 or 1000 or 10000, that fits your desired range inside it.
- Roll enough d10s to get that range -- two for 100, three for 1000, and so on.
- If your upper bound is more than half the size of this nice round decimal number (e.g. [1,87] simulated with d100), just discard any rolls that are out of range.*
- If not -- that is, if your upper bound would go into the nice round decimal number two, or three, or however many times -- divide by that number. [1,31] would go into d100 three times, so we divide by three and discard any result of 32 or 33.
* This might get inconvenient with using d1000 to simulate [1,501], but hey, if you don't want to use a computer, then "inconvenient" is pretty much the name of the game.
EricGrau and ffone pretty much suggested the same thing, with the minor added complication/convenience of not being restricted to round decimal values. A few other people had very similar variations.
(Edited to add: Valadil's method with modular arithmetic, or subtraction instead of division, is probably the easiest of all. Same system, no division.)
You have a d150?
Geometry ⊂ maths. And I'm not sure how dice manufacture would help, except inasmuch as dice manufacturers are geometry/maths nerds.Last edited by Peregrine; 2010-09-28 at 11:20 PM.
I support paladins and the alignment system.
My Homebrew Gaming Stuff (not updated lately) - My Campaign (ended)
Homebrew licence:
SpoilerAll my homebrew stuff is released under the Open Game License, except where based on non-OGC work or otherwise stated. For Section 15:
<name of homebrew here> Copyright <year first posted>, T. Pederick
-
2010-09-29, 08:35 AM (ISO 8601)
- Join Date
- Jun 2006
- Location
- Fairfield, CA
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Wiki - Q&A - FB - LIn - Tw
d20r Compilation PDF - last updated 9.11.14
d20r: Spells (I-L) - d20r: Spells (H) - d20r: Spells (G) - d20r: Spells (F) - d20r: Spells (E) - d20r: Spells (D) - d20r: Wizard class
-
2010-09-29, 08:39 AM (ISO 8601)
- Join Date
- Jul 2009
- Location
- In the T.A.R.D.I.S.
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Originally Posted by The Doctor
-
2010-09-29, 08:48 AM (ISO 8601)
- Join Date
- Jun 2007
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Guide to the Magus, the Pathfinder Gish class.
"I would really like to see a game made by Obryn, Kurald Galain, and Knaight from these forums. I'm not joking one bit. I would buy the hell out of that." -- ChubbyRain
Crystal Shard Studios - Freeware games designed by Kurald and others!
-
2010-09-29, 08:54 AM (ISO 8601)
- Join Date
- Aug 2009
- Location
- Maryland
- Gender
-
2010-09-29, 08:56 AM (ISO 8601)
- Join Date
- Oct 2008
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
-
2010-09-29, 10:30 AM (ISO 8601)
- Join Date
- Jun 2009
- Gender
-
2010-09-29, 10:35 AM (ISO 8601)
- Join Date
- Jul 2009
- Location
- In the T.A.R.D.I.S.
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Have you even considered numbered scraps of paper in a hat?
Originally Posted by The Doctor
-
2010-09-29, 11:32 AM (ISO 8601)
- Join Date
- Aug 2009
- Location
- Maryland
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
If you need numbers between 1 and 7,000,000,000,001, I would honestly suggest that perhaps your gaming system has too fine-grained detail.
However, if you just want the number, grab some D100s. You'll need six of them and a D10. Roll in order to determine the digits, since you essentially have a D 10,000,000,000,000. About 3/10ths of the time, you'll have to reroll the first die(no need to reroll the rest). No biggie.
-
2010-09-29, 11:40 AM (ISO 8601)
- Join Date
- Jul 2009
- Location
- In the T.A.R.D.I.S.
- Gender
-
2010-09-29, 11:44 AM (ISO 8601)
- Join Date
- Sep 2006
- Location
- R'lyeh
- Gender
Re: Calling all math nerds: How to Determine Arbitrary Random Numbers?
Browsers should run this fine:
Code:javascript: alert(Math.floor(Math.random()*1000000000000));