Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A priceless diamond, the Pink Panther, will be displayed at the Vancouver Jewel

ID: 3849867 • Letter: A

Question

A priceless diamond, the Pink Panther, will be displayed at the Vancouver Jewel Museum. You have been hired to write the software for the security system that will be used to monitor the room holding the diamond for display. If some dastardly jewel thief attempts to steal the diamond, the alarm must trigger. The system, museum, shown in the figure below, has three alarm sensors:

a “laser" motion sensor, laser

a broken window sensor, window

a door lock sensor, door

The three sensors are wired in one circuit around the room as shown. The door sensor is connected directly to the power. The laser and the window are each preceded by circuit breakers, c1 and c2, which stop the power at that point if the fuse has blown. If they are “ok" the power flows through it to the next sensor.

You will use the Definite Clause Deduction applet available at http://www.aispace.org to implement the system. This will involve writing a short set of axioms to define the problem and running some queries. First, take a look at the sample knowledge base called “An Electrical System" and understand how it works. You can use the “Move Subtree" button to get a better view of the answer to queries. Your program will use some of the same predicates used here to represent the flow of electricity through a set of switches and devices. You should use the following predicates for your system, where [x] tells you that the number of parameters the predicate takes is x: connected_to[2]

system[1]
window_broken[1]
circuit_ok[1]
hasSensor[2]
door_open[1]
live[1]
triggered[1]
laser_interrupted[1]
alarm_triggered[1]

Test out the system by stating different facts such as door_open(door) and performing queries such as live(laser) or triggered(door). Remember that uppercase letters denote variables and lowercase denote particular values or instances. Make sure disabling a circuit breaker causes any dependent sensors to fail to trigger an alarm.

a) [15 points] Implement the system using the Definite Clause applet, and paste the contents of the .pl file you created into your submission.

b) [15 points] Provide a screenshot of the resulting proof deduction tree for the query alarm_triggered(X) when the power is on, all the circuits are ok and the window is broken. You can get this by clicking on “View Proof Deduction" and then selecting the true node from the tree.

laser power C1 door C2 window

Explanation / Answer

You will use the
Denite Clause Deduction
applet available at
http://www.aispace.org/deduction/index.shtml
to implement the system. This will involve writing a short setof denite clauses to represent the problem and running some queries. First, take a lookat the sample knowledge base called “An Electrical System” and understand how it works(click on the
File
menu and select
LoadSampleKnowledgeBase
). I suggest you to drawthe system modeled by the KB. Then play with the applet by adding and removing atoms(e.g.,
up(s3)
) and by asking queries. You can use the “Move Subtree” button to get abetter view of the answer to queries.Your program will use some of the same predicates to represent the ow of electricitythrough a set of switches and devices. You should use the following predicates for yoursystem, where [
x
] tells you that the number of parameters the predicate takes is
x
:
connected_to[2] system[1] window_broken[1]circuit_ok[1] hasSensor[2] door_open[1]live[1] triggered[1] laser_interrupted[1]alarm_triggered[1]
Test out the system by stating dierent facts such as
door open(door)
and performingqueries such as
live(laser)
or
triggered(door)
. Remember that uppercase letters de-note variables and lowercase denote particular values or instances. Make sure setting o acircuit breaker causes the system to fail to sound the alarm.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote