Inspiration
We wanted to incorporate a smart bot that could play games with us and even win money! We decided to add a speaker interface so you can play in real life, not just a simulated computer game. We went with the speaker idea and tried to make the bot completely interfaced via voice for accessibility to all.
What it does
Our bot uses Google assistant and node.js to call functions in our javascript poker game based off human speech. The function then calls a trained machine learning model from Keras and Tensorflow to predict the best action to take. By going back and forth on our javascript python engine, we can combine the inputs from user speech to the outputs of the chatbot model and get a poker game going.
How I built it
We started with the individual components. We coded a javascript poker game that could meet our specific requirements of being called from outside the file. I built the user to computer interface on Google Assistant and DialogFlow. We used random test data and prints to debug as we went. Lastly, we started with a basic sequential Keras model for the ML model. We added reinforcement learning equations to adjust the rewards based on the state and possible actions of the machine.
Challenges I ran into
We couldn't find data or a open source poker engine that met our specs, so we had to code the basics from scratch. We needed programs to generate test and training data. We wanted originally to interface the user-computer interaction with a Google Home mini, but the wifi in the gym was not strong enough to support our original plan. We were unable to connect our phone to Google Home mini, but we used Google Assistant through a web browser. We also started the ML model late; the complexity of a reinforced poker bot is huge. Because chess has set board positions and outputs (pawns start out in second row, win, lose, etc), and games like tic-tac-toe have finite states (turn 1, turn 2, etc), they are easier to code reinforced ML models for. No limit Texas Hold Em has 52 choose 2 possible positions for just the Pre-Flop round, let alone Flop, River, etc. With raises and re-raises too, there are infinite possible states.
Accomplishments that I'm proud of
I'm proud that we set up a ML model, a user interface, and a javascript python engine. I learned a lot along the way, and I like how we tried lots of new features.
What I learned
I learned about reinforcement ML, google assistant actions, and basic python/ javascript.
What's next for pokerbot
We coded heads-up, but the next goal would be texas hold em with higher accuracy, a better user interface via google home or smart products, and a more robust poker engine.
Built With
- google-assistant
- keras
- tensorflow
Log in or sign up for Devpost to join the conversation.