Evaluates a function from the IOHexperimenter Submodular problem class — a suite of submodular optimization problems on graphs, including Maximum Cut, Maximum Coverage, Maximum Influence, and Pack While Travel. All problems are binary maximization problems on {0, 1}^n.
- Install uv if you don't have it yet:
pip install uvNo extra setup is needed beyond having uv installed. The ioh package is resolved automatically.
Note: This snippet requires Python 3.10. The inline metadata enforces this via
requires-python = "==3.10". Make sure a Python 3.10 interpreter is available on your system.
uv run call_submodular_optimization.pyThe script creates GRAPH problem 2000 (MaxCut), evaluates it at the all-zeros bitstring, and prints the result. You can adjust the behavior by editing these variables in the script:
- Problem ID — the first argument to
ioh.get_problem()selects which problem to load (default:2000) eval_point— the bitstring at which the function is evaluated (default: all zeros)
Note: GRAPH problems take integer inputs in {0, 1}^n (not floats). The dimensionality is determined by the problem (i.e. the underlying graph) and cannot be set manually.
| ID Range | Problem Type | Count | Dimensions |
|---|---|---|---|
| 2000 – 2004 | MaxCut | 5 | 800 |
| 2100 – 2139 | MaxCoverage | 40 | 204 – 760 |
| 2200 – 2223 | MaxInfluence | 24 | 4039 |
| 2300 – 2308 | PackWhileTravel | 9 | 279 – 338090 |