The goal of this assignment is to put a physical robot into the
smart home environment to performs security duties by checking for
intruders in the home. To implement the robot decisions you will be
using CLIPS, the expert system shell already used for the last
assignment. Note that for the purpose of this assignment CLIPS has
been extended with access functions for the Lego Mindstorms robots.
The following CLIPS files contain the basic simulation of the home and the underlying facts and a set of example rules, respectively. This file is the LegOS program for the robot to allow it to be remotely controlled from CLIPS. You should not have to look at the simulation file for this assignment. The facts representing the state of the home and the implemented scenario are as follows:
Each room is indicated by an integer between 1 and 6, each of which maps to a room in Simhouse as follows: 1 = Bedroom 3, 2 = Bathroom 2, 3 = Hallway, 4 = Den, 5 = Livingroom, 6 = Kitchen
The location of the inhabitant in the home is determined using a set of occupancy sensors and represented as (location room# t/f) for each room, where (location 1 t), for example, indicates that there is someone in room 1
The status of the lights is indicated by (lights room# on/off) where (lights 1 on), for example, indicates that the lights in room 1 are turned on.
The status of the AC/Heating system are is represented by (ac room# cool/heat/off). Here each room is regulated individually and (ac 1 heat) implies that the control for room 1 is turned to heating.
The temperature in each room is represented by (temperature room# temp). For example, (temperature 1 70) indicates that the temperature in room 1 is currently 70 degrees.
The time is represented as (time Hr# Min#) with (time 7 45) representing 7:45 am. The time is measured in military time (i.e. 2:00 pm is (time 14 0) ).
There are a few additional facts in the environment. Of particular interest is here (power #WHr) which represents the electricity used since the beginning of the scenario.
The scenario implemented is a single inhabitant who prepares to go to work in the morning (and goes there at relatively irregular times) and comes back at around 5:00 pm in the afternoon. After she leaves there appears from time to time an intruder in the home.
In this part you are to design a set of rules that will monitor
and check for intruders (i.e. When someone entered the house after
the inhabitant left but before she returns at around 5:00 pm). To
verify the intruder the decision system should send the security
robot into the specific room. Here you will be using a LegoMindstorms
robot that is controlled via infrared control from the computer. You
will be provided with three basic commands for the robot, a move
command which moves the robot by a specified amount (set as a
duration for which to move the robot), a turn command which turns the
robot by a certain amount (again given in terms of a duration for
which the robot turns), and a query command which returns the sensor
values of the robot. You will be able to see the values of 3 of the
robot's sensors, two wheel encoders and a light sensor that will
measure the brightness of the floor. Each of the rooms that the robot
navigates (the den, the hallway, and the livingroom) will have a
different floor color.
Implement rules that determines the location of the intruder in the house.
Implement a set of rules that move the security robot to the specified room. You can use predefined motion patterns and the light sensor to make sure that you actually move to the correct room.
Graduate Students only: Implement rules for basic odometry that us the encoder values to keep track of the location of the robot.
Turn in: (1) your set of rules, (2) a short description of the rules, and (3) a short description of your experiences to get the robot compontnes to operate reliably.