CSci 431

Exercise set #7

Due: Monday, Dec. 2  

 (20 points, divided more or less evenly amongst the following three problems)

Prolog program

Write a prolog program which will use a database of facts (which you should enter in as facts along with the program) which will determine if a given donor is suitable for a given patient. A top-level predicate may look like:

compatable(Donor, Patient) :-
	Donor(george, o),
	Patient(alea, o).

Include enough facts (of the form person, type, and rules for the compatable rule) in your file so that I can test your program.

The solution (all facts and rules) should be placed in the file expert.pro in your handins folder.

 


Final Assignment

Due:  Wednesday, Dec. 11 (last day of class).

Week of Nov. 25:  From Rich/Knight, pages 525-526: (This exercise will be kept).

Implement the backpropagation learning algorithm for a fully connected three-layer network.  Be sure to include parameters for layer sizes, learning rate, and number of training epochs.  Test your implementation first on the OR problem:

 

Input Vector Target Output Vector
(0.0, 0.0)  (0.1)
(0.0, 1.0)  (0.9)
(1.0, 0.0)  (0.9)
(1.0, 1.0)  (0.9)

 

Then on the XOR problem:

Input Vector Target Output Vector
(0.0, 0.0)  (0.1)
(0.0, 1.0)  (0.9)
(1.0, 0.0)  (0.9)
(1.0, 1.0)  (0.1)

Initially, use two hidden units, set the learning coefficient to 0.35, and run for 6000 training epochs.  Modify your program to use a momentum factor of 0.9.  Did adding momentum significantly decrease the number of training epochs required for learning?

You may use any language you want, except one which incorporates matrix operations.  Lisp will work, but this problem is mostly matrix arithmetic.  The algorithm is given on page 581 if you want to get started early:  use g(x) = 1/(1+exp(-x)) and note that for this function g'(x) = g(x)*(1-g(x)).  See also Rich/Knight starting page 504 for more details (I will make copies when we discuss the algorithm, earlier if asked).

(20 - 30 points)


Some Dates:

 


Any questions? Please ask!