User Tools

Site Tools


Assignment 11

Lab 0 - Consider a different Appearance Theme for your Blog

Go and look at 5 other blogs from this class. Use them as a reference to make yours look better.

Lab 1 - Prolog

In section 1.1 you can launch a Prolog interpreter applet by hitting the button.

mortal(M) :- man(M).

In the Program window, paste the above in. Then in the Query box at the top, ask it whether socrates was mortal. Remember lower case means constant, upper case means variable.


(Deliverable) Now, write a program about how the dining hall only has chocolate soft serve icecream and not vanilla. When I ask for what flavors are there, it tells me no there is no vanilla, but yes there is chocolate.

Put the code in Setting Up Pastebin or just save it somewhere (I want both this lab and the next to be in one blogpost).

More prolog programs:

Lab 2 - Answer Set Programming

Here's the ASP Solver:

Take a look at this program. Paste it into the big window. Click the Solve button.

sibling(X,Y) :- parent(Z,X), parent(Z,Y).
mother(X,Y) :- parent(X,Y), female(X).
uncle(X,Y) :- parent(Z, Y), sibling(Z,X), male(X).
female(joan). female(jill). male(jack).
parent(joan, jack). parent(joan, jill). 

(Deliverable) Next, take that program above and use it to represent your own family.

If you are still interested, try playing around with the Event Calculas code. Remember, it's like inertia– it stays true if it is true.

#const t_max=8.
#domain fluent(F).
#domain t(T).
#domain event(E).
initiated(F,T) :-
terminated(F,T) :-
holds(F,T+1) :-
	not terminated(F,T).
-holds(F,T+1) :-
	not initiated(F,T).
holds(F,T+1) :-
-holds(F,T+1) :-
holds(F,0) :- initially(F).
-holds(F,0) :- not initially(F).

For lparse arguments in the text box below, you must pass in:


Now, create an event using “happens(E,T)” that terminates the heat.

(Deliverable) Paste it all in Setting Up Pastebin as a prolog program and put it in a blogpost. Make sure you store your output somewhere on your blogpost as well.

Write about how you understand time in logic programming. Explain how in logic programming time happens all at once.

Work on your Final Projects!

Put your final presentations in the presentation folder I shared on Google Drive.

'nuff said.

/soe/sherol/.html/teaching/data/pages/epgy/ai13/assignment_11.txt · Last modified: 2013/07/30 13:58 by ffpaladin