Brandon Hung’s Status Report

This week was quite busy for me, but I still tried to make as much time as possible to work on a new approach to the CV. My first attempt of CV was tuning a color segmentation algorithm. However, this simple was not working because variations in lighting are devastating to color segmentation algorithms. If we continued using the same approach, I do not think it would be possible to meet the requirements. After thinking about the problem, I’ve come up with a preliminary solution idea I’ve spent most of the day implementing. The idea is to use the white checkers on the chips as a marker. I plan on aggregating the white markings to group them together. This is done by searching the surrounding image area for more chips. Then, draw a rectangle around the grouped markings to get a bounding box. This allows me to use the least squares approximation to fit a line between the bases of the rectangles; once that is done, I will be able to rotate the image so the stacks are roughly horizontally matched. From that point, I can rotate the rectangles to get the true height of the stacks. This algorithm is a lot more involved than the previous one, so I am working on getting it right. I have several bugs with aggregation, which I hope to solve before tomorrow.

Patrick Status Report 4/24/21

This week Steve and I finished the poker game progression logic. Pressing Play Game on the home screen initializes the game and places the small blind position at player 1.

As the round progresses, each player as the choice to fold, raise, call, or check when allowed.

Folding removes the players from the hand, and their icon become red.

Turn logic has been implemented. Our debugging can be seen in the middle of the screen, and here it shows the progression from “preflop” to “flop”. The four round modes are preflop, flop, the turn, and river.

When a game ends, the players all return back to the hand, and the small blind chip progresses to the next player at the table.

What is left to do is update the stack sizes with information read from Brandon’s CV algorithm, and to point the servo at the current player acting. The current player acting is highlighted by the green circle icon.

Very productive week 😀

 

Zongpeng’s Status Reports 4/24

This week I have been designing and thinking about poker logic and stack/pot-size logic on paper. Then I met up with Pat on Saturday to integrate these logics into the actual GST and UI. I uploaded the drawing and examples below. We keep track of the player order in a list and update it after each action. The first player in the list is always the current player to act, so instead of explicitly tracking who the big blind, small blind and dealer are, we simply imply those positions in the list to simply things. For updating bet size, and pot size, our plan is to have a bet_list as an attribute in each  player class. With this list, we can update player’s stack size and pot size in real time instead of updating them after each round.

Pat and I got a lot done in terms of integrating the most important part of the poker logic this weekend. There are more pictures from the actual UI in Pat’s posts. Next step we just have to implement stack/pot size logic which shouldn’t be too bad because I have a concrete plan on paper and we already did the player order logic. Last part would be rotating the servo. Since we already set up the serial communication between GST and Arduino, We will just hardcode the angle for each player and send that information to servo every time the player order list changes.

Attached below is handwritten notes of poker GST logic and potsize/stack logic. Apologies for the messy handwriting.

handwritten notes for GST poker and stack/potsize logic

Team Status Report 4/24

This week Pat and Steve worked on the poker logic. Brandon is experimenting with different approaches for Computer vision. Currently  there are 3 main phase of integration: the game state tracker Poker logic, stack/potsize logic, and finally rotate servo. Pat and Steve finished the GST poker logic. There are more details about this in their individual posts. For the stack/pot size logic, we plan do give GST a fake input to see if stack/pot size updating works first. Once Brandon refines the CV algorithm, we will use the output directly from CV. For the servo rotation, we already set up the serial communication. So next step we just need to figure out the exact angle of each player and send that to the arudino to rotate the servo. The hardest part of the poker logic is handled. Next up is refinement and make sure everything runs smoothly.

Zongpeng’s Status Reports 4/10

Pat and I worked this week to integrate the GST and servo. We were able to control the servo from the GST. We used pyserial in GST to send angle information. For Arudino we just opened the port to constantly receive information sent from GST. However, the poker logics hasn’t been fully implemented yet, so we are hardcoding the rotation right now. We plan to show integration of servo and GST during our demo Wednesday. I also printed out the 3d components and assemble them together. One problem is the standoff we ordered are not long enough so I will go to home depot tomorrow to see if there are longer ones. Otherwise might need to order from Amazon. Everything is looking good. Next step is probably figure out the actual poker game logic and tried to integrate the camera with the GST, and if we have more time, we can add additional feature Gary mentioned, which is feedback from the camera to pi and pi to servo to make sure we pointing to the stack accurately.

Brandon’s Status Report 4/10

I ran into several UI issues with the CV, but I have that mostly ironed out now. I just need to finish polishing it up, which will be done by tonight so we can test. In addition, I will be setting up the Raspberry Pi on my end to test; the web camera we purchased works with the CV on my laptop, so running the CV shouldn’t be much of an issue on the Pi. Currently, the CV will spit out the height of a stack based on which colors it detects and provides a user-friendly  calibration routine to record any amount of chip values a dealer might have.

Team Status Report 4/10

This week, we’ve been busy getting our demo ready. So far, our setup for the Raspberry Pi is underway and the servo control from the Pi has been integrated with the Game State Tracker. We’ve decided to make several changes, including cutting out the difference between the Dealer and Player UIs (showing both on the same screen) and placing the chips closer than before to the camera (for better chip reading accuracy). By the end of tonight, the CV part should be polished enough to integrate and we can test over the next 3 days.

 

Here is an updated Gantt Chart:

Going forward, we will have a lot less time due to a bit of an oversight in planning. Nonetheless, our goals have not changed.

Patrick Status Report 4/10

I started this week by centralizing more information in the Game State Tracker. I created a config.py file which all the different subsystems can refer to for central player and table information.

Steve and I also made great progress together, and integrated the Dealer UI with the Servo library controls. We implemented a basic protocol where the Dealer UI can rotate the servo to a specific angle using inputs on the keyboard.

Moving forward, Steve and I also are working out the logic of turn progression in a poker game. We plan on using ordered lists of the players at the table to determine the progression of a poker round. The front of the list will always denote the Small Blind, which is usually the first player to act in a round. Once we have implemented the logic for poker turn progression, we will be able to rotate the Servo to the proper player position at the table.

Patrick Status Report 4/4

This week I began working on the Game State Tracker and reorganizing the way the Dealer UI is structured. I am changing the structure so that the Game State Tracker will be central source of information versus other modules communicating with the Dealer UI for some game information.

For instance, one of the changes that I made defining a “Player” class and placing this module in the Game State Tracker.

Maintaining this class and other types of central table information will be key to writing the Game State Tracker in the future. Looking to make a lot of progress in the next couple days.

Zongpeng’s Status Reports 4/03

I went to tech spark and we should get back the 3d printed components on Monday. I also worked on the serial communication between Raspberry Pi and Arduino. Once Pat is done with GST, we will start integrating the servo and GST subsystem.