two novel prolog assignments
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.
prolog assignments programming languages