select_backend
Choose a solver backend and initialize a persistent IPython kernel with the solver library, helper functions, and modeling instructions for constraint problems.
Instructions
Start solving a constraint problem: call this FIRST, once per problem.
Sets up a persistent IPython kernel preloaded with the backend's solver library and helper functions, and returns the modeling instructions for that backend. Calling it again recycles the kernel for a new problem (previous session state is cleared).
Backends:
pysat: Boolean satisfiability — feasibility, combinatorial search
maxsat: weighted optimization over Boolean constraints
z3: SMT — integers/reals/bitvectors, proofs, program verification
cpmpy: finite-domain constraint programming — scheduling, assignment, puzzles
clingo: Answer Set Programming — logic rules, defaults, reachability
didp: dynamic programming (state-space search) — routing, sequencing, packing
Unsure which backend fits? Read the resource mcp-solver://guide first.
Then iterate with python_exec (write, run, verify against the problem statement), and finish by calling submit_code with the final, verified, self-contained program. UNSAT / "no solution exists" is a valid outcome.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| solver | Yes |