A-Lounsbury / pysimultaneous

A class for handling simultaneous games with any number of players
0 stars 0 forks source link

Fix computeKStrategies #21

Closed A-Lounsbury closed 3 months ago

A-Lounsbury commented 3 months ago

This test

krmodel = [
    [
        [[2, 12], [5, 6], [9, 0]],
        [[0, 24], [19, 5], [10, 10]],
        [[1, 3], [7, 5], [5, 25]],
    ]
]
G = SimGame(2)
G.enterData(2, [3, 3], krmodel)
print(G.kMatrix)
G.printKMatrix()

results in

EU: [0.0, 0.0]
(1, 2) (1, 2) (1, 2) (1, 2)
(1, 2) (1, 2) (1, 2) (1, 2)
(1, 2) (1, 2) (1, 2) (1, 2)
(1, 2) (1, 2) (1, 2) (1, 2)

There should be (0, 0), (1, 0), and (0, 2) also in self.kStrategies.

A-Lounsbury commented 3 months ago

Fixed. There was a problem with the isBestResponse function.