Solve it, don't brute-force it

Reaching for nested loops or itertools to search every combination works for toy sizes and then falls off a cliff. These tutorials take a classic optimization problem — assignment, knapsack, scheduling, routing, packing, graph problems — show the brute-force version and why it explodes, then model it and hand it to quicopt: a few lines, solved in Python. Every code block is run against the live free tier before it lands here.

Your brute force is too slow

Nested loops / itertools blowing up? Recognize the optimization problem and pick the model.

One example per problem class

Not sure which problem you have? Start from the class instead: a complete, runnable script for LP, QP, MILP, MINLP, QUBO, PUBO and NLP, each with its real output.

Want a tutorial for your problem class? Tell us what you're optimizing.