C463/B551 Artificial Intelligence

Homework 3

Due date: Thursday, January 31, 2008.

Ex. 1 Write a function based on the simple reflex-based agent that implements a linear variation of the game of life. Consider that the environment is a list of integer numbers and the agent can perceive one element of the list at a time and its closest neighbors (left and right). The number to be examined is the one in the middle. This observation will result in the following conditions:

You must implement two additional functions. One of them tests the three numbers and returns the state, called interpret, that takes the percept (the 3 numbers) and returns one of the 3 states (for now we can call them 1, 2, or 3). The second one called match_action, must take as parameters the three numbers and the state, perform the appropriate action, and return the result. The agent function must combine these two either using the model from the handouts, or by nested calls (your choice).

You can always add more functions to your program if you think it's necessary.

Implement this in either Lisp or Python. The following files contain a test function and a test example for the agent function to write. You can edit one of these files and submit it.
agent1.el
agent1.py

Ex. 2 Design an agent acting as a spam filter. Describe the environment, the perception, the actions that it can take. Specify which type of agent it is (table based, reflex, etc.). Show a few examples of rules used by the agent function. If the agent has a learning component, what would it entail?

This part should be in pseudocode/plain English, also by email.

Turn in: all the functions in one python or elisp file and a text file for the second exercise, by email only.