A solver built in prolog that takes a fill-in puzzle and the corresponding word list, and holds if the puzzle is solvable (fillable with all the words).
# | h | # |
---|---|---|
_ | _ | _ |
# | _ | # |
WordList: hat
, bag
# | h | # |
---|---|---|
b | a | g |
# | t | # |
Puzzle = <puzzle>, WordList = <wordlist>, puzzle_solution(Puzzle, WordList).