Problem 54214. To Bet or Not to Bet
Given your current poker hand, the visible cards of your opponent's hand, and the total number of cards being dealt (5 card stud or 7 card stud). Determine whether or not you are likely to not lose the hand (output 1) or otherwise output zero. Your hand will be a matrix of card values (1:13 two=1, ace=13) in the first column and suits (1:4 clubs:spades) in the second column. Similarly for opponent's hand. Total cards (either 5 or 7) will indicate 5 card stud and 7 card stud. Since this is a Monte Carlo, I provided some slop in the answer. I performed 40,000 iterations for each hand, so the slop should be sufficient to cover reduced iterations (such as my reference solution which only did 3000 iterations each).
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers1
Suggested Problems
-
Project Euler: Problem 7, Nth prime
1389 Solvers
-
Back to basics 21 - Matrix replicating
1467 Solvers
-
43 Solvers
-
Check if number exists in vector
10458 Solvers
-
Sum the entries of each column of a matrix which satisfy a logical condition.
157 Solvers
More from this Author54
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!