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 a brief but well-commented Prolog program, by email or on paper, by class time.
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:
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.
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.
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.
|