November 4th, 2025 at 3:45:03 AM
permalink
Hi Wizard of Odds.
I've taken the challenge of verifying the simulations for Jacks/Better 9/6 as well as Double Jokers poker.
I've looked at the video and source code for an exhaustive search.
I have noticed an issue with the draw function, which starts from the initial deal, and cycles through all possible hold combinations to determine the optimal play.
This function also allows a discarded card to reappear, and increments draw_score_array. In true video poker, a discarded card cannot reappear. The hit rate calculations are hence incorrect.
The irony is that if you search the internet, most poker odds calculators have the same issue. I wouldn't be suprised that they use your data tables.
I've taken the challenge of verifying the simulations for Jacks/Better 9/6 as well as Double Jokers poker.
I've looked at the video and source code for an exhaustive search.
I have noticed an issue with the draw function, which starts from the initial deal, and cycles through all possible hold combinations to determine the optimal play.
This function also allows a discarded card to reappear, and increments draw_score_array. In true video poker, a discarded card cannot reappear. The hit rate calculations are hence incorrect.
The irony is that if you search the internet, most poker odds calculators have the same issue. I wouldn't be suprised that they use your data tables.
November 4th, 2025 at 10:50:38 AM
permalink
This is a standard way to speed up the calculations. You allow the discards to reappear in the combinations (draw_score_array) and then correct this total before you use it in the EV calculations. I have never seen Wizard's code before, but it is structured a lot like my code. The corrections for the discards follows a 32x32 Sierpiński triangle.

Here, the plus and minuses tell you whether to add or subtract an array element from the total number of legal draws. So, if you draw to a four card RF, you start with 48 total draws, including the one when the discard comes back into the hand. Then, using the triangle, you subtract off the one hand that contains the RF. This gets you to the correct answer, 47.
If you are looking at a case where you discard all 5 cards, the process is identical, but the number of terms in the correction is much larger. It is a very clever and efficient way of doing the calculations. I learned this from reading explanations from VPGenius and the Wizard 25 years ago. I don't know if a good explanation can be found anywhere on the web today. The VPGenius page seems to be gone.

Here, the plus and minuses tell you whether to add or subtract an array element from the total number of legal draws. So, if you draw to a four card RF, you start with 48 total draws, including the one when the discard comes back into the hand. Then, using the triangle, you subtract off the one hand that contains the RF. This gets you to the correct answer, 47.
If you are looking at a case where you discard all 5 cards, the process is identical, but the number of terms in the correction is much larger. It is a very clever and efficient way of doing the calculations. I learned this from reading explanations from VPGenius and the Wizard 25 years ago. I don't know if a good explanation can be found anywhere on the web today. The VPGenius page seems to be gone.
Gambling is a math contest where the score is tracked in dollars. Try not to get a negative score.

