HomeAlgorithms & AICode Fingerprint Winnowing Diagram (2D)

Code Fingerprint Winnowing Diagram (2D)

Interactive 2D winnowing algorithm simulator: two code submissions are tokenized, k-gram hashed and drawn both as a draggable token strip and as a raw hash-value plot, so you can see exactly which local-minimum hashes the winnowing window keeps as fingerprints and why renamed variables fool a checker but a rewrite doesn't.

Algorithms & AI2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-ai-topic-45 ↗ Open standalone

Automated code checkers in AI-driven education platforms don't diff raw text — they tokenize submissions by grammatical role, hash overlapping k-grams, and keep only local-minimum hashes via the winnowing algorithm, then compare the resulting fingerprint sets with a Jaccard index. This 2D simulator draws two code submissions as two draggable, zoomable rows of coloured tokens with a sweeping scan window and gold arcs linking every matching fingerprint, and pairs that with a second panel plotting the raw k-gram hash values themselves — the literal curve winnowing slides its window across to pick out local minima. Choose how submission B was derived from A (identical copy, renamed variables, reordered blocks, or a full rewrite), then watch both panels update live together with the similarity score, matching-fingerprint count, and token counts on each side.

⚙ Under the hood

Interactive 2D winnowing algorithm simulator: two code submissions are tokenized by grammatical role, k-gram hashed, and drawn as a draggable, zoomable token strip plus a raw hash-value plot showing exactly which local-minimum hashes the winnowing window keeps as fingerprints — the same technique automated code checkers use to flag plagiarism.

algorithmsplagiarism-detectionhashingcode-analysisai-educationwinnowing

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)