Skip to content
whiteoutblackout edited this page Dec 25, 2014 · 2 revisions

Clue Assistant wiki

#INSTRUCTIONS#

  1. Compile clue.pl with prolog. All other files will be automatically loaded.
  2. Type main. to run clue.

#OVERVIEW OF FUNCTIONALITY# Clue assistant will aid a player keep track and make inferences of the cards of a clue game, and identify the culprits when known. The players, locations, weapons of the game are dynamic, so it will adjust to any version. Important features include the ability for the user to input questions he asked and the response, and the ability for the user to input questions other people asked and who, if any player, has answered. The user can prompt for suggestions from Clue assistant for questions to ask to infer the most useful information and knowledge. The user will have to options to check knowledge of database at all times, query lists of possible culprits, look up the list of players, weapons, and locations of the game. At any point of the game, if the clue assistant deduced the culprit, it will immediately notify the user of the culprits.

#SPECIAL FEATURES# ##Question Suggestion## Clue assistant features a question suggestion option to help users determine what to ask next to aid the clue assistant the most in inferring the culprits of the game. ###Algorithm Overview### Our algorithm chooses a "target" player rightmost of the current player for whom we do not already know all his cards for. The algorithm then generates a player, weapon, and location card that the "target" is not known to own, and everyone from the user, to the left, up to the target does not own (otherwise the question will be answered by someone else instead of the target). ###Heuristic### The idea of using the rightmost player as the target is that we have the potential to gain knowledge regarding all players from the user's left up to the target as not owning the cards in the question, which helps us determine the culprit. The more players we pass, the more we know, so we choose the right most player as the target.

##Tracking All Information for Knowledge Inference## Clue Assistant keeps track of all questions asked by all players, including question responses that the user does not see. Clue assistant cab reason and infer with this information to quickly determine the culprits to use of any information possible. ###Ways of Inferring Knowledge### In the Clue game, we can infer knowledge in the following ways: -once one player owns a card, no other player can own the card -the number of cards a player owns cannot exceed the number of cards in his hand -if all except one card of each type (player, location, weapon) are owned, then that card not owned must be the culprit, and no one else can own it (we can then deduce the culprit without knowing all cards in all player's hand). -when we see a player showing a card to another question, the card shown must be one of the 3 in the question in a way such that to satisfy all the questions the player responded to, the number of cards he owns must not exceed the number of cards in his hand. We are then able to reduce the cards that he possibly owns. -if we know he owns or doesn't any card of the 3 in the question, we can reduce the cards that a player possibly owns. -we eventually resolve the potential knowledge when there is only one possibility. ###Algorithm Overview### The algorithm considers the cards that a player must own as knowledge(P,C,owned), cards that player must not own as knowledge(P,C,unowned), and possible cards a player owns as potentialknowledge(P,{Cs},owned). The algorithm is as follows:

  • When a new knowledge(P,C,owned) is added:
    1. add the knowledge
    2. remove all potential knowledge for P that contains C
    3. add knowledge(P',C,unowned) for all P' not P
    4. generate culprits
  • When a new knowledge(P,C,unowned) is added:
    1. add the knowledge
    2. reduce potential knowledges for all players by removing C from the {Cs} in potentialknowledge(P,{Cs},owned) for all players. If a potentialknowledge became knowledge, add the new knowledge with the above algorithm.
    3. generate culprits
  • When a new potentialknowledge(P,{Cs},owned) is added:
    1. use the knowledge to reduce {Cs}
    2. assume P owns each of {Cs} and remove all C in {Cs} that results in P having more cards than the number of cards in hand.
    3. If the potentialknowledge became a knowledge, add the new knowledge with the above algorithm. Else, add the potentialknowledge
Clone this wiki locally