Version 3 of Poker Probability and Calculator Demo Example

Updated 2013-07-16 07:04:27 by gold

Poker Probability and Calculator Demo Example


This page is under development. Comments are welcome, but please load any comments in the comments section at the middle of the page. Please include your wiki MONIKER in your comment with the same courtesy that I will give you. Its very hard to reply intelligibly without some background of the correspondent. Thanks,gold


# gold Here is some starter code for poker probability. The impetus for this calculator was checking some poker probabilities of 5 card draw in a book. Its easy enough to plug in formulas into the calculating subroutine. Most of the checked testcases involve 5 card poker.


In planning any software, it is advisable to gather a number of testcases to check the results of the program. The math for the testcases can be checked by pasting statements in the TCL console. Also, some of the pseudocode statements were checked in the google search engine which will take math expressions. The factorial procedure used below was posted by Suchenworth. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the factorial function.


  • Testcase 1

# For a system of dealing 5 cards from a 52 card deck, the sample space would be factorial(52)/((factorial(5)*factorial(52-5)) or 52!/(5!*47!). Most of these TCL expressions can be pasted into the console window.

Testcases Section


Testcase 1. 120 degree sector: .5 .25 0.866 120. 0.153 0.3


Testcase 2. 90 degree sector: .5 .353553391 .707 90. 0.071 0.14


Testcase 3.



Screenshots Section

figure 1. http://imageshack.us/a/img24/835/kez.gif



References:

  • Robson, Eleanor, Mesopotamian Mathematics, 2100-1600BCE,Oxford 1999

Appendix Code

appendix TCL programs and scripts



# For the push buttons, the recommended procedure is push testcase and fill frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console, but takes away from computer "efficiency". While the testcases are in meters, the units cancel out in the calculator equations.


Comments Section

Please place any comments here, Thanks.