Poll

No votes (0%)
6 votes (85.71%)
No votes (0%)
No votes (0%)
No votes (0%)
1 vote (14.28%)

7 members have voted

Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 14th, 2010 at 2:05:58 AM permalink
Sah Wat Dee...
Our beloved Dorothy here has been posting some thoughtful math-solving challenges here, one of which I did a "Homer Simpson 'd'oh!'" on. If it's NOT concerning a dice or gambling game, it feels too much like an SAT math question, so I brought in a little dice gambling game challenge.

I wanted to do something like Dorothy did [bless her] - but using a real game you can gamble on. The only quirk is that YOU have to find the optimal strategy for it. It's for "shut the box," a pub game like "anchors and limeys" or what have you, but it has a basic strategy. It's very popular in beer bars in Thailand, to play with your Thai girl friend for the evening (so...many men here probably know this game already), - but the girls seem to whoop the crap out of us guys on it. I also will not discuss any connotations or innuendos about the title, but a title of "shut-the-box" is both counter-intuitive and needlessly discouraging at any beer bar in Pattaya, Thailand....(ah-hum..)

Anyway...let us instead develop a provable strategy for this game:

Shut the box is a bar dice game in which the goal is to “flip off,” or close off all the numbers from 1 to 9 on a small square wooden board by using any number that’s visible from two dice that are rolled within this box. This is regardless of whether that roll’s value is from a total of two dice, or a value from one die or the other die. The board looks like a series of “close-off” flippers for the numbers:
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

A partially played or close off board looks like this
| - | 2 | - | - | - | 6 | - | 8 | 9 |

You roll an 8 from a 2 and a 6..do you close off the 2, the 6, or the 8? What's the best play? WHY?

To close off a number, you can:
a) Use a number from one die,
b) Or the other die, or…
c) The total from both dice.
But you HAVE to do it without getting stuck, or not being able to have an action to take on a number, using dice probabilities.

Each player takes turns rolling the dice up to nine times hoping to "get a run" and close out all nine numbers for the win. If a player can’t do this, (any Impasse) then it’s a standoff, and the board gets cleared and passed back to the opponent for "his or her" try for a win, - often with pressing a small bet for beer money.

You will have to figure out an optimum playing strategy as part of the exercise, not that that’s hard to do either. But it's deceptive...note: the Fly in the Ointment here concerns hardways (pairs)....

Don't just give a strategy, give the WHY...
I'd like to see a member here nail and post the strategy [not Mike or Eliot, though Mike might spray a little vinegar on this salad]...
I'm betting on mkl or Dorothy...
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
avargov
avargov
  • Threads: 16
  • Posts: 615
Joined: Aug 5, 2010
September 14th, 2010 at 3:37:38 AM permalink
I aint very smart. But, I would try to remove the 7 8 9 first. I think one has a 38.8% chance of it hitting. If not, I would remove the smallest single die digit I could until a 7 8 or 9 showed. By removing the smallest digit, I think you have a greater chance of removing the larger single die digts with pair. IE, a 5 would have 15 ways to hit, and a 6 would have 16 ways.

Dan: I know you are looking for more than this, but I am posting from my phone, and because I would look more like a moron than I already do if I tried to make probability charts and the like. Perhaps I should just stick with handicapping college football.
Before you diagnose yourself with depression or low self-esteem, first make sure that you are not, in fact, just surrounded by assholes." ~ William Gibson
Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 14th, 2010 at 4:11:58 AM permalink
Avargov,
Firstly, Don't ever be ashamed or say you aren't smart. Not at this board, we're good people here!
And Your answer was spot-on. Yes, you remove them in the high order from 9 first, then 8, then 7, and THEN the low order, from 1, then 2....until you approach six. See the table below...

