User Tools

Site Tools


sc330_f2016:prolog1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
sc330_f2016:prolog1 [2018/10/19 21:52]
morse
sc330_f2016:prolog1 [2018/10/19 21:52]
morse
Line 35: Line 35:
   *Just copy and paste the all_different function. It simply checks to make sure each item in the list is unique.   *Just copy and paste the all_different function. It simply checks to make sure each item in the list is unique.
   *Check spelling errors. There is no such thing as misspelled atoms. So speigel and spiegel are both valid but different.   *Check spelling errors. There is no such thing as misspelled atoms. So speigel and spiegel are both valid but different.
-  *Once you have a solution, check it against the solutions we provide for the puzzles. ​ If you're getting something different, you might not have constrained the solution by extracting all of the information from the puzzle. ​ (Or you might have just miscoded one of the facts.)+  *Once you have a solution, check it against the solutions we provide for the puzzles. ​ If you're getting something different, you might not have sufficiently ​constrained the solution by extracting all of the information from the puzzle. ​ (Or you might have just miscoded one of the facts.)
   *These problems make extensive use of the "​not"​ operator, \+.   *These problems make extensive use of the "​not"​ operator, \+.
     * \+ works as you expect when all variables are completely bound.     * \+ works as you expect when all variables are completely bound.
     * If E contains unbound variables, \+E will try to find bindings to that will make E true. If Successful \+ will fail.     * If E contains unbound variables, \+E will try to find bindings to that will make E true. If Successful \+ will fail.
   * This lab is taken from [[http://​www.cis.upenn.edu/​~matuszek/​cis554-2015/​Assignments/​prolog-1-logic-puzzles.html|this site]]. There may be additional resources there.   * This lab is taken from [[http://​www.cis.upenn.edu/​~matuszek/​cis554-2015/​Assignments/​prolog-1-logic-puzzles.html|this site]]. There may be additional resources there.
sc330_f2016/prolog1.txt ยท Last modified: 2021/06/30 23:42 (external edit)