Simulating the guessing of cards

Version 3

You shuffle a normal deck of 52 cards, and then draw one card after another, and each time you guess whether the card will be red or black. Your method for guessing is that you guess the color that has so far appeared the least number of times (which obviously is the optimal strategy). If there is a tie, then select any color.

What will your success rate become in the long run of such sessions?

The tool below lets you simulate such a situation to find the success rate. It also lets you change the number of colors, cards, and sessions. You can also specify the probability for following the strategy, where 0% means you always guess color randomly and 100% means you always follow the above described strategy.

For each session a diagram will be shown with the probabilities of being correct for each of the guesses in a session, and how it gradually changes from the first guess to the last guess.

Number of colors: Number of cards of each color: Probability to follow the strategy: % Number of sessions: Results:
ASP.NET Version 4.0.30319.42000