I invented a casino game that's in casinos in six states and I came off like HOMER SIMPSON with Dorothy's Coin weighing problem. Granted, I spent one minute on it, which was the same amount of time I used to answer SAT question back in high school, but I used to get them right, and now I get them wrong, because it now takes more time to review things, being an ol' fart now. I know now that is why gaming mathematicians like Mike, Eliot and Charles have to charge what they do, because a man's (or woman's) game ain't an SAT question, and it ain't a minute's work to verify when a gambling game is going to spend a hundred casino years in heavy action...Actually, the game Three Card Poker, which has 1,500 tables out for ten years now, has more like 15,000 table-years of live casino table action. That's 15 millenia. (This is also why a 90 day field trial on one single table is pretty much an invalid exercise...Mike - your views?)

Anyway, here's the two-dice table for "Shut the Box":
Straight Dice probability table on one roll of two dice, 36 possible combos with 2 dice:
Num/ Ways/ as 2-dice total/ on one die/ Percentage/odds to get
----- ------- ---------------- ----------- ---------------------------
1 12 0 12 (1/x, x/1) 33.33% (1:3)
2 13 1 (1&1 only) 12 (2/x, x/2) 36.11% (1:2.7)
3 14 2 (1&2, 2&1) 12 38.89% (1:2.6)
4 15 3 12 41.67%(1:2.4)
5 16 4 12 44.45% (1:2.2)
6 17 5 12 47.23% (1:2.1, almost even money)
7 6 6 0 (no => 7) 16.67% (1:6)
8 5 5 0 13.89% (1:7.2)
9 4 4 0 11.11% (1:9)

So...
1. You'd clear if you can the numbers ONLY formable with two dice first, in the order of 9, 8, 7 FIRST, then..
2. You'd clear the lowest numbers second, from one going up to six...
And you would have the strategy for "shut the box."

When you think about it, there is more of a dice strategy to this simple game than there is to the game of craps, because at least this little ditty has a strategy that has a statistical/mathematical impact to the game. And I was always happy to play Shut the Box with Thai Girls in Pattaya, Thailand, when I vacationed there after my first divorce. :) In this case, not only is a push a win, a LOSS is a win, - as a loss is a good push!

;)
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
avargov
avargov
  • Threads: 16
  • Posts: 615
Joined: Aug 5, 2010
September 14th, 2010 at 4:28:29 AM permalink
Dan, thanks for the kind words. Just like in high school and college, I never enjoyed showing my work (much to the shegrin of my accounting professors).

I also believe in being humble (I don't really think I am that dumb!). A little humility goes a long way these days.

And congrats on a game that seems to be very successful. I have spent many hours trying to come up with the next great casino game to no avail.

Alan
Before you diagnose yourself with depression or low self-esteem, first make sure that you are not, in fact, just surrounded by assholes." ~ William Gibson
Dween
Dween
  • Threads: 66
  • Posts: 339
Joined: Jan 24, 2010
September 14th, 2010 at 4:39:33 AM permalink
One slight correction to make for the probability of hitting a 1, or any single digit number: There are only 11 ways to hit a 1. There is an overlap on snake eyes, which is being counted twice. The same would go with any of the "on one die" probabilities.

I had never heard the rules to Shut-the-Box played quite like this. The other incarnation I've seen forces you to shut the total of your two dice on every roll. You can shut one, two, three, or four numbers as necessary to make the total. A one can never be shut by itself. In effect, you have to be able to roll a total of exactly 45 in 4 to 8 rolls, and shut the right numbers in the process.
-Dween!
Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 14th, 2010 at 4:39:35 AM permalink
Quote: avargov

Dan, thanks for the kind words. Just like in high school and college, I never enjoyed showing my work (much to the shegrin of my accounting professors).

I also believe in being humble (I don't really think I am that dumb!). A little humility goes a long way these days.

And congrats on a game that seems to be very successful. I have spent many hours trying to come up with the next great casino game to no avail.

Alan



We've all spent time on coming up with the next game:
1. Often we indeed HAD the next winner game - but we did NOT follow through...
2. Often we had a dog, but were deluded we had gold, and so wasted time or money, with a wife divorcing us saying we were mad (and she was RIGHT in that case - see #1, above)...and
3. Often we have a great game that has some scary threats on it [patent-wise, or selling it] that we have to fearlessly resolve to get it out...(Dave M.....)

I finally got my game out, and am making a little bit of money, with more to follow. But the main thing is, is that my investors no longer wish to kill me, and I convinced my wife that I was wise, and not crazy, in the end...
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 14th, 2010 at 4:45:48 AM permalink
Dween,
You're right. Since two aces together can only be counted once in this game - to be used only one time as a "one," then it is eleven times. There is a difference between the "actual times occuring" versus the "effective times occuring."

I was looking at how often it occurs, as opposed to how often it can be used in this game, for a stratgey for the same game. If we look at it as how often we get that needed number, since we cannot use the "one" twice with throwing two aces - it should be counted as one time.

A "hard two" counts only once, not twice, in spite of two ones, - because a "one" can be used once in that case, for the game. Sharp!

But this doesn't apply to a single digit number - only a single digit number that is formable hardways; 2 as two ones; 4 as two 2's; and 6 as two 3's. My widdle head hwurts!

And Dween, this is how the game was played in Pattaya, up and down Walking Street, as standard. Fine with me.
There are countless variations of the game.

And besides, it is very counter-productive to bicker with a Thai bar girl that you are with, on how this little bar game was played; she definetely sets some rules here and there...and she loves to beat a man on this game as a little game. this game is usually played in the confines of the other and better games usually being played there...;)
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
avargov
avargov
  • Threads: 16
  • Posts: 615
Joined: Aug 5, 2010
September 14th, 2010 at 5:15:17 AM permalink
Dan, I think all of my game ideas are a combination of #1 and #2. All have been dogs that I haven't invested much time and no money on.

Perhaps I am not so dumb after all! ;-)

Alan
Before you diagnose yourself with depression or low self-esteem, first make sure that you are not, in fact, just surrounded by assholes." ~ William Gibson
Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 14th, 2010 at 5:38:36 AM permalink
Avargov,
Reading your posts, I KNOW you ain't dumb. Great respect and propers here.

Quite often taking route #3 to get a game out is dumb: are you going to risk losing a house from a second-mortgage, or a fine marriage to a great woman - to spend $50,000 of needed family money that might ("probably will") result in complete financial and family destruction if your super-duper new fangled game results in no casino sales? This is actually serious business.

I was divorced at the time I took steps on #3 ("GET THE GAME OUT!"), had a one-bedroom condo that was upside-down on its mortgage, and had only a $120 provisional patent (a really -well written one) on a game that a major distributor (DEQ systems) was willing to bank on me, to distribute.

With this, I got:
a) investment agreements from investors that stipulated that if the games bombs, then there's no liability, and we are all out of the running; it's a gamble that simply looks good. They took it up because the game had a "clear and clean patent" - and a large potential market with a reknown distributor, DEQ;

