Knowledge Games
Hans van Ditmarsch

Abstract:
In the board game Cluedo the players have to determine what the murder cards on 
the table are, by reasoning about their own cards, and about what they get to 
know of other players' cards in game actions. Typical for Cluedo is that a 
finite number of cards is dealt over a finite number of players, that the 
players can only see their own cards, and that cards do not change hands. We 
call these games knowledge games. A knowledge game that exemplifies most of the 
general features that we want to study, is the game for three players each 
holding one card. We describe game states, game actions, and their consequences.

A deal of cards is a function from cards to players. Two deals are 
indistinguishable for a player if they agree on his cards. The set of relevant 
deals is the set of deals that are publicly indistinguishable from the actual 
deal of cards. These are the deals that players still have to consider while 
reasoning about card possession. In the initial state of the game, the cards 
have been dealt but the players have not acquired knowledge about other 
players' cards. The initial state of the game is represented by a pointed 
multiagent $S5$ model on the set of deals where all players hold the same 
number of cards as in the actual deal. The point of the model is the actual 
deal. Accessibility is indistinguishability of deals. Propositional atoms 
describe that a player holds a card. Other knowledge game states are also $S5$, 
but agents may know more.

The properties of the agents in the initial state of a knowledge game are 
described by the theory $kgames = \{ deals, seedontknow \}$. $Deals$ is the 
disjunction of atomic state descriptions $\delta_{d'}$ of relevant deals $d'$. 
It expresses that exactly one of the relevant card deals must be actually the 
case. $Seedontknow$ expresses that a player considers deals, if and only if 
they correspond to what he knows about his own cards. Various agent properties 
follow from $kgames$, such as that every player knows his own cards and that 
every player holds a fixed number of cards, and different ways to describe 
ignorance. By a bisimulation proof we show that $kgames$ (uniquely) describes 
the model $I_d$ for the initial state of a knowledge game. We also characterize 
the knowledge game state where the cards have been dealt but where the players 
have not yet turned their cards. A theory $prekgames$ describes the model 
$preI_d$ for that state. State descriptions that are computed with standard 
methods for finite multiagent $S5$ models, are equivalent to our results. 

Game actions in knowledge games consist of card requests and responses to those 
requests, plus some other moves, such as announcing, or guessing, that you have 
won. A typical game action is that of a player showing a card (only) to another 
player. The remaining players see that a card is being shown, but cannot see 
which card. Questions and answers are combined in one format for game actions: 
a quintuple consisting of the requesting player, the question, the answering 
player, the answer, and the `publicity': what other players get to know about 
the answer. The question is a set of possible answers. The actual answer is one 
of those. Each possible answer is a set of worlds of the current game state. 
Not any set of worlds: an answer must be the union of classes of the partition 
of that state for the responding player. The question must cover the state: 
each world must be contained in a possible answer. All desirable constraints on 
`publicity', such as that the answering player controls the response, can be 
realized by formalizing it as a function from players to partitions of the 
question. The game action format also describes other conceivable game actions, 
sometimes by the trick of having a player respond to his own question. A game 
action is executable in a game state if the answer contains the point of that 
state. A game action minus the roles of the requesting and responding player 
corresponds to a pointed $S5$ frame on the set of possible answers: a game 
action frame. The next game state is a restriction of the direct product of the 
current game state and a game action frame.

This game action format is purely semantic: game actions are defined for a 
given game state. We introduce a general action language to describe game 
actions, and a corresponding notion of interpretation that we call local 
interpretation. The language $L^\Box_n$ for dynamic epistemic logic contains 
dynamic modal operators for, what we call, knowledge action types and knowledge 
actions. The basic programming constructs in the action language are test, 
sequence, choice, learning and local choice. The first four define the class of 
knowledge action types $KT$. From an action type we construct a knowledge 
action of that type by the operation of local choice. $KA$ is the class of 
knowledge actions. In the knowledge game for three players and three cards 
where player 1 holds red, player 2 holds white, and player 3 holds blue, the 
game action of 1 showing his red card to 2 is described by the knowledge action 
$L_{123} (!L_{12} ?r_1 \union L_{12} ?w_1 \union L_{12} ?b_1)$. This stands 
for: 1 and 2 learn that 1 holds red, and 1, 2 and 3 learn that either 1 and 2 
learn that 1 holds red, or that 1 and 2 learn that 1 holds white, or that 1 and 
2 learn that 1 holds blue.

The local interpretation of a knowledge action type is a relation between 
multiagent $S5$ models and their worlds. The `learning' operator is interpreted 
as follows: given a set of models that is the result of executing knowledge 
action type $\tau$ in a given model $M$, the result of executing `group $A$ of 
agents learn $\tau$' is the direct sum of that set of models plus access added 
for the agents `only in $A$': an agent cannot distinguish worlds in two 
different models in the direct sum if he does not occur in those models and if 
he could not distinguish their origins in $M$ under the interpretation of 
$\tau$. The local interpretation of a knowledge action in a state $(M,w)$ is 
derived from the interpretation of that action's type $\tau$ by choosing, 
determined by local choice, one model image in the interpretation of $\tau$ in 
$M$ and one world image for $w$ in that model image. It can be seen as a 
constraint on the state transformations induced by $\tau$. Bisimilarity of 
models and states is preserved after execution of knowledge types and actions.

Game actions are described by knowledge actions. To establish that 
correspondence, we define another notion of interpretation, called product 
interpretation. The knowledge action type frame of a knowledge action type is 
defined on the set of actions of that type. Access on this frame is determined 
by the structure of actions. The frame of a knowledge action is a pointed 
knowledge action type frame. The state transformation induced by that frame is 
the product interpretation of a knowledge action in an $S5$ state. The notions 
of local interpretation and product interpretation are the same, up to 
bisimilarity of states. They are not the same if the local interpretation of a 
knowledge action type in a model consists of models for different groups. A 
knowledge action describes a game action for a given game state, if there is an 
isomorphism between the game action frame for that game action and the 
knowledge action frame for that knowledge action. The isomorphism relates 
actions of the same type to possible answers to the question of the game 
action, such that the precondition of an action is satisfied in the worlds that 
the answer consists of. We suggest a procedure describe that constructs from a 
game action a knowledge action that describes it.

Apart from game actions we can describe many other communicative acts in 
$L^\Box_n$. We give examples. We describe suspicion, and we describe sequences 
of calls over a network. We compare our research to other recent work in the 
area of dynamic epistemics and multiagent systems. 

We have shown that all game states and all game actions in knowledge games can 
be formally described in a logical language. Given this formal description of 
games, we can start to think about optimal strategies for winning them. There 
are some formidable obstacles to overcome here. It is unclear what the 
individual preferences of a player are among the different questions he can 
ask. This requires a comparison of the partition refinements, i.e. the new game 
states, created by the possible answers to those questions. It also requires a 
(recursive) analysis of the questions that the next player can ask given those 
refinements. Even when we have individual preferences for all players, it is 
unclear what the mixed strategy equilibria are for such an imperfect 
information game. Finally someone may be able to answer the question, what is 
the value of Cluedo?