January 2017
Beginner to intermediate
446 pages
8h 46m
English
Another interesting application of logic programming is in solving puzzles. We can specify the conditions of a puzzle and the program will come up with a solution. In this section, we will specify various bits and pieces of information about four people and ask for the missing piece of information.
In the logic program, we specify the puzzle as follows:
The goal is the find the person who has a rabbit. Here are the full details about the four people:
Create a new Python file and import the following ...
Read now
Unlock full access