Initial Working Memory                        Goal
----------------------                        ----
monkey on floor                               - monkey has not eaten today
monkey holding nil
a on table
b on table
stick on floor
monkey has not eaten today



rule (0 bring bananas into room)
   if (table in room) [13]
   then + (bananas above table) [2,4]

rule (1 monkey sees bananas)
   if ()
   then + (monkey hungry for bananas) [2,4,5,7,8,10,11]

rule (2 monkey grasps bananas)
   if (monkey on table)  [8,9]
      (monkey hungry for bananas) [4,7,8,11]
      (monkey holding nil) [3,5,6]
      (a on b) [11,12]
      (bananas above table) [0,4]
   then + (monkey has bananas) [7]
        - (monkey holding nil) [3,5,6]

rule (3 monkey grasps stick)
   if (monkey on floor) [8,9]
      (monkey holding nil) [5,6]
      (stick on floor) [6]
   then - (monkey holding nil) [5,6]
        - (stick on floor) [6]
        + (monkey holding stick) [4,6]

rule (4 use stick to hit bananas)
   if (monkey holding stick) [6]
      (monkey on table) [8,9]
      (bananas above table) [0]
   then - (bananas above table) [0,2]
        + (bananas on floor) [5]
        + (monkey hungry for bananas) [1,2,5,7,8,10,11]

rule (5 monkey fetches bananas)
   if (monkey holding nil) [5,6]
      (monkey hungry for bananas) [7,8,10,11]
      (bananas on floor) [4]
   then - (monkey holding nil) [6]
        - (bananas on floor) [4]
        + (monkey has bananas) [7]

rule (6 monkey drops stick)
   if (monkey holding stick) [3]
   then - (monkey holding stick) [3,4]
        + (monkey holding nil) [2,3,5]
        + (stick on floor) [3]

rule (7 monkey eats bananas)
   if (monkey hungry for bananas) [1,4,8,10,11]
      (monkey has bananas) [2,5]
   then - (monkey hungry for bananas) [1,2,4,5,8,10,11]
        - (monkey has bananas) [5]
        + (monkey eats bananas)
        - (monkey has not eaten today) [10]

rule (8 monkey climbs table)
   if (monkey on floor) [3,9]
      (chair by table)
      (table in room) [13]
   then - (monkey on floor) [3,9]
        + (monkey on table) [2,9,11,12]
        + (monkey hungry for bananas) [2,5,7]

rule (9 monkey jumps off table)
   if (monkey on table) [8]
   then - (monkey on table) [2,8,9,11,12]
        + (monkey on floor) [3,8]

rule (10 monkey is hungry)
   if (monkey has not eaten today) [7]
   then + (monkey hungry for bananas) [2,5,7]

rule (11 stack a on b)
   if (a on table) [12]
      (b on table)
      (monkey on table) [8,9]
   then - (a on table) [12]
        + (a on b) [12]
        + (monkey hungry for bananas) [2,5,7]

rule (12 unstack a from b)
   if (a on b) [11]
      (monkey on table) [8,9]
   then - (a on b)
        + (a on table) [11]

rule (13 push table into room)
   if -(table in room) [0,8]
       (table in building)
       (monkey on floor) [8,9]
   then (table in room) [0,8]

rule (14 build table)
   if -(table in building)
      (monkey on floor) [8,9]
   then (table in building) [13]

rule (15 move chair to table)
   if -(chair by table)
      (table in room) [0,8,13]
      (chair in room)
      (monkey on floor) [8,9]
   then (chair by table)

rule (16 get chair)
   if -(chair in room)
      (monkey on floor) [8,9]
   then (chair in room) [15]