A-Lounsbury / pysimultaneous

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

Pareto Optimality #12

Closed A-Lounsbury closed 3 months ago

A-Lounsbury commented 3 months ago

Add functionality that distinguishes between Pareto optimal outcomes and non-Pareto optimal outcomes.

Should be able to take from functions in gt.

A-Lounsbury commented 3 months ago

Translated PO from gt except for the long comments. Need to test.

A-Lounsbury commented 3 months ago

The following test works as expected:

bos = [
    [
        [[2, 1], [0, 0]],
        [[0, 0], [1, 2]]
    ]
]
G = SimGame(2)
G.enterData(2, [2, 2], bos)
print(G.paretoOptimal([0, 0]))
print(G.paretoOptimal([1, 0]))
print(G.paretoOptimal([0, 1]))
print(G.paretoOptimal([1, 1]))

That is, the output is

True        
False       
False       
True 

Closing for now.