Problem 2482. Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine.
A deck of 100 unique cards (hypothetical) is randomly shuffled and divided into two equal parts. One is given to you and one to bot. Bot plays a card first. Then, you play a card. If your card is higher, you win that round. This is repeated until all cards are played.
Bot plays cards randomly and it will always play the first card. Your task is to devise a strategy so that your routine wins 75 percent or more rounds. Your function will be provided with two inputs, the card played by the bot and cards left to you.
(This is partially dependent on luck. I might change the winning condition (75 percent or more wins currently) depending on performance without re-scoring.)
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers98
Suggested Problems
-
Find the sum of all the numbers of the input vector
49117 Solvers
-
516 Solvers
-
Find best placement for ordered dominoes (harder)
309 Solvers
-
Number of 1s in a binary string
9083 Solvers
-
Rounding off numbers to n decimals
4504 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!