Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presented by: Alon Dean Ron Moisescu Supervised by: Dr. Rachel Ben-Eliyahu - Zohary.

Similar presentations


Presentation on theme: "Presented by: Alon Dean Ron Moisescu Supervised by: Dr. Rachel Ben-Eliyahu - Zohary."— Presentation transcript:

1 Presented by: Alon Dean Ron Moisescu Supervised by: Dr. Rachel Ben-Eliyahu - Zohary

2 Web-based Clue game + Automatic player2 Introduction: Background – The Clue Project objectives Tools Algorithm Background The algorithm

3 Web-based Clue game + Automatic player3 A murder was committed – Your goal is to find out who, where and how committed the murder There are 21 cards, 6 Weapons, 6 Characters and 9 Rooms One card of each type is chosen at random and hidden in an envelope - this is the solution to the mystery The rest of the cards are mixed and divided between the players

4 Web-based Clue game + Automatic player4 Each player, in his turn, asks a question. For example: Do you have Mr. Green, Knife or Billiard Room? The question passes between the players until an answer is found The player who guesses which cards were hidden in the envelope is the winner

5 Web-based Clue game + Automatic player5 Create a web site for the game Users will be able to login, signup, create a game table or play the game The game will include an automatic player based on AI algorithms The game can be played online or through email notifications

6 Web-based Clue game + Automatic player6 The site was built using PHP We used MySQL DataBase for storing the site’s data The Site will be hosted by an Apache Server.

7 Web-based Clue game + Automatic player7 The agent’s algorithm consists of four parts: Knowledge base Concluding new data from players’ answers Creating questions Answer questions

8 Web-based Clue game + Automatic player8 DPLL – a highly efficient algorithm, based on backtracking algorithm, for solving satisfiability problems: Backtracking Algorithm: Choose a literal Assign a truth value to it Simplify the formula Recursively check if the new formula is satisfiable If this procedure was not successful, start again with a false value. DPLL enhances the backtracking algorithm by: starting with unit clauses – clauses with only 1 literal Elimination of Pure literals.

9 Web-based Clue game + Automatic player9 The Clue Axioms: 1. There is exactly one card of each category in the Envelope 2. Every card is held by some player 3. If some card is held by Player N, it is not held by all other Players M ≠ N

10 Web-based Clue game + Automatic player10 Each question consists of one card of each category The category with the least remaining cards is the category which will eliminate the most options and will dictate constraints to the other categories From that category we will choose the card which is known not to be held by the biggest number of players. After analyzing the data we have on the chosen card, we can decide which player we want to direct the question to We can direct a question to a certain player by using the rule of the game that states that if a player cant answer a question – that question is directed to the following player

11 Web-based Clue game + Automatic player11 The Data table will hold all the players as columns and cards as rows: In each [i][j] There will be a note indicating whether a player is: Holding the card Not holding the card Might hold the card + Turn number DB actions: When we write to the DataBase that a player holds a card we will also write that all the other players does not have that card. When we write to the DataBase that a player does not have a card we will check if we can infer from that that the player holds another card.

12 Web-based Clue game + Automatic player12 When the agent asks a question there are two cases: If player x shows the agent a card – the agent will insert into the database that player x holds that card. If player x can’t answer the question and passes the question to the next player – the agent will insert into the database that player x does not hold any of these cards. First case: When the agent asks a question

13 Web-based Clue game + Automatic player13 If a player says that he doesn’t have any of the cards we’ll write that to the DataBase If a player shows a card we have to correlate the data we have with the new data. If after correlating the data we can’t know for sure which card was shown we will mark these cards as “might” in the DataBase and write down the turn’s number in order to make future conclusions If the agent will have to answer a question we will mark which card was shown to which player so that in the future the agent will reveal as little data as possible Second case: When another player asks a question

14 Web-based Clue game + Automatic player14 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room We know that Player 3 has the Dining Room card

15 Web-based Clue game + Automatic player15 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe O,3 Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White O,3 Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room On turn #3, Player 2 was asked : “Do you have Lead Pipe, Mrs. White or Dining Room?”, and Player 2 answered the question

16 Web-based Clue game + Automatic player16 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe O,3 Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White O,3 V Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room We found out that Player 4 has the Mrs. White card

17 Web-based Clue game + Automatic player17 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe O,3 Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White XO,3 V Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room Updating the database after receiving new information…

18 Web-based Clue game + Automatic player18 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe O,3 Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White XX V Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room We replaced the O,3 mark with X, Now we’ll check whether we can infer new information from that

19 Web-based Clue game + Automatic player19 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe V Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White XX V Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room We inferred that Player 2 holds the Lead Pipe card

20 Web-based Clue game + Automatic player20 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe XVXXXX Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White XX V Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room

21 Web-based Clue game + Automatic player21 Cards/PlayersPlayer 1Player 2Player 3Player 4Player 5Player 6 Weapons Rope Lead Pipe XVXXXX Knife Wrench Candlestick Revolver Characters Col Mustard Miss Scarlet Mrs White XXXVXX Mrs Peacock Mr Green Captain Brown Room Hall Lounge Dining Room XXVXXX Kitchen Ball Room Conservatory Billiard Room Library Study Room

22 Web-based Clue game + Automatic player22 We created a web site, using PHP and Databases, in which you can sign up, login, create a table, join a table, and play the game We created a detailed design of the Agent’s algorithm which includes creating a question, answering a question, and deriving data from other players’ answers Our next step is to implement the Agent’s algorithm, based on our designs, and integrate it into the web site.


Download ppt "Presented by: Alon Dean Ron Moisescu Supervised by: Dr. Rachel Ben-Eliyahu - Zohary."

Similar presentations


Ads by Google