85-411/711 Cognitive Processes and Problem Solving Homework #4-Solutions This assignment had two main goals: 1) to provide an understanding of the perceptual strategy in detail, and how it might be implemented; and 2) to provide an understanding of the relation between different strategies for doing a task. Note: the perceptual strategy used in this simulation is not the pure perceptual strategy. This simulation keeps a goal stack, although one is not necessary (as described in Models of Thought, Vol.1, 4.5). Questions about the perceptual strategy simulation When asked how many disks, enter 4. When asked which start peg, enter A. When asked which target peg, enter C. Enter (run 19). Examine the contents of working memory using (ppwm). Working memory contains a description of the current external state plus 2 goals: 44: (GOAL ^DISK-NAME 1 ^SOURCE A ^DESTINATION B) 19: (GOAL ^DISK-NAME 4 ^SOURCE A ^DESTINATION C) 42: (DISK ^SIZE 2 ^ON-PEG B) 39: (DISK ^SIZE 1 ^ON-PEG A) 34: (DISK ^SIZE 3 ^ON-PEG B) 7: (DISK ^SIZE 4 ^ON-PEG A) 6: (TARGET-PEG ^END-PEG C) 18: (PLACE-DISK ^NUMBER 0 ^PEG-NAME A) 4: (PEG ^NAME C) 3: (PEG ^NAME B) 2: (PEG ^NAME A) 1: (START) > See Tower1.gif Examine the conflict set by entering (conflict-set). SET-LARGEST-DISK-GOAL MOVE-UNBLOCKED-DISK (MOVE-UNBLOCKED-DISK DOMINATES) Two productions are in the conflict set. The first, set-largest-disk-goal, would like to set the goal of moving disk 4 to peg C. The second, move-unblocked-disk, can satisfy the goal of moving disk 1 to peg B. It prefers to satisfy this goal because it is a very recent WME (using the recency principle of conflict resolution). Also, it is the case that disk 4 can not be moved until disk 1 is out of the way. Suppose the subject were interrupted at this point and lost track of her goal stack. Remove the two goals [using (remove x) where x is the number of the WME representing the goal] to simulate this situation. Examine the conflict set again by entering (conflict-set) What changed in the conflict set and why? SET-LARGEST-DISK-GOAL (2 occurrences) (SET-LARGEST-DISK-GOAL DOMINATES) Now, there are two instantiations of one production in the conflict set. One instantiation is the same one as before: SET-LARGEST-DISK-GOAL would like to set the goal of moving disk 4 to peg C. Because this is a production to set goals, it remains instantiated even when other goals are removed. The second instantiation of SET-LARGEST-DISK-GOAL is new. It would like to reset one of the goals which was removed (MOVE-UNBLOCKED-DISK) to the goal of moving disk 3 to peg C. MOVE-UNBLOCKED-DISK can no longer fire because the old instantiation was based on the goal to move disk 1 to peg B. Furthermore, there are currently no other goals involving unblocked disks. The instantiation to set the goal to move disk 3 dominates due to the recency principle of conflict resolution. In other words, the program gives moving disk three priority after the interruption, because it has been moved more recently than disk 4. Start the simulation running again. What happens? Is the subject able to recover after interruption? The strategy erroneously pursues the goal of putting disk 3 on peg C, before putting disk 4 on peg C. Once it has achieved this goal, it notices the error of its ways, and removes disk 3 from peg C, in the process of pursuing the correct goal of putting disk 4 on peg C. The task is eventually solved in 22 moves total, rather than the optimal 15 moves that it would have required had it not been interrupted. Note, that with a better implementation, such as the sophisticated perceptual strategy, the length of the solution path would not be increased by the interruption. Run the simulation using 3, 4, and 5 disks (using pegs A and C as start and target pegs). Examine the elements of working memory every few rule firings (by using (run 3) and (ppwm) repeatedly). How is the size of working memory affected by the number of disks in the problem? Which elements of OPS5 working memory represent psychological working memory? Using this version of the perceptual strategy (not the pure perceptual strategy), the size of working memory varies during the simulation as goals are added and removed. The maximum number of goals that can be in working memory at one time is equal to the number of disks in the problem. Of all the WME's in working memory, only the goal statements are clear representatives of psychological working memory. One might argue that the target WME is strategic knowledge and hence is also in psychological working memory. Modify STARTUP so that the problem starts with disk 3 on peg A, disk 2 on peg B and disk 1 on peg C. Do this by entering the following rule: (p startup (start) --> (make peg ^name A) (make peg ^name B) (make peg ^name C) (make disk ^size 3 ^on-peg A) (make disk ^size 2 ^on-peg B) (make disk ^size 1 ^on-peg C) (make place-disk ^number 0) ;don't place any disks (make target-peg ^end-peg C)) Can the system solve the task? Note, this new rule replaces the old start-up as well as making useless the "place-disks" rule. Try another initial state. Can it still solve the task? Here is the start state: >see Tower2.gif Yes, the system can solve the task. Here is the solution path. Disk 1 being moved from C to A Disk 2 being moved from B to C Disk 2 being moved from C to B Disk 1 being moved from A to B Disk 3 being moved from A to C Disk 1 being moved from B to A Disk 2 being moved from B to C Disk 1 being moved from A to C FINISHED: all disks are on peg C Notice that the simulation starts with moving disk 1 to peg A rather than peg B, because the subgoal to move disk 2 to C is initially set instead of the subgoal to move disk 3 to C. This simulation was not required to find the largest of all the disks, but rather to pick a disk and then determine whether it is the biggest disk ON THAT PEG. It chooses disk 2 first due to the recency principle (disk 2 was placed on its peg during startup more recently than was disk 3). A minor change in the code will produce a strategy that first finds the largest of all the disks. The simulation will be able to solve the task from any starting position. Note. place-disks can be thought of as instructions for the initial state of the problem (e.g., place 4 disks on peg A). The new startup production directly sets the position of each disk, and removes the necessity for using the place-disks WME. Other than this simple change, not using place-disks has no impact on how the task is solved. Compare the move-pattern and perceptual strategies in terms of their use of working memory, resistance to interruption, and abilities to generalize to problems of different numbers of disks and different initial and goal states. The move-pattern strategy uses a fixed number of working memory items, whereas this version of the perceptual strategy requires a larger working memory with problems involving more disks, and hence may not be able to solve problems with a large number of disks. Also, the move-pattern strategy requires fewer production firings. On the other hand, the perceptual strategy is much more resistant to interruption and generalizes more easily to problems of different initial and goal states. Note. Some variants of the perceptual strategy do not require a large goal stack. Also, even if there are a large number of goals in the goal stack and some get forgotten, as long as the system notices that some were forgotten, it can always regenerate them (this requires a fancier implementation, though). It is not the case that one of these strategies is more "human-like" than the other, since both strategies are exhibited quite frequently by humans. When people are very familiar with a task, they are likely to use a rote strategy like the move-pattern strategy since it is easier to execute (lower WM load, and faster to execute). However, when people understand the principles behind the best moves (i.e., they have a triangularized operator-difference table), but the particulars of the task are novel (e.g., a new start and/or goal state) they are likely to use more heuristic strategies like the perceptual strategy.