CS470/570
Artificial Intelligence
Spring 2008
Project #3 part 1
Due: Monday, April 7th

For this subproject you just need to write a Prolog knowledge base to handle the problem of identifying rooms as being safe or unsafe (not yet deadly) with respect to pits. Thus, only breezes and pits need to be considered.

One thing to be careful of is that a room is only safe if there are no breezes around it, not if its unknown whether there are breezes around it.

Here is an example that actually works backwards. Given a pit (for example, asserta(pit(3,3))) it will correctly tell you where breezes are. And given a set of four breezes it can tell you the square in the middle of them is not safe (in fact its deadly). But it mistakenly assumes squares for which no breeze is defined have no breeze.

Another consideration are edges and corners where there may be less than 4 neighboring sqaures.

Turn in: the knowledge base, a brief description of how it works, and a sample output showing some simple queries testing the KB's ability to identify safe, unsafe, etc. rooms.