Sale!

CSCI 5260 Project 3 Guess Who? solved

Original price was: $40.00.Current price is: $35.00. $29.75

Category:

Description

5/5 - (2 votes)

Artificial Intelligence Page 1 | 4
Game Description
Background
Guess Who? is a logic-based game distributed by Milton Bradley, and now, Hasbro. Your opponent chooses a character
with a set of characteristics. You have perfect information about all characters and all of their characteristics, as follows,
and as specified in file characters.csv:
NAME GENDER HAIR COLOR BALD HAT EYES MUSTACHE BEARD GLASSES EARRINGS
ALEX Male Black FALSE FALSE Brown TRUE FALSE FALSE FALSE
ALFRED Male Red FALSE FALSE Blue TRUE FALSE FALSE FALSE
ANITA Female White FALSE FALSE Blue FALSE FALSE FALSE FALSE
ANNE Female Black FALSE FALSE Brown FALSE FALSE FALSE TRUE
BERNARD Male Brown FALSE TRUE Brown FALSE FALSE FALSE FALSE
BILL Male Red TRUE FALSE Brown FALSE TRUE FALSE FALSE
CHARLES Male Blonde FALSE FALSE Brown TRUE FALSE FALSE FALSE
CLAIRE Female Red FALSE TRUE Brown FALSE FALSE TRUE FALSE
DAVID Male Blonde FALSE FALSE Brown FALSE TRUE FALSE FALSE
ERIC Male Blonde FALSE TRUE Brown FALSE FALSE FALSE FALSE
FRANS Male Red FALSE FALSE Brown FALSE FALSE FALSE FALSE
GEORGE Male White FALSE TRUE Brown FALSE FALSE FALSE FALSE
HERMAN Male Red TRUE FALSE Brown FALSE FALSE FALSE FALSE
JOE Male Blonde FALSE FALSE Brown FALSE FALSE TRUE FALSE
MARIA Female Brown FALSE TRUE Brown FALSE FALSE FALSE TRUE
MAX Male Black FALSE FALSE Brown TRUE FALSE FALSE FALSE
PAUL Male White FALSE FALSE Brown FALSE FALSE TRUE FALSE
PETER Male White FALSE FALSE Blue FALSE FALSE FALSE FALSE
PHILIP Male Black FALSE FALSE Brown FALSE TRUE FALSE FALSE
RICHARD Male Brown TRUE FALSE Brown TRUE TRUE FALSE FALSE
ROBERT Male Red FALSE FALSE Blue FALSE FALSE FALSE FALSE
SAM Male White TRUE FALSE Brown FALSE FALSE TRUE FALSE
SUSAN Female Blonde FALSE FALSE Brown FALSE FALSE FALSE TRUE
TOM Male Black TRUE FALSE Blue FALSE FALSE TRUE FALSE
Purpose
The ultimate purpose of this assignment is to write a program that interrogates your knowledge base through a series of
Asks in order to deduce which player it has chosen (no peeking!).
CSCI 5260 – Artificial Intelligence Page 2 | 4
Part 1 – Propositional Logic
Description
1. Given the information above, fully develop the game’s propositional logic description in a Word Document. You
must include the propositional logic descriptions of each character and characteristic.
Coding Requirements
Download the project3.zip file from D2L. You will find two files contained in the archive:
• project3_guess_who.py – contains the driver program.
• KnowledgeBase.py – contains a KnowledgeBase class that will represent what you know about the game and your
opponent’s character. Reads the characters from characters.csv into the characters list, as a dictionary object for
each character.
• characters.csv – contains the initial set of characteristics for each character.
• (The other files will be used in Part 2).
2. Add code to the KnowledgeBase that randomly sets one character as the item your driver program will attempt to
guess.
3. Add one or more ASK methods to the KnowledgeBase, as needed, for you to interrogate it. These should return only
True or False.
4. Add an ASK_VARS method to the KnowledgeBase that interrogates the knowledge base and returns a list of the
characters that match the query.
5. Add at least one TELL method to the KnowledgeBase to inform the knowledge base about new information that
you have found.
6. Write a driver program (in project3_guess_who.py) that:
a. Uses the ASK, ASK_VARS, and TELL methods to interrogate the knowledge base.
b. The program must choose the questions to ask and it must provide the information gained back to the
knowledge base.
c. The program must successfully solve the puzzle for each run. Allow the user to run the program again or
exit.
Part 2 – Propositional Logic with Relationships
A Family Matter
As it turns out, all 24 of the Guess Who? characters are related. Relationships include:
Spouse (assume if two people are the parents of the same children, they are married), Sibling, Sister, Brother, Niece,
Nephew, Cousin, Parent, Mother, Father, Grandparent, Grandfather, Grandmother, Great-Grandparent, GreatGrandmother, Great-Grandfather
I have provided a list of all parent/child relationships in file relationships.json.
Propositional Logic
7. In a separate section of your Project 3 Word Document, define the relationships noted above using propositional
logic.
Coding Requirements
From project3.zip, you will find the following two files:
• project3_family.py – Defines the Relationships class that reads the parent relationships from the json file.
• relationships.json – Defines all Parent relationships in the data.
• Note: You will need to import and use the KnowledgeBase from project3_guess_who.py to answer some of these
questions.
CSCI 5260 – Artificial Intelligence Page 3 | 4
8. Using your propositional logic definitions from question 7, implement one method for each relationship noted that
returns True if x is the {relationship} of y. So, parent(“Anita”,”Paul”) would return True based on relationships.json,
but parent(“Anita”,”George”) returns False.
9. Using this code, create an output CSV file that lists all relationship pairs contained in the family tree. This file should
be in the following format:
Relationship_Name, Person_X, Person_Y
10. Write a driver program that allows me to interact with your Knowledge Base. Allow me to manually ask questions
about the relationships above.
Submission and Due Date
Interim Submission
An interim submission is required for this assignment to the Project 3 Interim dropbox. You should briefly detail the
progress you’ve made and note any problems or questions you have. Submit a screenshot of one function that you have
completed.
Failure to submit the interim submission ON TIME will result in the loss of 10% from the final Project 3 grade. Until you
have feedback on this dropbox, you will not be allowed to submit the final solution. This is to encourage you to work on
this early!
Project 3 interim submission is due to the D2L dropbox at or before Friday, March 12, 2020 at 11:59 PM
Final Submission
Submit all code and documentation, zipped into an archive: Surname_Project3.zip. The folder should be self-contained in
a way that allows the code to run. You can assume that I have all necessary libraries installed.
Your archive should contain the following files:
1. project3_guess_who.py
2. project3_family.py
3. KnowledgeBase.py
4. Relationships.py
5. relationships.json
6. all_relationships.csv – The relationships learned in question 9.
7. A Word Document containing your propositional logic definitions and any explanations or assumptions.
Project 3 is due to the D2L dropbox at or before Monday, March 22 at 11:59 PM
The rubric appears on the following page.
CSCI 5260 – Artificial Intelligence Page 4 | 4
Rubric
A letter grade will be assigned to each of the following, and will translate to a numeric grade based on the scale in the
syllabus, and averaged into an overall percentage. As a reminder, anything below a C translates to an F by University
Graduate School policy. It is provided here to appropriately reflect each level.
For source code, please add comments so I can understand what is going on. Believe it or not, some student code is
difficult to read. 😀
A B C D F Zero
A A- B+ B B- C+ C C- D+ D F 0
Propositional Logic
Q1 – Logic Description
Q2 – Random
Character
Q3 – ASK
Q4 – ASK_VARS
Q5 – TELL
Q6 – Driver
Propositional Logic with Relationships
Q7 – Relationships
Q8 – Relationship
Implementations
Q9 – Relationship CSV
Q10 – Driver Program