This appendix provides more detail of several key features of my Prolog implementation of players and games. 1
In Chapter 4, I stressed that publicity was optional. I will now work out one way to implement this choice. It is easy to think of permissions as filters on the predicate subject to permission. To filter execution of the other player’s move2 predicate, I require players to invoke a new predicate, pubmove2 that shadows the unfiltered predicate move2:
The filtered predicate will fail unless it can pass the filter. 2 To see the difference that permission makes, consider UD1, who you will recall does not permit execution of his procedure.
As a consequence of the failure of the permit query, CC1, which uses pubmove2, will choose D when paired with UD1, not because UD will choose D. Rather, CC1 can’t find out what UD1 will do and defaults to D.