Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ICS 33 Project

Objectives:

1.   Be able to extend a previous program to a robust, mid-sized program.

2.  Be able to implement a simple user interface through which users interact with the

program.

3.  Be able to implement a smart bot player that makes decisions based on probability.

Description:

In  this  assignment,  you  will  extend  and  modify  your  code  from  Programming Assignment 3 to add more functionalities. Because of time constraints and the amount of changes you need to make, you can choose to work in a group of 2 or yourself for the project.

Option 1 (User Interface): A graphical user interface (GUI) is the most common way for users  to  interact  with  a  program.  Python  provides  a  module  that  allows  you  to implement a simple GUI that connects users and your program. If you choose Option 1, you will need to implement a GUI with minimum functionalities including the following:

1.    Display cards to the human player.

2.   Display community cards to the human player.

3.   Display bot players’decisions to the human player.

4.   Ask for the human player’s decision (bet, fold, and bet amount).

5.   Display the inal winner and the money left for each player.

6.   Ask for the human players decision to continue to the next game or quit.

While you are free to use any packages in Python to implement the UI, if you are not familiar  with  any,  you  can  start  with  tkinter  (https://docs.python.org/3/library/ tkinter.html).

For the project, you are given more lexibility to design it the way you like, except that the rule for the Texas Hold’em game should still be what the previous assignments asked for. You can design how you want to display the cards, how you ask for user inputs, etc. However, the UI should be at least friendly and intuitive to use for a general user.

Option 2 (Smart bot player): The program so far is not much fun because the bots always bet the same amount no matter what cards they have. It would be much more interesting if you are playing with bots that are smarter and make decisions based on calculations of the probability of winning the game. If you choose Option 2, the setting is similar to the user mode in Programming Assignment 3, where the human user interacts with several bot players. The diference is that the bot players no longer bet a ixed amount.

Instead, the bot players make decisions based on the cards they have and bet money based on their current and expected rank.

For the project, you are given more lexibility to design smart bot behaviors the way you like. If you do not know where to start with, you can calculate the probability for getting high ranks and make decisions based on the probability. You can also make decisions based on other bots’and the human player’s decisions. For example, if other bots all bet little or fold, it is likely that they don’t have good cards, and you can increase the bot’s bet  accordingly.  Note  that,  given  the  randomness  of  the  game  (cards  are  drawn randomly),“smarter”bots do not necessarily always lead to more wins, but they have a better chance than simply having a ixed action no matter what cards they are given.

Assumptions

Assume you are drawing cards from one deck of cards. Assume that each player has $10 to start with.

Group/Individual Work

For the project, you will have the option to choose if you want to work in a group of 2 of individually. If you choose to work in a group of 2, you need specify each team member’s contribution in the ReadMe ile clearly and have both team member put the name on the ile to show that you both agree with the contribution statement. If for medical reasons and concerns about COVID infection, you can only work individually, please email me so we can discuss how to lower your workload for the project. However, if you choose to work individually because you think the workload is ine to handle, your work will be considered the same as a group’s work when being graded.

Submission

Python programs and a ReadMe ile should be submitted to Canvas by 8/26/2022, 11:59pm. You can submit as many times as you want before the deadline. You should submit a zip ile if you upload multiple iles. No late submissions will be accepted unless you communicate with the instructor ahead of time. If you have special circumstances that need to be accommodated, please contact the instructor and TA immediately.          Request for extension

Request for extension should be communicated directly with the instructor and no later than 48 hours before the due date. Extensions for this project can only be granted to submit before 8/27/2022,  11:59pm, because all grades need to be  submitted to the university by 9/2/2022.

ReadMe

You should submit a ReadMe ile for this project. For all submissions, you need to specify your contributions and which option you choose. If you work in a group, only 1 ReadMe ile is enough.

For Option 1 submission: you should instruct us how to run your program.

For Option 2 submission: you should instruct us how to run your program, a clear description without overwhelming technical details of how you make the bot players “smarter”.

Grading

The project will be worth 200 points, with the following breakdowns.

Option 1:

100 points: We can run your code to see and interact with a UI that supports the 6 minimal functions listed in the description on Page 1.

50 points: The UI is friendly, intuitive, and interactive. We do not encounter signiicant barriers when interacting with it to play a game.

30 points: Your code is well-organized and has good coding style. There should be no excessive copy-past of code snippets that have the same functions, or confusing variable names, long lines, and print statements.

20  points:  A  ReadMe  ile  that  speciies  the  option  you  choose  for  the  project, contribution statement, how to run your program, and anything you think will be useful for us to know. If you do not instruct us how to run your program, a temporary 0 will be given.

Option 2:

80 points: Your program demonstrates that the bots are making decisions based on information (the cards they have, other players’actions) instead of always having ixed actions.  This  is  demonstrated  through  our  interaction  with  the  game  and  your description of how you make the bots smarter in the ReadMe. We will also look through the functions you use to implement smart bot actions.

50 points: We can run your code as a human user and interact with the code through command line like in PA3. We can input our decisions and see the cards, money, and other bots’decisions from the terminal.

30 points: Your code is well-organized and has good coding style. There should be no excessive copy-past of code snippets that have the same functions, or confusing variable names, long lines, and print statements. The functions you use to make smarter bot actions should be separate from the previous functions so we can readily recognize them.

40  points:  A  ReadMe  ile  that  speciies  the  option  you  choose  for  the  project, contribution statement, how to run your program, and anything you think will be useful for us to know. If you do not instruct us how to run your program, a temporary 0 will be given. For Option 2 speciically, the ReadMe will be given more weights, because you

need to clearly explain to us how you make your bots“smarter”. The explanation will be graded based on its correctness (if indeed your approach may lead to smarter bots), clarity (if your explanation is readable and clear), and a balance of technical details and high-level ideas.

Bonus points

If you implement both Option 1 and Option 2, your submission will be graded for both. That is, your submission may get 400 points overall if everything works ine for both options.

Plagiarism

There are Texas Hold’em programs implemented in Python online. However, in this programming assignment, we have speciic requirements such as the data types you can use. You can refer to the ideas of how those programs were written, but you should not directly duplicate their codes. Put references to those resources in your submission. Discussion with your classmates is encouraged, but you should not directly duplicate their codes. If direct duplication of codes is found, you will receive no points in this assignments.

More notes about the assignment

1.   If you have any questions, please approach the TA and the instructor as soon as possible. Do not delay to the very last minute.

2.   The next two programming assignments and the project will be based on the irst one. So it would be the best if your programs have the lexibility to be extended, though this is not part of the grading.

References

[1] https://en.wikipedia.org/wiki/Texas_hold_%27em

*Table is adapted based on the Wikipedia source.