Who is who?!

Peter Smit (1617346) and Eva van Viegen (1467840).

Game description

In this game, nine agents fight for honour. As they are all virtual they do not have families and have no parents or children. In the human world, however, these family bonds are really important. Therefore, this game is used to make artificial players argue about generations and family bonds.

In this game, there are three families. To make reasoning easier, every family consists of three generations of one agent each. Each of these families has the same generations, and for the purpose of this game, all agents in the same generation have the same age. The goal of this game is to determine the families and the generations within these families. Another goal is to find out what the other agents know about this.

In the first four rounds, every agent has to answer questions about the state of the world. An agent answers questions until he makes a mistake, or answered five questions correctly. Then it is the turn of the next agent. In the first and in the third round, the agent has to answer questions about the families. Those question are like: �Are agent 1 and agent 2 in the same family?�. The answer to this question can be either yes (�1�) or no (�0�). In the second and fourth round, the agent has to answer questions about generations. Those questions are like: �Is agent 1 younger/ same age/ older than agent 2?�. The answer to this question can me either younger (�0�), same age (�1�), or older (�2�).

By answering these questions correctly, the agent gets one point, and earns another question. Not all agents know which question is asked, because they are a little lazy. Of course the agent the question is asked to pays attention, as well as two other randomly chosen eavesdropping agents.

In the other rounds (rounds 5-10), each agent gets a randomly generated question, and has to determine which other agent has to answer this question. The question is then asked to this agent. When the answer is answered incorrectly, the agent that determined this agent is rewarded points. No points are rewarded for answering a question correctly. After ten rounds, the game ends. The agent with the most points wins.

Storing and updating knowledge

The agents use Kripke models to reason about the actual state of the world and the knowledge of other agents about the actual state of the world. Every state represents a possible way to give each agent a family and a generation. Every agent is only part of one family, and has only one generation. When the order of families would also matter, there would be 9! = 362,880 different possibilities. The order of the families does not matter in this game, so in this game, there are only 9!/3! = 60480 different ways to give each agent a family and a generation. In the model used by the system there are therefore 60480 states.

When the game starts all agents know that one of these 60480 states is the right state and they also know that all the other agents know this. Therefore there is an equivalence relation between all Kripke states, for the agent and also for his knowledge about the knowledge of the other agents. To make the accessibility relations equivalence relations, they should be symmetrical, transitive and serial, which is the same as reflexive and euclidean. Because of these properties, the agent only has to store if a state is still possible, with all the current information and if he thinks another agent thinks a state is still possible.

To reason about knowledge, there is a class called AgentKnowledge in this program. Each agent has one AgentKnowledge object for each agent including himself. In this object is the information about the knowledge of the other agents handled, and also the knowledge of the agent himself. The possible families are stored in an ArrayList and the possible family configurations are stored in an ArrayList of ArrayLists kGroups.

When new family information is added, then all family configurations that are not consistent with that information are deleted from kGroups. New generation information, is just stored in a HashSet of OlderThan objects. In the function called createPossibleBeliefs, a random possible state consistent with the known OlderThan relations is generated, based on the kGroups that are left. This is done by shuffling the kGroups and then pick the first consistent state that is generated.

When an agent eavesdrops, it updates the information on the current state in the same way as above, and it updates the knowledge of the agent the question was asked to too. This other agent his knowledge update, happens in exactly the same way, although in this case it is not representing the agent his own knowledge, but his knowledge about the knowledge of the other agent.

In the first four rounds, when simple questions are asked about the world, the agent checks his current belief state and answers the question according to his belief state.

To determine to which other agent a question is asked to in the second phase of the game, an agent first determines the most likely answer according to his own knowledge of the world. The agent does this by simply counting the amount of states consistent with each possible answer. This answer is assumed to be the right answer by the agent. It then does the same for the knowledge he has of the knowledge of the other two agents. The agent that is least likely to pick the same answer as he would is selected to answer the question.

Game representation

To represent the game in a good way, a graphic user interface is not necessary. Therefore the terminal is used to present the questions and the answers to the question. A summary of the information used by the agents to determine the answer to a question is also displayed in the terminal. To make all information displayed readable, we integrated a delay of three second after each first order question. For the second order questions, no delay was necessary, because it thinks long enough. There is no information given about the update of the Kripke models, as it is useless to give a representation of the Kripke states that are deleted. After gathering new information, Kripke states that are not consistent information are deleted, and the belief state is updated when there is no accessibility relation to the belief state anymore.

Discussion

This game is constructed in such a way that the agents are able to reason about the world with sure knowledge. If they know something about the current state, they know it for sure. This is the easiest way to make a consistent reasoning system. Because the game was constructed like this, its use is not to show some particularly interesting reasoning skills. It merely shows a human observer how incredibly impractical it is to reason completely logically about the real world.

At first sight it may look weird to reason with the current belief state only in the first four rounds. There are not many situations in which calculating the amount of Kripke states for each possible answer, gives a much better chance of giving the right answer. As it is quite heavy to calculate this for each question, it is better to answer these questions according to the belief state. In the second phase of the game, there are much less possible states left, therefore it is computationally doable to calculate these probabilities. With this kind of reasoning it is also shown that it is undoable to reason about other agent�s knowledge without uncertainty, and how little is actually known about the knowledge of other agents.

The source code