Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.37 KB

File metadata and controls

47 lines (31 loc) · 1.37 KB

About

Solution to blog post for adversarial binary search game

How to use

uv run python game.py -h

usage: Steve game [-h] [-n COUNT] [-f FILE_EXPORT] [-b] [-c] [-s]

Solves adverserial bisection search game

options:
  -h, --help            show this help message and exit
  -n, --count COUNT     provide problem size, default = 3
  -f, --file-export FILE_EXPORT
                        export problem in provided mps file - combine with flags -disable-steve/--disable-candidate
  -b, --disable-steve   when enabled, model for Steve strategy is not generated
  -c, --disable-candidate
                        when enabled, model for candidate strategy is not generated
  -s, --dont-solve      when enabled, solver does not run, can be used to just export model in mps file

Naive way for size 100 (should take approx 1h on laptop)

uv run python game.py -n 100

To solve as rational problem

Export problem as mps file

uv run python game.py --file-export "problem.mps" --disable-candidate --dont-solve --count 100

solve with SoPlex

soplex  --loadset=exact.set  -X problem.mps

Requires setting file exact.set for forcing into rational solver mode.