You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support Equilibria should "return all the equlibria" , so I would expect also the mixed equilibria. But it doesn't. The game from example has (p, 1) with p in <0, 2/7> but the function only returns (0,1).
I know that returning all the equlibria in case of infinite number of ne is not the possible. However, I would expect to get the "limit points", as this function is able to calculate mixed equlilibria as in case of Rock Paper Scissors game.
Code:
import nashpy
import numpy as np
n_game = nashpy.Game(np.array([[-3, 3], [-3, 5]]), np.array([[2, 7], [4, 2]]))
for ne in n_game.support_enumeration():
print("Found Nash Equilibrium: ", ne)
mixed_nash_p1 = np.array([0.2857, 1 - 0.2857])
mixed_nash_p2 = np.array([1.0, 0.0])
print("Is (0.2857, 1.0) a best response? ", n_game.is_best_response(mixed_nash_p1, mixed_nash_p2))
print("Is (0.18, 1.0) a best response? ", n_game.is_best_response(np.array([0.18, 0.82]), np.array([1, 0])))
Output:
Found Nash Equilibrium: (array([0., 1.]), array([1., 0.]))
Is (0.2857, 1.0) a best response? (True, True)
Is (0.18, 1.0) a best response? (True, True)
The text was updated successfully, but these errors were encountered:
Thanks for this, you're absolutely right that we should find a way to improve things here. The game is degenerate so the behaviour is somewhat expected but the usual warnings that pop up in some cases don't occur here.
We should essentially find a way to implement your implicit suggestion which is to get the limit points. I can open that up as a separate issue or discussion about implementation can occur here.
Support Equilibria should "return all the equlibria" , so I would expect also the mixed equilibria. But it doesn't. The game from example has (p, 1) with p in <0, 2/7> but the function only returns (0,1).
I know that returning all the equlibria in case of infinite number of ne is not the possible. However, I would expect to get the "limit points", as this function is able to calculate mixed equlilibria as in case of Rock Paper Scissors game.
Code:
Output:
The text was updated successfully, but these errors were encountered: