Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Game Theory Program (Python or Java) 1) Your code should ask the user for input to run in Random or Manual mode. Next, regardless of

Game Theory Program (Python or Java)

1) Your code should ask the user for input to run in Random or Manual mode. Next, regardless of the mode the user entered the code ask the user for the number of rows and columns of the normal form. Your code should be able to handle sizes of 1x1 to 9x9 without any display issues.

2) If the random mode is selected the application will display the strategy spaces and payoffs of players 1 and 2. Note in random mode the random payoffs are integers that range from -99 to 99.

3) The application will display the normal form of the game. Make sure your code can handle normal forms of size 1x1 to 9x9 without alignment issues. Notice that player1 strategies are dynamically name A1, A2 and for player2 B1, B2

4) Display the Pure Nash Equilibrium by replacing the numerical value of the best response by an H in the normal form. Also output the Pure Nash Equilibrium(s). If there is no Pure Nash Equilibrium still output the normal form with replacing the numerical value of the best response by an H and stated there are no Pure Nash Equilibrium.

5) Create random beliefs then calculate the Expected Payoffs and Best Response(s) for players 1 and 2. Pay attention to the formatting and notation of your output.

6) Calculate the Expected Payoffs for players 1 and 2 with the actual mix that uses the random generated beliefs in step 6. Pay attention to the formatting and notation of your output.

7) In random mode if the normal form is 2x2 and there is no Pure Nash Equilibrium then calculate the indifference probabilities of players 1 and 2.

8) In manual mode get user input for the rows, columns and payoffs. Then display the Normal form and the Pure Nash Equilibrium information.

9) If the Normal Form is 2x2 and the game does not have a Pure Nash Equilibrium then calculate players 1 and 2 Indifferent Mix Probabilities.

image text in transcribed

RANDOM MODE 3) If the random mode is selected the application will display the strategy spaces and payoffs of players 1 and 2. Note in random mode the random payoffs are integers that range from -99 to Example: Player: Player1's strategies [A1, A2, A3, A4, A5) Player: Player1's payoffs -79, 54, 33, 55, -27, 32, -97 59, -98, -59, -96, 41, 37, 46 19, 25, 89, -64, 54, -98, 91 14, 45, -59, 50, 5, 83, -48 28, 32, 33, -75, 13, -50, 44 Player: Player2's strategies {B1, B2 , , 4, 5, 6, 7} Player: Player2's payoffs -92, -6, 78, -60, -69, 2, 82 64, -56, 77, -71, -19, -81, -14 8, -88, -69, -93, -42, -95, 2:3 -95, 49, 25, -31, -18, 18, 75 -11,-40, -10, -76, -22, 76, 75 4) The application will display the normal form of the game. Make sure your code can handle normal forms of size 1x1 to 9x9 without alignment issues. Notice that player1 strategies are dynamically name A1, A2... and for player2 B1, B2 Example: Display Normal Form B1 B2 B3 B4 B5 B6 B7 A1 C-79,-92) 54,-6 33,78 C55,-60) C-27,-69)C32,2 C-97,82 I A2 I C59,64 C-98,-56 C-59,-77 C-96,-71) 41,-19) 37,-81)C 46,-14) I A3 l ( 19,-8 ) I (-25,-88) ' ( 89,-69) I (-64,-93) ' ( 54,-42) (-98,-95) I ( 91,23 ) l A4 C14,-95) 45,49) C-59,25C50,-31) C5,-18) 83,18C-48,75 A5 I ( 28,-11) I ( 32,-40) ( 33,-10) I (-75,-76) (-13,-22) I (-50,76 ) I ( 44,75 ) I RANDOM MODE 3) If the random mode is selected the application will display the strategy spaces and payoffs of players 1 and 2. Note in random mode the random payoffs are integers that range from -99 to Example: Player: Player1's strategies [A1, A2, A3, A4, A5) Player: Player1's payoffs -79, 54, 33, 55, -27, 32, -97 59, -98, -59, -96, 41, 37, 46 19, 25, 89, -64, 54, -98, 91 14, 45, -59, 50, 5, 83, -48 28, 32, 33, -75, 13, -50, 44 Player: Player2's strategies {B1, B2 , , 4, 5, 6, 7} Player: Player2's payoffs -92, -6, 78, -60, -69, 2, 82 64, -56, 77, -71, -19, -81, -14 8, -88, -69, -93, -42, -95, 2:3 -95, 49, 25, -31, -18, 18, 75 -11,-40, -10, -76, -22, 76, 75 4) The application will display the normal form of the game. Make sure your code can handle normal forms of size 1x1 to 9x9 without alignment issues. Notice that player1 strategies are dynamically name A1, A2... and for player2 B1, B2 Example: Display Normal Form B1 B2 B3 B4 B5 B6 B7 A1 C-79,-92) 54,-6 33,78 C55,-60) C-27,-69)C32,2 C-97,82 I A2 I C59,64 C-98,-56 C-59,-77 C-96,-71) 41,-19) 37,-81)C 46,-14) I A3 l ( 19,-8 ) I (-25,-88) ' ( 89,-69) I (-64,-93) ' ( 54,-42) (-98,-95) I ( 91,23 ) l A4 C14,-95) 45,49) C-59,25C50,-31) C5,-18) 83,18C-48,75 A5 I ( 28,-11) I ( 32,-40) ( 33,-10) I (-75,-76) (-13,-22) I (-50,76 ) I ( 44,75 )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Eric Redmond ,Jim Wilson

1st Edition

1934356921, 978-1934356920

More Books

Students also viewed these Databases questions