• Media type: E-Article
  • Title: Two novel prolog assignments
  • Contributor: Mohr, Jonathan
  • imprint: Association for Computing Machinery (ACM), 2009
  • Published in: ACM SIGCSE Bulletin
  • Language: English
  • DOI: 10.1145/1595496.1562991
  • ISSN: 0097-8418
  • Keywords: General Earth and Planetary Sciences ; General Environmental Science
  • Origination:
  • Footnote:
  • Description: <jats:p>This paper describes two simple but novel Prolog assignments. The first extends the family tree example featured in many Prolog textbooks to the problem of tracing the line of succession to the throne of the British royal family. The solution uses a first-child/next-sibling representation of the royal family tree, since the birth order of a royal's children is significant when determining the order of succession. The second is a simple game that combines features of chess and rock-paper-scissors. The game board is a directed graph, rather than a simple grid.</jats:p>