# water-jug
# John E. Laird
# University of Michigan
# May 24, 2005
# Soar version 8.6.1

###
### ABSTRACT. These Soar productions implement the water-jug task.
### The task is to find the sequence of steps that fill the three gallon 
### jug with one gallon of water.  There are a well that has an infinite
### amount of water, a five gallon jug, and a three gallon jug.
###

###
### DESCRIPTION. The task problem space has three operators: empty, 
### fill, and pour. Empty empties a jug into the well. Fill fills up
### a jug from the well. Pour pours some or all of the contents
### from one jug into the other jug. Pour can only pour out the contents 
### of the jug until the source is empty or the destination is full.
### State Structure: Each jug has slots to record its capacity [volume],
### the amount of water it contains [contents], and the capacity 
### available [empty] which is the volume minus the contents.
###   (state s1 ^jug j1)
###   (jug j1 ^volume v1 ^contents c1 ^empty f1),
### where v1, c1, and f1 are numbers.
###

## Added Record for recording last operator, and using that knowledge to control search
## It is commented out. This greatly reduces the search for a solution
