An open API service indexing awesome lists of open source software.

https://github.com/fredwangwang/linear-programming-example

example problems to get started with LP
https://github.com/fredwangwang/linear-programming-example

linear-programming lp nash-equilibrium rock-paper-scissors

Last synced: about 1 year ago
JSON representation

example problems to get started with LP

Awesome Lists containing this project

README

          

# LP example

this shows solving some sample linear programming problems, including:

- revenue maximization
- rock paper scissors nash equilibrium using maxmin

python3 main.py

```
normal vs explicit z:
sol:
[ 5666.66666667 11333.33333333 3000. ]
[ 5666.66666667 11333.33333333 3000. ]

obj:
71666.66666666667
71666.66666666667

rock paper scissors solution using cvxopt
expected value of the game: 0.0
best stragegy: [0.33333333 0.33333333 0.33333333]

rock paper scissors solution using cvxpy
expected value of the game: 0.0
best stragegy: [0.33333333 0.33333333 0.33333333]
rock paper scissors solution using cvxpy Matrix
expected value of the game: 0.0
best stragegy: [0.33333333 0.33333333 0.33333333]
```