Wednesday, December 28, 2005

Operators - The dice game for geeks

A friend of mine and me had some time to kill at a cabin trip some time ago. As we got tired of Yatzy we started inventing our own game. All we had was the Yatzy dice and a deck of cards, so that's what the game was based on.

The basics

What you need to play Operators is five dice and a deck of cards. The basics of the game are to flip a card, toss the five dice, and then find a way to calculate the value on the card from the numbers on the dice. Like, if your card shows a 7, and your dice shows 1, 6, 2, 5, and 1 then you can combine them like this:
6 + 5 - 2 - 1 - 1 = 7
All the dice must be used in the solution. In this solution there are two mathematical operators in use: + and -. If you wanted to use more operators you could find a more intricate solution:
6 / 2 + 5 - 1 * 1 = 7
This one uses four different operators.
The fun part starts when you introduce more operators to the game, especially binary operators. How about this solution?
6 SHL ((2 SHR 1) AND 1) - 5 = 7
The operators

The operators we first started to use were the normal mathematical operators, +, -, * and /. These should be familiar to all geeks. If they aren't to you then I'm afraid this game is not your cup of tea. A rule of the game is that only operations that give whole-numbered results are allowed. Operations resulting in fractions can not be used. I.e 2 / 5 is not valid.

After a while we started adding more advanced math operators. These are SQR (square), SQRT (square root), POW (power), and MOD (modulo). It was at this point we started losing players. Remember that the rule of whole numbers still apply, so SQRT(8) is not allowed.

At some point we started using also binary operators, which include AND, OR, XOR, SHL (shift left), SHR (shift right), ROL (rotate left), ROR (rotate right) and NOT. For the operators that rely on a given number of bits, namely NOT, ROL and ROR, the number of bits is set to 8. This means that NOT 1 = 254 and that 1 ROR 1 = 128. These operators can't be used on numbers larger than 255. - Now we were getting to play alone.

Tip: When using binary operators, you can visualize by counting on your fingers.

We also tried out some other operators that we decided to disallow in the game. They made it too easy. Most notable is string-concatenation (&) as in 1 & 2 = 12.

How to play

1. Puzzle

A simple way to play is to just try and find a solution. This is like a puzzle more than a game. Just toss the dice and to try and find a correct solution. Sometimes it's easy, other times it's impossible. This way of playing is good practice and a good brain-teaser.

2. Points

A more competitive game is to count points from the solutions. Play like the puzzle, but when the solution is found you calculate a score of points from it. There can be many ways to count points. One way can be to give a certain number of points just for finding a solution, and then add points related to the intricacy of it - like the number of operators used, or based on a "trickyness level" of the operators.

3. Timed

For the quick-headed of you an option is to decide a certain amount of time between tossing the dice and coming up with a solution. You get, say, 1 minute, and you come up with as many solutions as you can within that time. The solution with the highest number of points is used and the score is noted for each round. This can be either turn-based, or all players can work on the same dice simultainously. After a given number of rounds the geek with the highest total score is the winner.

No comments:

Post a Comment