b) I incorporated a small company for this, so that if my game failed, I'd lose only the patent on the game (which by then will have bombed anyway), some cheap IKEA office furniture, and two office computers. My condo ownership, my two cars, and current salary were outside of my company's incorporation and liability. If the worst had happened, then my investors would have lost about 5% or 10% of what they had in their 401(k)'s anyway, a percentage already ear-marked for long-shot speculative investments anyway.

c) ALL business affairs, all expenses and income from the game, is handled by a CPA, and not by me or my partner Steve. Actually, we make the decisions, but we check it out with the CPA, and we do it by the book.

d) for this, I gave up 31% of the revenue stream that my game produces. I still get and control 59%, under approval of a CPA who monitors all transactions of my company, Lubin-Jones, LLC. But I cannot take a cent for myself as royalties - until I have 40 tables out, which should be reached by December.

e) I "nominally" make $100 to $120 per table per month, with the "official" price set by my distributor, DEQ, that won't be discussed here. But DO assume that when I reach 100 tables, Lubin-Jones will earn about $11,000 a month before taxes and expenses. This should be sometime late next year. I should make then about $6,500 a month salary after investors, or about $78,000 a year, about what a mid-level coprorate executive makes, - as pure royalties. With 500 tables, I will be taxying a Lear Jet down I-95, flipping the bird to Metro police in patrol cars trying to pull me over. No...I won't. I'll take a first class vacation to Tokyo and Hong Kong, and play $100 a hand at Macau.

f) I currently make about $32,000 year as a casino dealer (yes - tips are way down), but I have health insurance that covers a serious heart condition, and I would be uninsurable otherwise. I have got to give great credit for Stations for this full-time employee benefit.

g) I would say that all of this this (as in "plan #3" above) damn nearly killed me in terms of stress, expenses, and its effect on my coronary condition, and its stress on my current marriage. (I got married to a nice Thai lady during the process. And NO! - she does not know from either "shut the box" or the "open that box" Bar-girl version! But again - it always pays to know strategy!)

