bnelearn.tests.test_matrix_FP module

bnelearn.tests.test_matrix_FP.init_setup(game, strategy, initial_beliefs)[source]
bnelearn.tests.test_matrix_FP.strat_to_player(strategy, batch_size, player_position=None)[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlayMixedStrategy_BoS()[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlayMixedStrategy_MP()[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlayMixedStrategy_PD()[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlaySmoothStrategy_BoS()[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlaySmoothStrategy_MP()[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlaySmoothStrategy_PD()[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlayStrategy_BoS()[source]

initial_beliefs = [None] * 2 #initial_beliefs[0] = torch.tensor([[0.8308,0.5793],[0.4064,0.4113]], device=device) <- converges #initial_beliefs[1] = torch.tensor([[0.2753,0.4043],[0.1596,0.6916]], device=device) <- converges

#initial_beliefs[0] = torch.tensor([[0.5892,0.4108],[0.4970,0.5030]], device=device) #<- converges #initial_beliefs[1] = torch.tensor([[0.4051,0.5949],[0.1875,0.8125]], device=device) #<- converges

#initial_beliefs[0] = torch.tensor([[0.59,0.41],[0.49,0.51]], device=device) #<- converges #initial_beliefs[1] = torch.tensor([[0.41,0.59],[0.19,0.81]], device=device) #<- converges

#initial_beliefs[0] = torch.tensor([[0.59,0.41],[0.49,0.51]], device=device) #<- converges #initial_beliefs[1] = torch.tensor([[0.59,0.41],[0.49,0.51]], device=device) #<- converges

#initial_beliefs[0] = torch.tensor([[0.59,0.41],[0.41,0.59]], device=device) #<- converges #initial_beliefs[1] = torch.tensor([[0.59,0.41],[0.41,0.59]], device=device) #<- converges

#initial_beliefs[0] = torch.tensor([[59.5,40.5],[40.5,59.5]], device=device) #<- converges #initial_beliefs[1] = torch.tensor([[59.5,40.5],[40.5,59.5]], device=device) #<- converges

#initial_beliefs[0] = torch.tensor([[59,41],[49,51]], device=device) #<- doesn’t converge #initial_beliefs[1] = torch.tensor([[41,59],[19,81]], device=device) #<- doens’t converge

#initial_beliefs[0] = torch.tensor([[0.6,0.4],[0.5,0.5]], device=device) #<- doesn’t converge #initial_beliefs[1] = torch.tensor([[0.4,0.6],[0.1875,0.8125]], device=device) #<- doesn’t converge

#initial_beliefs[0] = torch.tensor([[0.6,0.4],[0.5,0.5]], device=device) #<- doesn’t converge #initial_beliefs[1] = torch.tensor([[0.4,0.6],[0.2,0.8]], device=device) #<- doesn’t converge

#initial_beliefs = torch.tensor([[60,41],[41,60]], device=device) #<- doesn’t converge #initial_beliefs[1] = torch.tensor([[60,41],[41,60]], device=device) #<- doesn’t converge

# -> It converges if the init is very close to MNE play for at least one player but not exactly! # -> My hypotheses: it has to be close to cycle. If it is exact, # it is indifferent and takes a random direction, diverging away. # -> $$ The question now is whether we should/have track historical actions with integer!? # -> No. In Fudenberg (1999) - Learning and Equilirbium, p. 389 # they init FP with (1,sqrt(2)), so obviously use float as well.

bnelearn.tests.test_matrix_FP.test_FictitiousPlayStrategy_MP()[source]
bnelearn.tests.test_matrix_FP.test_FictitiousPlayStrategy_PD()[source]
bnelearn.tests.test_matrix_FP.train(epochs, players, strats, tau_update=1, tau=0.99, tau_minimum=0.0001)[source]