ME 135 Final Project Poker Lite Albert Lee
ME 135 Final Project: Poker. Lite Albert Lee, Andrew Hu, Sala Tieman, Zachary Elshaer
The Project: Poker. Lite ● ● A poker game played on Lab. VIEW played against an AI opponent Key Features: ○ ○ ● The capability to play one complete round, from initial deal to final bets A randomized deck that deals a unique hand every time the game is played An automated opponent who can match, raise, or fold based on the cards on the table A trainer in the bottom right reporting relevant probabilities to the player in real time Demo!
Feature One: The Deck ● ● A Sub. VI with no input that outputs a queue with 9 random cards Features: ○ ○ A full poker deck for a game with 2 players uses a total of 9 cards: 2 to start each player’s hand plus 5 more that our revealed throughout the game An array is initialized with 52 values (numbered from 0 to 51 inclusive) A random number generator is used to select 9 values out of the initial array and also enqueues them in a queue (this ensures no duplicates of cards) Queue is wired as an output of the Sub. VI
Feature Two: The Opponent ● ● The AI opponent is a Sub. VI that makes decisions in real time based on the cards on the table and the opponent’s bet Operation: ○ ○ ○ Calculates all relevant probabilities based on the data available to it Runs these probabilities through a scoring algorithm, with higher scores being given when there is a good chance of achieving strong hands The final score is compared to various thresholds, which dictate whether the opponent folds, matches, or raises the player’s bet
Feature Three: The Trainer ● The trainer reports the probabilities of achieving various hands in the current poker game. ● Operation: ○ ○ ○ A Sub. VI dedicated to the statistics takes in the current cards on the table and reports back the probabilities of achieving each of the various hands This Sub. VI communicates with a python script that does all the math This Stats Sub. VI runs in a parallel loop to the main game, making sure to update as needed throughout the game
Bonus Feature: Two-Player ● ● ● Employs an HTTP connection from two Lab. VIEW VIs to communicate over the internet ○ Connects to separate channels on thingspeak. com ○ Exchange information between players in real time to play a game! Were not able to fully implement this in Poker Lite Created a pair of VIs to demonstrate that this is possible (Poker Lite) ○ Demo!
Difficulties ● ● ● The overall VI (where everything came together and the main poker game was played) was an ENORMOUS task-much harder than we ever anticipated The probabilities were difficult to compute purely from a mathematical standpoint Cooperating remotely was difficult Debugging the game and “flushing” out every possible scenario of a poker game Implementing internet connection into the main Poker VIs to make the game two-player
Future Directions ● ● ● Poker Lite does not recognize the full set of poker hands-- future versions could have code that calculates probabilities of all possible hands Our game only plays one round, so future iterations could feature the capability to play a full game Two player would be really fun!
- Slides: 8