Commit graph

4 commits

Author SHA1 Message Date
Michael Winter 2fe8737cfe Improve target range factor with relative distance
- Replace harsh 1/(1+distance) with bounded relative scoring
- Factor > 1.0 when moving toward target, < 1.0 when moving away
- Minimum factor 0.1 to avoid zero weights
- Test with max_path=150 shows reaching ~90% of 2-octave target
2026-03-14 03:05:23 +01:00
Michael Winter 737f1e4886 Refactor edge weights with DCA and CLI improvements
- Implement DCA (Dissonant Counterpoint Algorithm) to favor voice changes
- Track actual pitch changes in voice_stay_count (not graph indices)
- Add CLI weight arguments: --weight-melodic, --weight-contrary-motion,
  --weight-hamiltonian, --weight-dca, --weight-target-range
- DCA probability = (sum of stay_counts for changing voices) / (sum of all)
- Test with --weight-dca 100 shows frequent voice changes
2026-03-14 02:44:30 +01:00
Michael Winter 61149597c9 Add target range weight for rising register
- Add --target-range CLI option (in octaves)
- Implement target_range weight in PathFinder
- Add test for target range weight
- Add --max-path to README
2026-03-13 22:04:48 +01:00
Michael Winter 0698d01d85 Refactor into src/ module with caching and CLI improvements
- Split monolithic compact_sets.py into modular src/ directory
- Add graph caching (pickle + JSON) with --cache-dir option
- Add --output-dir, --rebuild-cache, --no-cache CLI options
- Default seed is now None (random) instead of 42
- Add .gitignore entries for cache/ and output/
2026-03-13 18:38:38 +01:00