Skip to Content
 

Random Acts of Randomness (picking a random object out of random number of objects)

7 replies [Last post]
Grixx
Grixx's picture
Offline
Joined: 11/16/2012

/I did a somewhat extensive search in the older topics about this question but I was unsuccessful, so if you know about a thread that is relevant, please share a link/

Brief version: How do you easily determine a random object out of an arbitrary number of objects (let's say 1-10)?
Longer version: It can not be done easily, but what would be the least difficult way?

The situation is simple:
I have a design that on occasion requires picking a random card from a varying number of cards. The complication is that the cards are placed on a board face up and all the cards will have different number of counters on them most of the time. Unfortunately this removes the only easy option of picking a random card - shuffle and draw.

Given that the number of cards is not constant, a dice roll is tricky to use. Basically the only way to pick a random-ish card without heavy supporting mechanic would be to close your eyes and stick your finger at the board. And this won't do (designer's decision :) ).

It looks like a problem without solution, so I guess my real question is - if you play a game that features a number of cards on the board, what way of determining a random one would annoy/tire you the least?

Grixx
Grixx's picture
Offline
Joined: 11/16/2012
A Possible Solution

/not exactly perfectly working, that's why it's separated from the question/

One (a bit lame) way would be to have a dice, larger than the maximum number of cards that I would have to pick from. Then it's a matter of one or more rolls. Obviously this is not practical. It's like turning the car key several times until it starts, each time you want to start it up (you have 4 options and you roll 5, so you have to roll again).

Option 1
I was thinking about what kinds of semi-randomness I can have, given that I work with cards. The face up cards (the 'pool') are drown from a deck (size: currently undetermined, but let's say 50). If the deck is shuffled (as a general state throughout the game), it itself could be used as a randomization device. So may be each card could have a number on it (1..N) and I could draw a card from the deck and it's number will show me which card I've picked from my pool. At this point there are two problems - first, this is the same situation as with the dice roll, it's just less noisy :) Most importantly, if the pool contains two or more cards with the number X and I draw X from the deck, I still have to determine which of the pool cards with X is the picked one.

Going one step further could give me a kind of solution - each card in the deck has a number (1..N) and a color marker. When the cards are generated/created an effort is made for one number to be connected to one color as few times as possible. For a certain deck size you can even make sure every number/color combination exists only once in the deck.
And if the cards from the pool have any kind of order (first to last in the order they were placed, for example), you can pick the first card of that color that is lower or equal to the number of the draw (or just lower or equal if there is no such color in the pool).

Option 2
The 'monochrome' option would be to have two sets of numbers on the card - "X/Y", X and Y both being from 1 to N. Then you just have to make sure to "mix" the Xs and Ys well, when you combine them on the cards. What you do to determine a random card from the pool is just draw a card from the deck and look for the first occurrence of X OR Y in the pool. Makes sense?

Example:
- X and Y are from 1 to 7;
- In the pool you have (I almost randomly pounded the keyboard, the distribution is not correct, but imagine for a moment that it is):
6/7
4/7
1/5
2/1
3/3
4/2
- You draw a card with 1/6
- The "random" card from the pool is the first (6-7), since it is the first card from the pool that contains 1 OR 6

What do you say?
It's a bit of extra effort, but I think in the second case the number of mis-draws (draw from the deck, no X or Y in the pool) may not be so large.
The obvious drawback is that the last card could never be selected as a 'random' pick, because it has 4 and 2 and if you are looking for a 2 or 4 in the pool you will select either the second or the fourth card.

Any thoughts? This method could be modified and the noise in the system reduced more so may be it can be used somewhere.

P.S. On second thought - that drawback with the 'hidden' card could be employed as a feature. :) I'll try to develop this as a separate mechanic.

Dagar
Offline
Joined: 01/23/2015
Okay, to be honest, I did

Okay, to be honest, I did just skim over your second post. Depending on the maximum possible number of cards lying on the board you could either draw from a card deck that has the card positions as numbers on it. If there are five cards open, you pick one from the cards 1 to 5.

If there is no other way of these open cards to be drawn, I imagine a more elegant option: you fill a bag with chips and lay twins of these to each card. then you just pick a chip from the bag. Advantages: you wouldn't have to shuffle cards at each draw and you could repeat this process as many times as you like.

As I said, I only skimmed over your second post. There was a statement that I think was snot mathematically correct, but since I'm tired and not completely sober right now, I will leave it to others or future me to verify this :D

Soulfinger
Soulfinger's picture
Offline
Joined: 01/06/2015
Dagar wrote:statement that I

Dagar wrote:
statement that I think was snot mathematically correct, but since I'm tired and not completely sober right now,

I am so relieved to know that I'm not the only person who drunk posts here.

Grixx
Grixx's picture
Offline
Joined: 11/16/2012
I'm sorry if the first post

I'm sorry if the first post is not very... coherent and streamlined, but I was coming up with the method more or less while I was writing the post.

However, thanks for the 'bag of chips' suggestion. Although a but clumsy, it actually introduces another group of pieces, who can be used in other parts of the game. Also, drawing chips from a bag has a specific feeling, that may complement a certain type of game in a very good way!

Jenkachu
Offline
Joined: 03/25/2015
You will need a set of

You will need a set of numbered cards, from 1-10.

The slots on the board where the face-up cards are to go are also numbered 1-10.

At setup, put the corresponding numbered card on its slot on the board.

During play, as face-up cards are placed on the board ready to be selected, the associated numbered card can be laid aside, and as more numbered cards are set aside, a deck can be formed.

When a face-up card needs to be selected, simply shuffle the set-aside numbered cards, and select one. This will indicate which face-up card is to be used.

The advantage of this is that the numbered card can then be replaced on the now-empty slot on the board, ready for another face-up card as required, leaving your "shuffling pile" ready to go again.

What do you think?

pelle
pelle's picture
Offline
Joined: 08/11/2008
I like how it is done in Up

I like how it is done in Up Front (and Fields of Fire iirc): All cards at the bottom have a row of random numbers from 1-2, 1-3, 1-4, and so on up to about 1-12 or so. Not perfect uniform distributions, but close enough. When you need a random number 1-n just draw a card.

Grixx
Grixx's picture
Offline
Joined: 11/16/2012
Slots!

This actually never occurred to me! In fact I do have limited (and quite steady) number of slots for the cards throughout the game, so numbering the slots themselves is a nice solution. Thank about that!

Syndicate content


forum | by Dr. Radut