1
$\begingroup$

  I am designing a bot to play Texas Hold'Em Poker on tables of up to ten players, and the design includes a few feed forward neural networks (FFNN). These neural nets each have 8 to 12 inputs, 2 to 6 outputs, and 1 or 2 hidden layers, so there are a few hundred weights that I have to optimize. My main issue with training through back propagation is getting enough training data. I play poker in my spare time, but not enough to gather data on my own. I have looked into purchasing a few million hands off of a poker site, but I don't think my wallet will be very happy with me if I do... So, I have decided on approaching this by designing a genetic algorithm. I have seen examples of FFNNs being trained to play games like Super Mario and Tetris using genetic algorithms, but never for a game like poker, so I want to know if this is a viable approach to training my bot.


  First, let me give a little background information (this may be confusing if you are unfamiliar with poker). I have a system in place that allows the bot to put its opponents on a specific range of hands so that it can make intelligent decisions accordingly, but it relies entirely on accurate output from three different neural networks:

NN_1) This determines how likely it is that an opponent is a) playing the actual value of his hand, b) bluffing, or c) playing a hand with the potential to become stronger later on.

NN_2) This assumes the opponent is playing the actual value of his hand and outputs the likely strength. It represents option (a) from the first neural net.

NN_3) This does the same thing as NN_2 but instead assumes the opponent is bluffing, representing option (b).

  Then I have an algorithm for option (c) that does not use a FFNN. The outputs for (a), (b), and (c) are then combined based on the output from NN_1 to update my opponent's range.

  Whenever the bot is faced with a decision (i.e. should it fold, call, or raise?), it calculates which is most profitable based on its opponents' hand ranges and how they are likely to respond to different bet sizes. This is where the fourth and final neural net comes in. It takes inputs based on properties unique to each player and the state of the table, and it outputs the likelihood of the opponent folding, calling, or raising.

  The bot will also have a value for aggression (how likely it is to raise instead of call) and its opening range (which hands to play pre-flop). These four neural networks and two values will define each generation of bots in my genetic algorithm.


Here is my plan for training:
  I will be simulating multiple large tournaments with 10n initial bots each with random values for everything. For the first few dozen tournaments, they will all be placed on tables of 10. They will play until either one bot is left or they play, say, 1,000 hands. If they reach that hand limit, the remaining bots will instantly go all-in every hand until one is left. After each table has completed, the most accurate FFNNs will be placed in the winning bot that will move on to the next round (even if the bot containing the best FFNN was not the winner). The winning bot will retain its aggression and opening range values. The tournament ends when only 100 bots remain, and random variations on those bots will generate the players for the next tournament. I'm assuming the first few tournaments will be complete chaos, so I don't want to narrow down my options too much early on.

  If by some miracle, the bots actually develop a profitable, or at least somewhat coherent, strategy (I will check for this periodically), I will begin decreasing the amount of variation between bots. Anyone who plays poker could tell you that there are different types of players each with different strategies. I want to make sure that I am allowing enough room for different strategies to develop throughout this process. Then I may develop some sort of "super bot" that can switch between those different strategies if one is failing.

  So, are there any glaring issue with this approach? If so, how would you recommend fixing them? Do you have any advice for speeding up this process or increasing my chances of success? I just want to make sure I'm not about to waste hundreds of hours on something doomed to fail. Also, if this site is not the correct place to be asking this question, please refer me to another website before flagging this. I would really appreciate it. Thanks all!

$\endgroup$
4
  • $\begingroup$ Sure, you can train one "magic" model using a "magic" technique. Any NN you get out is "viable". There's just no telling how good it'll be. $\endgroup$
    – Raphael
    Commented Oct 7, 2017 at 10:27
  • $\begingroup$ This seems like an open-ended tinkering prompt, i.e. not a question that can be answered concisely and comprehensively. I think it's therefore too broad (or unclear?) for this platform; community votes, please! $\endgroup$
    – Raphael
    Commented Oct 7, 2017 at 10:28
  • $\begingroup$ So I should just try it and hope for the best since there's no way to tell? Also, do you consider this a magic model because so much is reliant on the NNs? $\endgroup$ Commented Oct 7, 2017 at 10:57
  • $\begingroup$ I use "magic" here to express that you (we) don't really know when and why it works (well), anyway. $\endgroup$
    – Raphael
    Commented Oct 7, 2017 at 11:07

1 Answer 1

1
$\begingroup$

If you don't have enough training data, I expect that using genetic algorithms to select the neural network weights isn't going to work any better than backpropagation. If you don't have enough training data, it probably doesn't matter how you train the network.

If you do have enough training data, I would expect backpropagation to work better. There's an art to training neural networks, and there is a lot written on how to apply backpropagation and gradient descent to train neural networks effectively. If you wanted to try using genetic programming to find the weights, you'd be on your own and wouldn't be able to be guided by existing practice and lessons learned in the community.

That said, with only a few hundred weights, I would predict that your neural network won't play very good poker in any case, no matter how much training data you have.

You could also look at reinforcement learning, and methods to have the network learn by playing against itself.

$\endgroup$
2
  • $\begingroup$ My thought was that the millions of hands simulated during these tournaments would end up acting as my training data, but I have very little experience with this stuff, so I'm not surprised if my thinking is wrong. Also, why do you say you don't expect it to work well with only a few hundred weights? Do you think it would be more accurate with more hidden nodes and layers? I was worried about overfitting with too many of those. $\endgroup$ Commented Oct 9, 2017 at 20:15
  • $\begingroup$ @KodyPuebla, OK. That sounds like a lot of training data. As for why I don't expect it to perform very well, that's just a speculative prediction, not based on any evidence. The way to find out is to try it and see what happens. $\endgroup$
    – D.W.
    Commented Oct 10, 2017 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.