Optimal alignment path DP cost cell (low → high)

Weighted Edit Distance: Cost Landscape & Alignment Path

Every pair of strings has a dynamic-programming cost matrix hidden inside it: a grid where cell (i, j) holds the minimum cost to turn the first i characters of one string into the first j characters of the other. This simulator renders that matrix as a real 2D heatmap, animates the actual cell-by-cell fill order the recurrence requires, and then traces the real optimal alignment path — the exact sequence of insertions, deletions and substitutions — as a glowing line back through the grid. Sliders let you set independent, asymmetric costs for each operation type, and the whole heatmap, edit script and path recompute live, showing how the cheapest edit sequence bends when one kind of edit becomes more expensive than the others.