Modify solve() to only compute ceilings (_ceiling solver calls) for resources that appear in the objective function (where obj_factors[k] != 0). This avoids unnecessary 20s ceiling solves for resources not contributing to the maximize criterion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| docs/superpowers | ||
| templates | ||
| .gitignore | ||
| .python-version | ||
| agents.txt | ||
| constraint_validator.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| printer.py | ||
| pyproject.toml | ||
| README.md | ||
| solve.py | ||
| uv.lock | ||
| web_solve.py | ||
DWS city resource solver
This is a Python program which solves for maximal resources in days without strife with Google OR tool's CP-SAT solver.
See solve.py for details.
web_solve.py provides a web UI to churn through various scenarios more easily.
agents.txt is all the auction and brotherhood agents I could copy and paste from the Nomad's guide in early June 2026 it and the way agents work in solve.py may be out of date.
printer.py provides some code for verbose logging in solve.py.
WARNING: Vibe Coded
If you see something nonsensical that's why.
For me this work is disposable so issues with quality resulting from LLM usage is fine.
I suspect regardless of LLM usage solve.py would be a rats nest either way due to the fact that encoding constraints is both tedious and obtuse although the LLM following in the footsteps of mathemeticians with overly terse variable names doesn't help.
Running
There's a dockerfile and docker compose if you like using those but otherwise you'll need Google OR tools for just the optimizer in solve.py if you're running that directly, in a repl or a notebook.
You'll need Flask if you wanna run the web UI.
If you're lazy and not choosing docker you can use uv to run this.