i) I am currently paying back the very fine lawyers and mathematicians involved in this process who helped me. There is still debt.

Plan #3 is very messy, painful, and time consuming, but it is your only shot at getting a casino game out for real. If you don't realistically have a shot, then just give it up. But if you DO - be willing to die trying!
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 14th, 2010 at 7:06:54 AM permalink
anyway, y'all, let's get back to this simple game...what to do?
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
Dween
Dween
  • Threads: 66
  • Posts: 339
Joined: Jan 24, 2010
September 14th, 2010 at 8:20:33 AM permalink
Following the strategy of:

1. Close off 7, 8, 9 if rolled, else
2. Close off 1, 2, 3, 4, 5, 6 based on single die, in that order of preference, else
3. Close off 2, 3, 4, 5, 6 based on total

I ran a simulation, and if there are no bugs, 1000 iterations gives 71 wins and 929 losses, for about a 7% chance of winning with that AI.

It makes sense to try to close off the numbers that have the lowest probabilities first, and 7/8/9 are the hardest, with about 14-16% each. Then, 1 with ~30%, 2 with ~33%, up to 6 with ~44%.

If anyone has another strategy, I might be able to test it, but this seems pretty sound. I'll run a simulation of 10,000 games to confirm the percentage.
-Dween!
Dween
Dween
  • Threads: 66
  • Posts: 339
Joined: Jan 24, 2010
September 14th, 2010 at 9:07:34 AM permalink
Slightly better results. 10,000 games shows 790 wins, 9210 losses. So we're looking at about 7%-8% chance to win with the above strategy.
-Dween!
Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 14th, 2010 at 11:22:56 AM permalink
Quote: Dween

Following the strategy of:

I ran a simulation, and if there are no bugs, 1000 iterations gives 71 wins and 929 losses, for about a 7% chance of winning with that AI.



Very fine, Dween - that sounds about right, or about one in 12 games, or 15 minutes of bar banter with a girl I'd be playing with. And blowing the strategy wrecks your chances of winnings. Try a simulation where you start from the middle - and see what the win rate percentage is then! In fact, please do so! Can ya?

In my Thailand vacations, it would take about 10 to 15 minutes for a decision on the game when I was chatting up a girl - at which point the Thai bar girl had pressed me up to about to about 500 Baht(!) if she nailed her win, [when I was hoping to nail her. She'd say, "Okay, hansum man, you gib me monay...pay for drinks."] [Dorothy - please don't through a Bible at me!]

I figured out the strategy and then won frequently, where the bar girl would say, "No, hansum man, I no pay you now, - but I go with you, - up to you" and then she'd get paid - and laid, for that matter. Married now, those delightful carefree days are gone....:( ...but I brought back two wooden shut-the-box games for 300 baht (about $7 U.S.) Sometimes she'd get pissed or surprised if you won. ("How you know dat??!! You pray wid too many radies?! What is da f*ck!" Followed by laughter: "I just got rucky!")

Pattaya Thailand is a great place to celebrate a divorce from your first wife!!
The Land of Smiles, I tell ya.

This game still holds a special place in my heart. My wife gets upset if she sees me cleaning them gently with Murphy's Special Wood soap, or using Pledge wood polish.....
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
Dween
Dween
  • Threads: 66
  • Posts: 339
Joined: Jan 24, 2010
September 16th, 2010 at 12:07:14 PM permalink
I optimized my code by about 100-fold, and am now able to run 1,000,000 games in about 15 seconds. That's what you get when you do lazy coding the first time around.

Luckily, the best AI method still shows an almost exactly 8% chance of winning, as given again:

1. Knock out 7, 8, or 9, else
2. Knock out 1, 2, 3, 4, 5, 6 as a single die, in that order, else
3. Knock out 2, 3, 4, 5, 6 as a two-die total.

Doing the reverse of that...

1. Knock out a two-die total of 2, 3, 4, 5 or 6, else
2. Knock out a single die of 6, 5, 4, 3, 2 or 1, in that order, else
3. Knock out a total of 7, 8, or 9

...gives a horrendous win rate of <1.25%, or 1 out of 80 games.

I can't really think of a better (or worse) way to play, given the individual probabilities of each outcome, and trying to knock out the hardest ones first for optimal play.
-Dween!
Paigowdan
Paigowdan
  • Threads: 115
  • Posts: 5692
