| Server IP : 172.64.80.1 / Your IP : 172.70.50.62 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/phd_code/old/ |
Upload File : |
import numpy as np
# Example payoff matrix
payoff_matrix = np.array([[0.7, 0.15, 0.15], [0.2, 0.2, 0.6]])
# Example chosen strategies
player1_strategy = 1
player2_strategy = 1
# Calculate payoffs
player1_payoff = payoff_matrix[player1_strategy, player2_strategy]
player2_payoff = payoff_matrix[player2_strategy, player1_strategy]
# Print the payoffs
print("Player 1 Payoff:", player1_payoff)
print("Player 2 Payoff:", player2_payoff)