Previous overlappability assumed two words were already intersecting and computed based on this + some scaling factor.
Better to assume the following model:
1) Board is empty
2) Word 1 is placed at random
3) Word 2 is placed at random
What is the probability (ignoring edge-effects) that the placements of word1 and word2 are compatible?
Winds up being a function of not just letter overlaps, but also word lengths, since two short words are less likely collide even if they share no letters.
Simplified formula:
p(no_overlap) + p(overlap) x p(letter_match | overlap)
~ (1 - w1_area x w2_area / board_area) + (w1_area x w2_area / board_area) x num_same_letter_pairs / (w1_len x w2_len)
~ (1 - w1_len x w2_len / n^2) + (w1_len x w2_len / n^2) x get_num_overlaps() / (w1_len x w2_len)
= 1 + (get_num_overlaps() - w1_len x w2_len) / n^2
Previous overlappability assumed two words were already intersecting and computed based on this + some scaling factor.
Better to assume the following model: 1) Board is empty 2) Word 1 is placed at random 3) Word 2 is placed at random
What is the probability (ignoring edge-effects) that the placements of word1 and word2 are compatible?
Winds up being a function of not just letter overlaps, but also word lengths, since two short words are less likely collide even if they share no letters.
Simplified formula:
Combine this with https://github.com/jonadsimon/wonder-words-generator/issues/39 for more effective word set optimization. In practice, likely equates to choosing from only among the shortest words because the 1st term dominates.