DCS 440: Artificial Intelligence
Project, Part 2, Fall 2000
Project Knowledge Base


Due in Class, Wednesday Nov 1

Contents
Objectives
Hand In
Step 1
Step 2
Step 3
Tips
Objectives

By this point in the semester, you are familiar enough with ideas from programming in Prolog to actually experiment with some code. With this assignment, you will work out some concrete Prolog data structures for your project, and you will formalize some specific knowledge for your project using these data structures. The idea is to carefully model one example of your program in action, and show that you have the knowledge and data structures right to support your agent's action for that example.

Once you have finished this example, two tasks will remain. You will have to ``scale up'' the knowledge and data structures you use, so that they can handle the full range of cases that your agent will encounter; this task will have to be substantially completed by the next stage of the project, on November 15. And you will have to make sure that the algorithms that your agent implements for problems such as search and decision-making give the right answers in a reasonable amount of time; this doesn't have to be all worked out until the final project handin on December 13.

Obviously then, it is not part of this assignment to formalize all the knowledge that your agent will need; as described more below, just a couple examples is enough. And you don't have to be able to search to find the way your program will use this knowledge; as described more below, you will just give the answer as part of the query you use and check that things work out.


Hand In

Hand in a brief but well-commented Prolog program, by email or on paper, by class time.


Step 1

Pick a concrete example case that your agent will handle. (You should have at least one such example from Part 1 of the project.) Design a Prolog data structure to represent the conclusion or action that you want your program to calculate in response to this scenario. Like the node data structure that you have just devised for the path-searching homework, this data structure should encapsulate three things:

  • the conclusion or action, itself (for example, ``you can get there from here'')
  • the evidence that you used to derive the conclusion or action, if the conclusion requires you to assemble several facts from your knowledge base (for example, ``take these bits of pathway'')
  • the evaluation of the conclusion or action that makes your agent prefer it, if you expect your agent to have to compare this concusion or action to others in order to act appropriately (for example, ``the distance is 220 meters'')

Use this data structure to define a single fact in your program of the form

instance(T).
The term that you specify for T in this fact should be the concrete instance of your data structure that your agent must construct to handle the example case that you are investigating.


Step 2

Associate the current problem instance with a term p, however is appropriate for your project. For example, p might be a representation of time or a situation or some more complex data structure. Then formalize the information that describes this problem instance as facts about p.


Step 3

Define a relation

answer(p,X).
This should relates a problem instance p faced by your agent to an object X (represented by the kind of term that you've worked out in Step 1) if X represents a solution to problem instance p.

Add whatever further general knowledge you need to make sure the query

instance(X), answer(p,X).
succeeds, where p indexes the specific problem that you formalized in Step 2. This shows that you've gotten a handle on the example case that you're looking at.


Tips and Clarification

  • If your evaluation component depends on search (for example to look ahead in a game-playing situation), you can bypass the search at this stage (for example in a game by evaluating the immediate consequences of a move).
  • If your agent determines a simple multistep plan of action, the example you work out should involve building (or recognizing) the whole plan.
  • If you aim to build multiple agents interacting with one another, your answer should represent a complete scenario, in which each of the agents determines its own course of action.