jonadsimon / wonder-words-generator

Generates WonderWords puzzles
Apache License 2.0
2 stars 0 forks source link

Add a board_cnt object that tracks the overlaps #26

Closed jonadsimon closed 2 years ago

jonadsimon commented 2 years ago

Add a parallel board object that tracks the number of overlaps in each position

This allows us to easily enforce multiple other types of constraints e.g. distributional, per row/column overlaps, single-word non-overlaps, etc

jonadsimon commented 2 years ago

Added a moderately-efficient version in parameterized_board_generator_fixed_overlaps.mzn.

For input "couch" w/ packing constant 1.2:

  1. orginal runtime: 1.9s
  2. runtime with naive board_cnt implementation: 28.4s
  3. runtime with optimized board_cnt implementation: 13.6s

So still ~7x slower to even just instantiate, but better than the naive version which was 15x slower

jonadsimon commented 2 years ago

Not worth it, slows things down too much, discard this avenue of inquiry