- 23 August 2010
- CEOs Desk
- Comments Off
-
Tags: poker game rules, poker odds, poker probability, poker software code
Coding the Odds !
23 August 2010 Posted By admin
Quite a few programming gurus are actively involved in the writing of gaming code. I am talking specifically about poker game coding in this particular blog post. When we write Poker software code (programming for poker software) we follow what we call as the “science of odds.” There always is a math to it which is what we in the online gaming world call as “coding the odds”.
Knowing the odds of different hands in poker is a valuable tool. A good poker player in general is supposed to have a strong knowledge about the odds and poker game rules and these come in handy for writing the code and the algorithms that go into creating online poker software, too. A great software programmer has to work with a game rule specialist and implement and incorporate the math into his poker software code. Robert Border, our President is widely considered to be a game rules specialist, especially in online poker and has helped out and consulted quite a few online poker card rooms.
As in most things mathematical, in poker software code, the probability of many events can be determined by direct calculation. In most cases, the probabilities and odds are approximations due to rounding off.
When calculating probabilities for a card game such as Texas Hold ‘Em, there are two basic approaches. The first approach is to determine the number of outcomes that satisfy the condition being evaluated and divide this by the total number of possible outcomes. For example, there are six outcomes (ignoring order) for being dealt a pair of aces in Hold ‘em: {A♣, A♥}, {A♠, A♦}, {A♠, A♣}, {A♥, A♦}, {A♥, A♠}, and {A♦, A♣}. There are 52 ways to pick the first card and 51 ways to pick the second card and two ways to order the two cards yielding (52×51)/2=1326 possible outcomes when being dealt two cards (also ignoring order). This gives a probability of being dealt two aces of 6/1326 = 1/221
A royal flush would then work the following way:
These are just two examples of the way it works, I will not go into all the combinations possible, though we can expect that in general, when our programmers have to sit down and write poker software code from scratch, it is a highly challenging and a fun experience.
~ CEO’s Desk