Joined: Apr 28, 2010
September 16th, 2010 at 1:47:57 PM permalink
Interesting,
That is a huge difference. Thank you.

I feel that this is a very good little exercise for learning two-dice dynamics.
Beware of all enterprises that require new clothes - Henry David Thoreau. Like Dealers' uniforms - Dan.
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
September 16th, 2010 at 2:13:29 PM permalink
Quote: Dween

I optimized my code by about 100-fold, and am now able to run 1,000,000 games in about 15 seconds. That's what you get when you do lazy coding the first time around.

Luckily, the best AI method still shows an almost exactly 8% chance of winning, as given again:

1. Knock out 7, 8, or 9, else
2. Knock out 1, 2, 3, 4, 5, 6 as a single die, in that order, else
3. Knock out 2, 3, 4, 5, 6 as a two-die total.



I know the dice probabilities don't change, but should the strategy change over time based on what's already closed?

I think this problem could be solved (not simulated) by running it backwards. There are a finite number of situations which are 1 roll away. E.g. 9 only, 8 only, 4/3, etc. Each one of those has a particular probability of winning on the next roll. Then, each 1-away board has a finite number of 2-away boards, some of which overlap. Each 2-away board has a particular probability for transitioning to one (or more) 1-away board. The point is, I think a computer could iterate over each combination and derive the cumulative probability of getting to each other reachable one. Then when you got to the top, you'd have the exact answer. There are only 512 possible boards. The right move from each is the one that maximizes the win probability of the next level. The context-free strategy above may do it, but I'm not 100% sure.

Edit: I may have free time next week to put this together. Stay tuned.
"In my own case, when it seemed to me after a long illness that death was close at hand, I found no little solace in playing constantly at dice." -- Girolamo Cardano, 1563
Dween
Dween
  • Threads: 66
  • Posts: 339
Joined: Jan 24, 2010
September 17th, 2010 at 4:39:30 AM permalink
Quote: MathExtremist

...Then, each 1-away board has a finite number of 2-away boards, some of which overlap. Each 2-away board has a particular probability for transitioning to one (or more) 1-away board. The point is, I think a computer could iterate over each combination and derive the cumulative probability of getting to each other reachable one...


I think because the odds of individually hitting certain combinations has already been discussed, working the problem backwards has in effect been done. From easiest to hardest, here are the odds of shutting a number:

#1 die2 diceTotal
630.55%13.88%44.44%
530.55%11.11%41.66%
430.55%8.33%38.88%
330.55%5.55%36.11%
230.55%2.77%33.33%
130.55%0.00%30.55%
70.00%16.66%16.66%
80.00%13.88%13.88%
90.00%11.11%11.11%


The odds of hitting a total of 7, 8, or 9 almost don't matter, as hitting a total of any of them is an instant move to knock it out, and you cannot possibly have a choice between any of them (mutually exclusive possibilities).

Example 1
Let's say you have a 2, 4, and 6 remaining in the game, and you roll a 2 & 4. Your move is to take the lowest probability item, the 2. It would be easier to hit a 4 or a 6 later.

Example 2
Let's say you have a 1 and 7 remaining in the game, and you roll a 1 & 6. Again, your move is to take the lowest probability item, the 7. You have a better chance of clearing the 1 on the next roll.

Because each move can only take out one number at a time, this strategy is much simpler than playing Shut-the-Box with a multiple number removal option; That kind of game could use a backwards-iterating solve.
-Dween!
MightyOne
MightyOne
  • Threads: 5
  • Posts: 33
Joined: May 14, 2010
May 25th, 2015 at 9:05:41 AM permalink
Nice thread, I went ahead and purchased a pretty Shut the Box after reading these pages.

I just want to stop by and talk about some additional rules that have spiced the game up a bit.

1. Come Out Roll: If a player rolls doubles on his first roll then he loses

2. Escape: Prior to his roll a player can declare that he is 'escaping the box' after which if he hits any number then all
numbers are opened, his bet stays, and he makes a Come Out Roll.

Friends and family love it, all I hear is "did you bring the box?"

They are happy to play a dollar at 10 for 1 odds.
Yes I am a donkey, I never said that I wasn't!
  • Jump to: