I am trying to build a poker bot in java. I have written the hand evaluation class and I am about to start feeding a neural network but I face a problem. I need the winning odds of every hand for every step: preflop, flop, turn, river.
My problem is that, there are 52 cards and the combinations of 5 cards are 2,598,960. So I need to store 2,598,960 odds for each possible hand. The number is huge and these are only the odds I need for the river.
So I have two options:
- Find the odds for every possible hand and every possible deck and every time I start my application load them and kill my memory.
- Calculate the odds on the fly and lack processing power.
Is there a 3rd better option to deal with this problem?