Due: May. 5, 2009 CS 480 Spring 2009 Dr. Duric Final Project In your final project you will put together all your functions that you have written in Homeworks 2-4 to create a poker game simulation. If you still have problems figuring out the game rules please check http://en.wikipedia.org/wiki/Texas_hold%27em#Rules You will create a variable number of PokerAgent's with memory (up to ten), and a PokerMaster function. You will have to decide which mechanism to use to create PokerAgent's. The following rules will be used for betting: (i) there are no blinds, (ii) to keep playing after each round the players (PokerAgent's) place one chip. There are two ways for a player (PokerAgent) to win: (i) all other players have folded (win by default), (ii) after the last round one of the remaining players has the best hand (showdown). The player who is left with 3 or fewer chips loses by default and stops playing. PokerMaster is the main function that takes three arguments: - N: # of PokerAgent's, - M: # of playing chips per PokerAgent, - K: # of games to play/simulate. PokerMaster will create/initialize N poker agents with M chips each. It will run simulations and create reports of results. In each game it will call the Dealer function and distribute cards to the PokerAgent's still playing: (i) two hole cards to each player in the 1st round, (ii) 3 communal cards in the 2nd, (iii) 1 communal card in the 3rd, (iv) 1 communal card in the 4th round. After each round it will collect chips from the PokerAgent's still in the game and count out those that have folded. As the game is played the PokerMaster determines if any player has won by default (i.e. all other players folded) and it also decides the winner at the end of each game. The winner is given the chips in the betting pile. PokerAgent's maintain their score, i.e. current cards and chips count. PokerAgent's should determine whether to keep playing (i.e. keep betting) or fold based on the quality of the hand they hold (see Hwk #4). Whenever they decide to keep playing they should place a chip to a betting pile (PokerMaster maintains it). When they fold or the game ends they should submit their cards to the PokerMaster who will determine the winner. You can write as many helper functions, including all necessary reporting functions, as you wish. You can use any mechanism you wish to implement PokerAgent's, but they must include all requirements mentioned above. [You can use advanced Lisp mechanisms to implement your agents or you can create 10 different agent functions.] You will test your function sufficiently, i.e. you will run multiple poker tournaments by your PokerMaster and PokerAgent's. In addition, we will post detailed testing requirements, including rules and requirements for a poker tournament in which your program (PokerAgent will play). Instructions for submission: ---------------------- (1) Using script or dribble, you are to capture the output of a Lisp session in which you successfully load and execute your code, showing sufficient testing of your function(s). (2) Send a SINGLE email to zduric@cs.gmu.edu formatted in the following way: - the subject field of the email should read: CS480 Final project Duric - the content of the email should be : (a) a cover sheet containing: Your name CS480 Spring 2009 Dr. Duric Final project A description of your program and all algorithms used. (b) a commented version of the Lisp code for the project and all functions used in it including any functions implement in homeworks. Comments at the top should include: Your name CS480 Spring 2009 Dr. Duric FInal Project (c) a printout of a captured Lisp session involving the execution(s) of the FInal project Lisp code As a safety precaution, always CC yourself when you submit homework this way and keep it around until it has been graded and returned.