Description
The term “expert system” can refer to a computer program that is capable of decision making
and can be used for diagnostics and classification. Furthermore, since the underlying
knowledge used by the system is typically provided by a human expert, a rudimentary expert
system is a relatively simple project. For this assignment, you will practice with branching
and looping control structures in Python 3 by creating your own expert system that uses
user input to “guess” film titles.
While designing your program you must first select two well-known movie “subgenres” from
www.filmsite.org/subgenres2.html. To clarify, you are not to select one of the “main” film
genres (e.g., “comedy”, “action”, etc.) and must instead select two more specific subgenres
(e.g., “spaghetti western”, “romantic comedy”, “alien invasion”, etc.) for which you will
provide the expert knowledge.
The subgenres you select must appear on the list at www.filmsite.org/subgenres2.html and
once you have selected which subgenres you will use, you must choose at least ten movies
for each subgenre (i.e., at least twenty movies total). You will then need to determine what
questions your expert system could ask the user in order to determine which of your film is
being referenced by the user.
All of the work described above should be completed in full before you begin programming
your submission.
COMP1405A/1005A (Fall 2019) − “Introduction to Computer Science I”
Specification for Assignment 3 of 6
As a clarifying example, the partial transcript such an expert system might follow for the
subgenre of “Animated Christmas Special” could be as follows (with user input in red):
Does the film use stop-motion animation? no
Was the film based on a story by Dr. Seuss? yes
“How the Grinch Stole Christmas” is the film title.
…
Does the film use stop-motion animation? yes
“Rudolph the Red-Nosed Reindeer” is the film title.
The expert system you are designing MUST NOT ask questions unnecessarily. In the partial
transcript above, for instance, if the user answered “yes” then the system should have been
able to correctly conclude that the film was “Rudolph the Red-Nosed Reindeer” if it was
indeed the only “Animated Christmas Special” that used stop-motion animation.
Although you will not submit your rough work for grading, you are required to create a
flowchart before you begin programming. If you visit an instructor or teaching assistant you
must present your flowchart before you will receive any assistance with implementation.
When designing your expert system algorithm, you must consider the following:
a) before doing anything else, your expert system must ask the user if they require
instructions; if the user requests instructions then the program must display the
instructions before proceeding with the program, but if the user does not then the
program must proceed without providing instructions
b) your program must first ask the user for the subgenre and, as long as the user selects
one of the two subgenres covered by your system, your expert system can begin
asking questions; n.b., this is the only part of the program where you need to
“validate” the input provided by the user – the program should end if the user does
not select one of the two subgenres you have specified
c) each and every subsequent question asked by your program must be a “yes-or-no”
question, and the user must be able to use both uppercase and lowercase letters when
typing their answers to each and every question asked by your program
d) once your program has successfully identified the film, it must ask the user if they
would like to quit the program and, if they elect not to quit, then your program must
loop back to the stage where it first asked the user to select the subgenre
Please also note that your submission MUST include, in a detailed comment section at the
beginning of your code, a list of the distinguishing elements of each of your selected movies.
The purpose of this section is to facilitate the marking process, as your comments will allow
the teaching assistants to know whether your system is working properly or not. As a
clarifying example, a comment like:
# “How the Grinch Stole Christmas” – animated, written by Dr. Seuss, etc.
…must appear for EACH movie and must specify EVERY distinguishing feature used.
COMP1405A/1005A (Fall 2019) − “Introduction to Computer Science I”
Specification for Assignment 3 of 6
This program (along with any other program submitted in this class) must be a completely
original work, authored by you and you alone, prepared for this offering (i.e., Fall 2019) of
COMP1405A or COMP1005A. Do not discuss this assignment with anyone except the
instructors or the teaching assistants, and do not copy images or source code samples from
the internet or any other source.