CS370: Symbolic Programming

Homework

HW#4-3 - The game of ¡°¹¬Âîºü¡±: com VS. human

Download problem here(pdf).

HW#4-2 - The game of ¡°¹¬Âîºü¡±: in Prolog

Download problem here(pdf).
Download program for server and client. (for SICStus Prolog 3.12)
Download program for server and client. (for SICStus Prolog 4.0)

HW#4-1 - The game of ¡°¹¬Âîºü¡±: Report

Download problem here(pdf).

HW#3 - RNA Secondary Structure Prediction

Download problem here(pdf).
Download energy data for stacking nucleotide pairs and various loops. (The data is from M.Zuker's MFOLD)
Your program doesn't need to read the energy data. (You can pre-define energy data as Prolog prediates.)

HW#2 - Morphology Analyzer

Download problem here(pdf).
Download dictionary here.
You will find built-in predicate 'name' very useful.
Consult SICStus manual or textbook(p.141) for more detail.

HW#1 - Wolf, duck and bag of corns (Two sub-problems)

Wolf, duck and bag of conrs puzzle:
A farmer wants to cross the river with a wolf, a duck and a bag of corns.
The farmer hired a boat to cross the river.
But in crossing the river by boat, the farmer could carry only himself and a single one of the three - the wolf, the duck, or the bag of corns.
Without farmer's surveillance, the wolf would eat the duck, and the duck would eat the corns.
How did the farmer manage to cross the river?

1-1. How will you represent the X puzzle above with Prolog?
Think of at least two representations, and discuss their pros and cons X.

1-2. Write a Prolog program that generates a possible solution.
Notice that we will read your program to see how declarative your program is.


Due: 3/22, 3:30pm (that is, before the class starts)

We hope you all have fun, and learn a lot!