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
- Host: GitHub
- URL: https://github.com/fredwangwang/linear-programming-example
- Owner: fredwangwang
- License: mit
- Created: 2020-11-24T05:08:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-24T06:16:43.000Z (over 5 years ago)
- Last Synced: 2025-02-05T05:22:52.474Z (over 1 year ago)
- Topics: linear-programming, lp, nash-equilibrium, rock-paper-scissors
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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]
```