feat: implement fair scoring algorithm for card sorting challenge
Replaces simple position-based scoring with sophisticated sequence alignment algorithm: - Longest Common Subsequence (50% weight): Rewards cards in correct relative order - Exact Position Matches (30% weight): Rewards cards in exact correct positions - Sequence Organization (20% weight): Uses inversion counting to measure organization Key improvements: - Handles shifts gracefully (e.g. [2,3,4,5,1] vs [1,2,3,4,5] gets significant credit) - Provides detailed scoring breakdown with component analysis - Shows specific metrics (cards in order, exact matches) - Fair assessment that doesn't penalize shifted sequences Algorithm uses sequence alignment principles similar to Levenshtein distance but tailored specifically for this educational sorting task. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2079
src/web_generator.py
2079
src/web_generator.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user