This guide helps you get up and running quickly with the Solver Course project — from installation to running your first optimization.
First, fork the repository (optional) and clone it locally:
git clone https://github.com/SENATOROVAI/name-solver-course.git
cd name-solver-courseWe recommend using a virtual environment:
python3 -m venv venv
source venv/bin/activate # macOS / Linux
venv\Scripts\activate # WindowsInstall required packages:
pip install -r requirements.txtIf you are using a package manager like Poetry:
poetry installname-solver-course/
│
├── docs/ # GitHub Pages & documentation
├── theory/ # Mathematical derivations
├── implementation/ # Python solver code
├── experiments/ # Notebooks and benchmarks
├── tests/ # Test suite
├── README.md
├── QUICKSTART.md
├── LICENSE
└── requirements.txt
A minimal usage example with a quadratic objective:
import numpy as np
def f(x):
return np.sum(x**2)
def grad(x):
return 2*x
# Initial guess
x0 = np.array([5.0, -3.0, 2.0])
x_opt = optimizer.minimize(f, grad, x0)
print("Optimal x:", x_opt)Save this as example.py and run:
python example.pyYou can explore interactive notebooks in the experiments/ folder:
jupyter notebookOr with JupyterLab:
jupyter labIf you added tests to the repository:
pytestEnsure all tests pass before submitting PRs.
Benchmark scripts in experiments/ produce performance graphs:
python experiments/quadratic_tests.pyAdd your own benchmarks or compare with SciPy’s solver.
- Check code style:
black .
flake8 .- Format with:
isort .If you run into issues:
✔ Check TROUBLESHOOTING.md
✔ Search existing issues
✔ Open a new issue with full description
You should now be able to:
- Understand solver internals
- Run optimization examples
- Contribute code with confidence
Happy optimizing!