Optimization tool that reorders a playlist into a DJ set with smooth transitions and an intentional energy flow. A scoring function rates a candidate ordering (lower = better); optimization algorithms minimize that score.
University assessment project covering an AI module (SE_14) and a Testing module (SE_10).
- Scoring — pure-function penalties for harmonic flow (Camelot wheel), tempo flow (BPM difference), and energy-shape deviation, combined into a weighted composite score.
- Algorithms — simulated annealing (primary optimizer), random shuffle and greedy nearest-neighbor as baselines.
- Data —
Trackdataclass plus loaders; thedataset/folder holds CSV input.
The full specification lives in docs/dj-set-planner.md.
- Python 3.10+
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"pytest # full suite
pytest --cov=scoring --cov=algorithms --cov=data # with coverage
pytest tests/test_camelot.py -v # one moduleTarget coverage on scoring and algorithm modules: >85%.
ruff check .
mypy scoring algorithms datascoring/ Camelot, tempo, energy and composite scorer
algorithms/ simulated annealing and baseline optimizers
data/ Track model and dataset loaders
dataset/ Input CSVs
tests/ pytest suite
docs/ Specification and roadmap
notebooks/ Jupyter experiments (import from modules; no logic in notebooks)