From 7db8d525314dd6940376610e54bc48bba0a06a7a Mon Sep 17 00:00:00 2001 From: Nathan Glenn Date: Tue, 3 Jan 2023 21:29:01 +0100 Subject: [PATCH] Remove copy-pasted headers from .soar files It's hard to keep all of these up-to-date, and some of them were already incorrect. --- PerformanceTests/TestAgents/arithmetic94.soar | 37 ++++---- .../TestAgents/arithmetic94_learning.soar | 37 ++++---- PerformanceTests/TestAgents/arithmetic96.soar | 37 ++++---- .../TestAgents/arithmetic96_learning.soar | 43 +++++----- .../BW-Hierarchical/_firstload.soar | 47 +++++------ .../BW-LA-state-eval/_firstload.soar | 68 +++++++-------- .../tests/BW-LA/BW-LA/_firstload.soar | 59 ++++++------- .../BW-Op-Subgoal/_firstload.soar | 39 ++++----- .../arithmetic/arithmetic/_firstload.soar | 43 +++++----- .../eight-puzzle/eight-puzzle/_firstload.soar | 35 ++++---- .../graph-search/graph-search/_firstload.soar | 84 +++++++++---------- .../mac-planning/mac-planning/_firstload.soar | 45 +++++----- .../towers-of-hanoi-recursive/_firstload.soar | 23 ++--- .../water-jug-hierarchy/_firstload.soar | 17 ++-- .../water-jug-hierarchy/_readme.soar | 53 +++++------- .../water-jug-look-ahead/_firstload.soar | 35 ++++---- .../water-jug-look-ahead/_readme.soar | 79 ++++++++--------- .../water-jug-tie/_firstload.soar | 23 ++--- .../water-jug-tie/water-jug-tie/_readme.soar | 53 +++++------- 19 files changed, 379 insertions(+), 478 deletions(-) diff --git a/PerformanceTests/TestAgents/arithmetic94.soar b/PerformanceTests/TestAgents/arithmetic94.soar index 0accb6bac1..d5bbb212ba 100644 --- a/PerformanceTests/TestAgents/arithmetic94.soar +++ b/PerformanceTests/TestAgents/arithmetic94.soar @@ -1,8 +1,3 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - learn -d sp {arithmetic*propose*initialize-arithmetic @@ -240,7 +235,7 @@ sp {arithmetic*elaborate*state*compare-results*not-equal ( ^computed-result ^top-number ^bottom-number - ^operation-symbol + ^operation-symbol ^result-number { <> }) --> (write (crlf) |***************************Results Incorrect: | | | | | | = | | <> | | Diff | (- )) @@ -261,14 +256,14 @@ sp {elaborate*state*top-state } sp {process-column*elaborate*arithmetic-problem - (state ^name + (state ^name ^superstate.arithmetic-problem ) --> ( ^arithmetic-problem ) } sp {process-column*elaborate*arithmetic-facts - (state ^name + (state ^name ^superstate.arithmetic ) --> ( ^arithmetic ) @@ -368,7 +363,7 @@ sp {process-column*compare*carry sp {process-column*propose*compute-addition-result (state ^name process-column ^digit1 - ^digit2 + ^digit2 ^arithmetic-problem.operation addition -^result) --> @@ -379,7 +374,7 @@ sp {process-column*propose*compute-addition-result sp {process-column*apply*compute-addition-result (state ^operator.name compute-addition-result ^digit1 - ^digit2 + ^digit2 ^arithmetic.facts ) ( ^digit1 ^digit2 @@ -441,7 +436,7 @@ sp {process-column*apply*compute-subtraction-no-carru-result*subtraction } # This subgoal is only used for subtraction when use -## subtraction facts - don't know how to use borrow directly +## subtraction facts - don't know how to use borrow directly ## and must recursively borrow/add-10 sp {compute-result*elaborate*substate @@ -558,7 +553,7 @@ sp {arithmetic*apply*finish-problem3*column*result ^result ^next-column nil) --> - (write (crlf) | |) + (write (crlf) | |) (write (crlf) | | ) (write (crlf) ) (write (crlf) |----|) @@ -609,7 +604,7 @@ sp {generate-problem*propose*generate-digit1 ## For subtraction, make sure most significant digit of the top number -## is not zero (so can insure top number is > bottom number). +## is not zero (so can insure top number is > bottom number). sp {generate-problem*compare*generate-digit1 (state ^name generate-problem @@ -646,7 +641,7 @@ sp {generate-problem*propose*generate-digit2 } ### For subtraction problem, make sure most significant digit of second number -### is less than the most significant digit of the top-number +### is less than the most significant digit of the top-number ### Generate-digit1 will not have a 0 as most significant digit sp {generate-problem*compare*generate-digit2 @@ -1014,11 +1009,11 @@ sp {process-column*apply*get-digit1 } ## If there has been a borrow -sp {process-column*apply*get-digit1-new +sp {process-column*apply*get-digit1-new (state ^operator.name get-digit1 ^arithmetic-problem.operation addition ^current-column ) - ( ^digit1 + ( ^digit1 ^new-digit1 ^carry << 0 unknown >>) --> @@ -1109,7 +1104,7 @@ sp {process-column*apply*get-digit2 # ^operation-symbol ) # ( ^digit1 # ^digit2 -# ^next-column ) +# ^next-column ) # ( ^digit1 # ^digit2 # ^next-column nil) @@ -1126,7 +1121,7 @@ sp {arithmetic*monitor*state*3column ^operation-symbol ) ( ^digit1 ^digit2 - ^next-column ) + ^next-column ) ( ^digit1 ^digit2 ^next-column ) @@ -1205,7 +1200,7 @@ sp {get-digit1*elaborate*state (state ^name get-digit1 ^current-column ) ( ^digit1 - ^carry ) + ^carry ) --> ( ^digit1 ^digit2 ) @@ -1285,7 +1280,7 @@ sp {process-column*apply*write-digit1-carry1 sp {process-column*apply*write-digit1*carry0 (state ^operator.name write-digit1 ^result - ^carry 0 + ^carry 0 ^superstate ) --> ( ^digit1 ) @@ -1304,7 +1299,7 @@ sp {process-column*propose*write-result ( ^name write-result) } -# This is required so that chunking works correctly +# This is required so that chunking works correctly sp {process-column*propose*write-result2 (state ^name process-column ^result diff --git a/PerformanceTests/TestAgents/arithmetic94_learning.soar b/PerformanceTests/TestAgents/arithmetic94_learning.soar index 63db63bc67..2453caf88b 100644 --- a/PerformanceTests/TestAgents/arithmetic94_learning.soar +++ b/PerformanceTests/TestAgents/arithmetic94_learning.soar @@ -1,8 +1,3 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - learn -e sp {arithmetic*propose*initialize-arithmetic @@ -240,7 +235,7 @@ sp {arithmetic*elaborate*state*compare-results*not-equal ( ^computed-result ^top-number ^bottom-number - ^operation-symbol + ^operation-symbol ^result-number { <> }) --> (write (crlf) |***************************Results Incorrect: | | | | | | = | | <> | | Diff | (- )) @@ -261,14 +256,14 @@ sp {elaborate*state*top-state } sp {process-column*elaborate*arithmetic-problem - (state ^name + (state ^name ^superstate.arithmetic-problem ) --> ( ^arithmetic-problem ) } sp {process-column*elaborate*arithmetic-facts - (state ^name + (state ^name ^superstate.arithmetic ) --> ( ^arithmetic ) @@ -368,7 +363,7 @@ sp {process-column*compare*carry sp {process-column*propose*compute-addition-result (state ^name process-column ^digit1 - ^digit2 + ^digit2 ^arithmetic-problem.operation addition -^result) --> @@ -379,7 +374,7 @@ sp {process-column*propose*compute-addition-result sp {process-column*apply*compute-addition-result (state ^operator.name compute-addition-result ^digit1 - ^digit2 + ^digit2 ^arithmetic.facts ) ( ^digit1 ^digit2 @@ -441,7 +436,7 @@ sp {process-column*apply*compute-subtraction-no-carru-result*subtraction } # This subgoal is only used for subtraction when use -## subtraction facts - don't know how to use borrow directly +## subtraction facts - don't know how to use borrow directly ## and must recursively borrow/add-10 sp {compute-result*elaborate*substate @@ -558,7 +553,7 @@ sp {arithmetic*apply*finish-problem3*column*result ^result ^next-column nil) --> - (write (crlf) | |) + (write (crlf) | |) (write (crlf) | | ) (write (crlf) ) (write (crlf) |----|) @@ -609,7 +604,7 @@ sp {generate-problem*propose*generate-digit1 ## For subtraction, make sure most significant digit of the top number -## is not zero (so can insure top number is > bottom number). +## is not zero (so can insure top number is > bottom number). sp {generate-problem*compare*generate-digit1 (state ^name generate-problem @@ -646,7 +641,7 @@ sp {generate-problem*propose*generate-digit2 } ### For subtraction problem, make sure most significant digit of second number -### is less than the most significant digit of the top-number +### is less than the most significant digit of the top-number ### Generate-digit1 will not have a 0 as most significant digit sp {generate-problem*compare*generate-digit2 @@ -1014,11 +1009,11 @@ sp {process-column*apply*get-digit1 } ## If there has been a borrow -sp {process-column*apply*get-digit1-new +sp {process-column*apply*get-digit1-new (state ^operator.name get-digit1 ^arithmetic-problem.operation addition ^current-column ) - ( ^digit1 + ( ^digit1 ^new-digit1 ^carry << 0 unknown >>) --> @@ -1109,7 +1104,7 @@ sp {process-column*apply*get-digit2 # ^operation-symbol ) # ( ^digit1 # ^digit2 -# ^next-column ) +# ^next-column ) # ( ^digit1 # ^digit2 # ^next-column nil) @@ -1126,7 +1121,7 @@ sp {arithmetic*monitor*state*3column ^operation-symbol ) ( ^digit1 ^digit2 - ^next-column ) + ^next-column ) ( ^digit1 ^digit2 ^next-column ) @@ -1205,7 +1200,7 @@ sp {get-digit1*elaborate*state (state ^name get-digit1 ^current-column ) ( ^digit1 - ^carry ) + ^carry ) --> ( ^digit1 ^digit2 ) @@ -1285,7 +1280,7 @@ sp {process-column*apply*write-digit1-carry1 sp {process-column*apply*write-digit1*carry0 (state ^operator.name write-digit1 ^result - ^carry 0 + ^carry 0 ^superstate ) --> ( ^digit1 ) @@ -1304,7 +1299,7 @@ sp {process-column*propose*write-result ( ^name write-result) } -# This is required so that chunking works correctly +# This is required so that chunking works correctly sp {process-column*propose*write-result2 (state ^name process-column ^result diff --git a/PerformanceTests/TestAgents/arithmetic96.soar b/PerformanceTests/TestAgents/arithmetic96.soar index 9082404c02..9c3f52d5f4 100644 --- a/PerformanceTests/TestAgents/arithmetic96.soar +++ b/PerformanceTests/TestAgents/arithmetic96.soar @@ -1,8 +1,3 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - multi-attributes subtraction-facts 100 multi-attributes facts 50 multi-attributes add10-facts 10 @@ -243,7 +238,7 @@ sp {arithmetic*elaborate*state*compare-results*not-equal ( ^computed-result ^top-number ^bottom-number - ^operation-symbol + ^operation-symbol ^result-number { <> }) --> (write (crlf) |***************************Results Incorrect: | | | | | | = | | <> | | Diff | (- )) @@ -264,14 +259,14 @@ sp {elaborate*state*top-state } sp {process-column*elaborate*arithmetic-problem - (state ^name + (state ^name ^superstate.arithmetic-problem ) --> ( ^arithmetic-problem ) } sp {process-column*elaborate*arithmetic-facts - (state ^name + (state ^name ^superstate.arithmetic ) --> ( ^arithmetic ) @@ -371,7 +366,7 @@ sp {process-column*compare*carry sp {process-column*propose*compute-addition-result (state ^name process-column ^digit1 - ^digit2 + ^digit2 ^arithmetic-problem.operation addition -^result) --> @@ -382,7 +377,7 @@ sp {process-column*propose*compute-addition-result sp {process-column*apply*compute-addition-result (state ^operator.name compute-addition-result ^digit1 - ^digit2 + ^digit2 ^arithmetic.facts ) ( ^digit1 ^digit2 @@ -444,7 +439,7 @@ sp {process-column*apply*compute-subtraction-no-carru-result*subtraction } # This subgoal is only used for subtraction when use -## subtraction facts - don't know how to use borrow directly +## subtraction facts - don't know how to use borrow directly ## and must recursively borrow/add-10 sp {compute-result*elaborate*substate @@ -561,7 +556,7 @@ sp {arithmetic*apply*finish-problem3*column*result ^result ^next-column nil) --> - (write (crlf) | |) + (write (crlf) | |) (write (crlf) | | ) (write (crlf) ) (write (crlf) |----|) @@ -612,7 +607,7 @@ sp {generate-problem*propose*generate-digit1 ## For subtraction, make sure most significant digit of the top number -## is not zero (so can insure top number is > bottom number). +## is not zero (so can insure top number is > bottom number). sp {generate-problem*compare*generate-digit1 (state ^name generate-problem @@ -649,7 +644,7 @@ sp {generate-problem*propose*generate-digit2 } ### For subtraction problem, make sure most significant digit of second number -### is less than the most significant digit of the top-number +### is less than the most significant digit of the top-number ### Generate-digit1 will not have a 0 as most significant digit sp {generate-problem*compare*generate-digit2 @@ -1017,11 +1012,11 @@ sp {process-column*apply*get-digit1 } ## If there has been a borrow -sp {process-column*apply*get-digit1-new +sp {process-column*apply*get-digit1-new (state ^operator.name get-digit1 ^arithmetic-problem.operation addition ^current-column ) - ( ^digit1 + ( ^digit1 ^new-digit1 ^carry << 0 unknown >>) --> @@ -1112,7 +1107,7 @@ sp {process-column*apply*get-digit2 # ^operation-symbol ) # ( ^digit1 # ^digit2 -# ^next-column ) +# ^next-column ) # ( ^digit1 # ^digit2 # ^next-column nil) @@ -1129,7 +1124,7 @@ sp {arithmetic*monitor*state*3column ^operation-symbol ) ( ^digit1 ^digit2 - ^next-column ) + ^next-column ) ( ^digit1 ^digit2 ^next-column ) @@ -1208,7 +1203,7 @@ sp {get-digit1*elaborate*state (state ^name get-digit1 ^current-column ) ( ^digit1 - ^carry ) + ^carry ) --> ( ^digit1 ^digit2 ) @@ -1288,7 +1283,7 @@ sp {process-column*apply*write-digit1-carry1 sp {process-column*apply*write-digit1*carry0 (state ^operator.name write-digit1 ^result - ^carry 0 + ^carry 0 ^superstate ) --> ( ^digit1 ) @@ -1307,7 +1302,7 @@ sp {process-column*propose*write-result ( ^name write-result) } -# This is required so that chunking works correctly +# This is required so that chunking works correctly sp {process-column*propose*write-result2 (state ^name process-column ^result diff --git a/PerformanceTests/TestAgents/arithmetic96_learning.soar b/PerformanceTests/TestAgents/arithmetic96_learning.soar index 86ac97bb55..99988d580f 100644 --- a/PerformanceTests/TestAgents/arithmetic96_learning.soar +++ b/PerformanceTests/TestAgents/arithmetic96_learning.soar @@ -1,8 +1,3 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - multi-attributes subtraction-facts 100 multi-attributes facts 50 multi-attributes add10-facts 10 @@ -10,9 +5,9 @@ multi-attributes arithmetic 3 chunk singleton any current-column any -chunk singleton any next-column any -chunk singleton any digit1 any -chunk singleton any digit2 any +chunk singleton any next-column any +chunk singleton any digit1 any +chunk singleton any digit2 any chunk singleton any carry any #srand 1 # For consistency for testing @@ -255,7 +250,7 @@ sp {arithmetic*elaborate*state*compare-results*not-equal ( ^computed-result ^top-number ^bottom-number - ^operation-symbol + ^operation-symbol ^result-number { <> }) --> (write (crlf) |***************************Results Incorrect: | | | | | | = | | <> | | Diff | (- )) @@ -276,14 +271,14 @@ sp {elaborate*state*top-state } sp {process-column*elaborate*arithmetic-problem - (state ^name + (state ^name ^superstate.arithmetic-problem ) --> ( ^arithmetic-problem ) } sp {process-column*elaborate*arithmetic-facts - (state ^name + (state ^name ^superstate.arithmetic ) --> ( ^arithmetic ) @@ -383,7 +378,7 @@ sp {process-column*compare*carry sp {process-column*propose*compute-addition-result (state ^name process-column ^digit1 - ^digit2 + ^digit2 ^arithmetic-problem.operation addition -^result) --> @@ -394,7 +389,7 @@ sp {process-column*propose*compute-addition-result sp {process-column*apply*compute-addition-result (state ^operator.name compute-addition-result ^digit1 - ^digit2 + ^digit2 ^arithmetic.facts ) ( ^digit1 ^digit2 @@ -456,7 +451,7 @@ sp {process-column*apply*compute-subtraction-no-carru-result*subtraction } # This subgoal is only used for subtraction when use -## subtraction facts - don't know how to use borrow directly +## subtraction facts - don't know how to use borrow directly ## and must recursively borrow/add-10 sp {compute-result*elaborate*substate @@ -573,7 +568,7 @@ sp {arithmetic*apply*finish-problem3*column*result ^result ^next-column nil) --> - (write (crlf) | |) + (write (crlf) | |) (write (crlf) | | ) (write (crlf) ) (write (crlf) |----|) @@ -624,7 +619,7 @@ sp {generate-problem*propose*generate-digit1 ## For subtraction, make sure most significant digit of the top number -## is not zero (so can insure top number is > bottom number). +## is not zero (so can insure top number is > bottom number). sp {generate-problem*compare*generate-digit1 (state ^name generate-problem @@ -661,7 +656,7 @@ sp {generate-problem*propose*generate-digit2 } ### For subtraction problem, make sure most significant digit of second number -### is less than the most significant digit of the top-number +### is less than the most significant digit of the top-number ### Generate-digit1 will not have a 0 as most significant digit sp {generate-problem*compare*generate-digit2 @@ -1029,11 +1024,11 @@ sp {process-column*apply*get-digit1 } ## If there has been a borrow -sp {process-column*apply*get-digit1-new +sp {process-column*apply*get-digit1-new (state ^operator.name get-digit1 ^arithmetic-problem.operation addition ^current-column ) - ( ^digit1 + ( ^digit1 ^new-digit1 ^carry << 0 unknown >>) --> @@ -1124,7 +1119,7 @@ sp {process-column*apply*get-digit2 # ^operation-symbol ) # ( ^digit1 # ^digit2 -# ^next-column ) +# ^next-column ) # ( ^digit1 # ^digit2 # ^next-column nil) @@ -1141,7 +1136,7 @@ sp {arithmetic*monitor*state*3column ^operation-symbol ) ( ^digit1 ^digit2 - ^next-column ) + ^next-column ) ( ^digit1 ^digit2 ^next-column ) @@ -1220,7 +1215,7 @@ sp {get-digit1*elaborate*state (state ^name get-digit1 ^current-column ) ( ^digit1 - ^carry ) + ^carry ) --> ( ^digit1 ^digit2 ) @@ -1300,7 +1295,7 @@ sp {process-column*apply*write-digit1-carry1 sp {process-column*apply*write-digit1*carry0 (state ^operator.name write-digit1 ^result - ^carry 0 + ^carry 0 ^superstate ) --> ( ^digit1 ) @@ -1319,7 +1314,7 @@ sp {process-column*propose*write-result ( ^name write-result) } -# This is required so that chunking works correctly +# This is required so that chunking works correctly sp {process-column*propose*write-result2 (state ^name process-column ^result diff --git a/UnitTests/SoarTestAgents/Chunking/tests/BW-Hierarchical/BW-Hierarchical/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/BW-Hierarchical/BW-Hierarchical/_firstload.soar index a8d7686eb8..3cb57afb76 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/BW-Hierarchical/BW-Hierarchical/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/BW-Hierarchical/BW-Hierarchical/_firstload.soar @@ -1,26 +1,21 @@ -# Classic 3 block blocks world -# Formulated for hierarchical task decomposition -# John E. Laird -# University of Michigan -# 2/8/2012 -# latest version 1/27/2017 -# Soar version 9.6.0 - -# Give information to the rule reording algorithm to make the match more efficient. -multi-attributes ontop 3 -multi-attributes clear 4 -multi-attributes in-place 3 -multi-attributes objects 4 -multi-attributes operator 9 - -chunk singleton any gripper any -chunk singleton any type any -chunk singleton any holding any - -pushd "../../default" -source simple.soar -popd - -srand 1 # For consistency for testing -chunk always -chunk add-osk on +# Classic 3 block blocks world +# Formulated for hierarchical task decomposition + +# Give information to the rule reording algorithm to make the match more efficient. +multi-attributes ontop 3 +multi-attributes clear 4 +multi-attributes in-place 3 +multi-attributes objects 4 +multi-attributes operator 9 + +chunk singleton any gripper any +chunk singleton any type any +chunk singleton any holding any + +pushd "../../default" +source simple.soar +popd + +srand 1 # For consistency for testing +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/BW-LA-state-eval/BW-LA-state-eval/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/BW-LA-state-eval/BW-LA-state-eval/_firstload.soar index 015148c767..37431b29eb 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/BW-LA-state-eval/BW-LA-state-eval/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/BW-LA-state-eval/BW-LA-state-eval/_firstload.soar @@ -1,36 +1,32 @@ -# Classic 3 block blocks world -# Formulated for look ahead search -# John E. Laird -# University of Michigan -# 1/24/2017 -# Soar version 9.6.0 - -# Give information to the rule reording algorithm to make the match more efficient. -multi-attributes ontop 3 -multi-attributes clear 4 -multi-attributes in-place 3 -multi-attributes objects 4 -multi-attributes operator 9 - -chunk singleton any gripper any -chunk singleton any type any -chunk singleton any holding any - -pushd "../../default" -source simple.soar -source selection.soar -popd - -# -rl --set learning on -indifferent-selection --epsilon-greedy - -sp {Impasse__Operator_Tie*elaborate*learn*on - (state ^impasse tie) ---> - (force-learn ) -} - -srand 1 # For consistency for testing -chunk always -chunk add-osk on \ No newline at end of file +# Classic 3 block blocks world +# Formulated for look ahead search + +# Give information to the rule reording algorithm to make the match more efficient. +multi-attributes ontop 3 +multi-attributes clear 4 +multi-attributes in-place 3 +multi-attributes objects 4 +multi-attributes operator 9 + +chunk singleton any gripper any +chunk singleton any type any +chunk singleton any holding any + +pushd "../../default" +source simple.soar +source selection.soar +popd + +# +rl --set learning on +indifferent-selection --epsilon-greedy + +sp {Impasse__Operator_Tie*elaborate*learn*on + (state ^impasse tie) +--> + (force-learn ) +} + +srand 1 # For consistency for testing +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/BW-LA/BW-LA/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/BW-LA/BW-LA/_firstload.soar index f9cde24002..e1a1d9d253 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/BW-LA/BW-LA/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/BW-LA/BW-LA/_firstload.soar @@ -1,32 +1,27 @@ -# Classic 3 block blocks world -# Formulated for look ahead search -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -# Give information to the rule reordering algorithm to make the match more efficient. -multi-attributes ontop 3 -multi-attributes clear 4 -multi-attributes in-place 3 -multi-attributes objects 4 -multi-attributes operator 9 - -chunk singleton any gripper any -chunk singleton any type any -chunk singleton any holding any - -pushd ../../default -source simple.soar -source selection.soar -popd - -sp {Impasse__Operator_Tie*elaborate*learn*on - (state ^impasse tie) ---> - (force-learn ) -} - -srand 1 # For consistency for testing -chunk always -chunk add-osk on \ No newline at end of file +# Classic 3 block blocks world +# Formulated for look-ahead search +# Give information to the rule reordering algorithm to make the match more efficient. +multi-attributes ontop 3 +multi-attributes clear 4 +multi-attributes in-place 3 +multi-attributes objects 4 +multi-attributes operator 9 + +chunk singleton any gripper any +chunk singleton any type any +chunk singleton any holding any + +pushd ../../default +source simple.soar +source selection.soar +popd + +sp {Impasse__Operator_Tie*elaborate*learn*on + (state ^impasse tie) +--> + (force-learn ) +} + +srand 1 # For consistency for testing +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/BW-Op-Subgoal/BW-Op-Subgoal/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/BW-Op-Subgoal/BW-Op-Subgoal/_firstload.soar index d32cd08a9d..ed7990c503 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/BW-Op-Subgoal/BW-Op-Subgoal/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/BW-Op-Subgoal/BW-Op-Subgoal/_firstload.soar @@ -1,22 +1,17 @@ -### Blocks world that uses the selection problem space (from the default folder) to do -### do operator subgoaling with means-ends analysis -### In this approach, operators are proposed if they reduce the difference between the current state -### and the desired state, even if they cannot be applied in the current state. -### If they can be applied, then forward progress occurs. -### If they cannot be applied, an operator subgoal arises and in the subgoal, the agent -### tries to select operators that moves the agent to a state where the selected operator can apply. - -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -multi-attributes ontop 3 -multi-attributes clear 3 -multi-attributes objects 4 - -# Operator subgoaling does not work correctly if learning is on. -chunk always -chunk add-osk on - - +### Blocks world that uses the selection problem space (from the default folder) to do +### do operator subgoaling with means-ends analysis +### In this approach, operators are proposed if they reduce the difference between the current state +### and the desired state, even if they cannot be applied in the current state. +### If they can be applied, then forward progress occurs. +### If they cannot be applied, an operator subgoal arises and in the subgoal, the agent +### tries to select operators that moves the agent to a state where the selected operator can apply. + +multi-attributes ontop 3 +multi-attributes clear 3 +multi-attributes objects 4 + +# Operator subgoaling does not work correctly if learning is on. +chunk always +chunk add-osk on + + diff --git a/UnitTests/SoarTestAgents/Chunking/tests/arithmetic/arithmetic/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/arithmetic/arithmetic/_firstload.soar index 845314fc60..31d3c7f0f4 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/arithmetic/arithmetic/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/arithmetic/arithmetic/_firstload.soar @@ -1,24 +1,19 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -multi-attributes subtraction-facts 100 -multi-attributes facts 50 -multi-attributes add10-facts 10 -multi-attributes arithmetic 3 - -chunk singleton any current-column any - -chunk singleton any next-column any -chunk singleton any digit1 any -chunk singleton any digit2 any -chunk singleton any carry any - -srand 1 # For consistency for testing -chunk always -chunk add-osk on - - - - +multi-attributes subtraction-facts 100 +multi-attributes facts 50 +multi-attributes add10-facts 10 +multi-attributes arithmetic 3 + +chunk singleton any current-column any + +chunk singleton any next-column any +chunk singleton any digit1 any +chunk singleton any digit2 any +chunk singleton any carry any + +srand 1 # For consistency for testing +chunk always +chunk add-osk on + + + + diff --git a/UnitTests/SoarTestAgents/Chunking/tests/eight-puzzle/eight-puzzle/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/eight-puzzle/eight-puzzle/_firstload.soar index d0a5f4c51f..f52367305c 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/eight-puzzle/eight-puzzle/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/eight-puzzle/eight-puzzle/_firstload.soar @@ -1,20 +1,15 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -pushd "../../default" -source selection.soar -popd - -multi-attributes binding 10 -multi-attributes operator 4 -chunk singleton any cell any -chunk singleton any tile any -chunk singleton any blank-cell any -chunk singleton any tile-cell any -chunk singleton any problem-space any - -srand 1 # For consistency for testing -chunk always -chunk add-osk on \ No newline at end of file +pushd "../../default" +source selection.soar +popd + +multi-attributes binding 10 +multi-attributes operator 4 +chunk singleton any cell any +chunk singleton any tile any +chunk singleton any blank-cell any +chunk singleton any tile-cell any +chunk singleton any problem-space any + +srand 1 # For consistency for testing +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/graph-search/graph-search/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/graph-search/graph-search/_firstload.soar index ee0671f3b7..11858b5a10 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/graph-search/graph-search/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/graph-search/graph-search/_firstload.soar @@ -1,44 +1,40 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 -multi-attributes waypoint 10 -multi-attributes operator 5 -multi-attributes next 3 -multi-attributes evaluation 10 - -pushd "../../default" -source selection.soar -source selection-astar.soar -popd -wma -s activation off -epmem -s learning off - -### Only learn selection rules from tie impasses -### Other chunks do not work right now. - -sp {Impasse__Operator_Tie*elaborate*learn*on - (state ^impasse tie) ---> - (force-learn ) -} -chunk singleton any waypoints any -chunk singleton any id any -chunk singleton any name any -chunk singleton any x any -chunk singleton any y any -chunk singleton any mission any -chunk singleton any current any -chunk singleton any next-location any -chunk singleton any next any -chunk singleton any id any -chunk singleton any waypoints any -chunk singleton any desired any -chunk singleton any location any -chunk singleton any problem-space any - - -srand 3 # For consistency for testing - srand 1 will lead to infinite loop - # not a problem with chunking but with the implementation of search -chunk always -chunk add-osk on \ No newline at end of file +multi-attributes waypoint 10 +multi-attributes operator 5 +multi-attributes next 3 +multi-attributes evaluation 10 + +pushd "../../default" +source selection.soar +source selection-astar.soar +popd +wma -s activation off +epmem -s learning off + +### Only learn selection rules from tie impasses +### Other chunks do not work right now. + +sp {Impasse__Operator_Tie*elaborate*learn*on + (state ^impasse tie) +--> + (force-learn ) +} +chunk singleton any waypoints any +chunk singleton any id any +chunk singleton any name any +chunk singleton any x any +chunk singleton any y any +chunk singleton any mission any +chunk singleton any current any +chunk singleton any next-location any +chunk singleton any next any +chunk singleton any id any +chunk singleton any waypoints any +chunk singleton any desired any +chunk singleton any location any +chunk singleton any problem-space any + + +srand 3 # For consistency for testing - srand 1 will lead to infinite loop + # not a problem with chunking but with the implementation of search +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/mac-planning/mac-planning/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/mac-planning/mac-planning/_firstload.soar index ef4a1d6149..279b3e9ce3 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/mac-planning/mac-planning/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/mac-planning/mac-planning/_firstload.soar @@ -1,25 +1,20 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - - -pushd "../../default" - -source selection.soar -popd - -multi-attributes ontop 3 - -chunk singleton any left-bank any -chunk singleton any right-bank any -chunk singleton any boat any -chunk singleton any cannibals any -chunk singleton any missionaries any -chunk singleton any other-bank any -chunk singleton any problem-space any - -srand 3 # For consistency for testing - srand 1 will lead to infinite loop - # not a problem with chunking but with the implementation of search -chunk always -chunk add-osk on \ No newline at end of file + +pushd "../../default" + +source selection.soar +popd + +multi-attributes ontop 3 + +chunk singleton any left-bank any +chunk singleton any right-bank any +chunk singleton any boat any +chunk singleton any cannibals any +chunk singleton any missionaries any +chunk singleton any other-bank any +chunk singleton any problem-space any + +srand 3 # For consistency for testing - srand 1 will lead to infinite loop + # not a problem with chunking but with the implementation of search +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/towers-of-hanoi-recursive/towers-of-hanoi-recursive/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/towers-of-hanoi-recursive/towers-of-hanoi-recursive/_firstload.soar index f11270bb38..be59309318 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/towers-of-hanoi-recursive/towers-of-hanoi-recursive/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/towers-of-hanoi-recursive/towers-of-hanoi-recursive/_firstload.soar @@ -1,14 +1,9 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -### These declaration help Soar reorder the conditions of the rules -multi-attributes disk 7 -multi-attributes peg 3 -multi-attributes holds 8 -multi-attributes upper-disk 2 -multi-attributes clear 2 - -chunk off -# Does not work with chunking +### These declaration help Soar reorder the conditions of the rules +multi-attributes disk 7 +multi-attributes peg 3 +multi-attributes holds 8 +multi-attributes upper-disk 2 +multi-attributes clear 2 + +chunk off +# Does not work with chunking diff --git a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_firstload.soar index 99d30a4dd4..0be61bbfda 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_firstload.soar @@ -1,11 +1,6 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -# this helps Soar reorder conditions so matching is more efficient -multi-attributes jug 3 - -srand 1 # For consistency for testing -chunk always -chunk add-osk on \ No newline at end of file +# this helps Soar reorder conditions so matching is more efficient +multi-attributes jug 3 + +srand 1 # For consistency for testing +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_readme.soar b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_readme.soar index c4a58706db..4bda1b1b6e 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_readme.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-hierarchy/water-jug-hierarchy/_readme.soar @@ -1,30 +1,23 @@ -# water-jug -# John E. Laird -# University of Michigan -# May 24, 2005 -# latest version 1/27/2017 -# Soar version 9.6.0 - -### -### 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 +### +### 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 diff --git a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_firstload.soar index 9b4fd66ba7..09541504c9 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_firstload.soar @@ -1,20 +1,15 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -multi-attributes jug 3 -multi-attributes superstate-set 20 - -chunk singleton any volume any -chunk singleton any contents any -chunk singleton any jug any - -pushd "../../default" -source selection.soar -popd - -srand 1 # For consistency for testing - -chunk always -chunk add-osk on \ No newline at end of file +multi-attributes jug 3 +multi-attributes superstate-set 20 + +chunk singleton any volume any +chunk singleton any contents any +chunk singleton any jug any + +pushd "../../default" +source selection.soar +popd + +srand 1 # For consistency for testing + +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_readme.soar b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_readme.soar index d98a4a1563..f7315230b8 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_readme.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-look-ahead/water-jug-look-ahead/_readme.soar @@ -1,43 +1,36 @@ -# water-jug-look-ahead -# John E. Laird -# University of Michigan -# May 24, 2005 -# latest version 1/27/2017 -# Soar version 9.6.0 - -### -### 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 (computed -### in elaborations/empty). Example: -### (state s1 ^jug j1) -### (jug j1 ^volume 5 ^contents 3 ^empty 2) -### - -### This uses the look-ahead code that is in default/selection.soar -### Thus, search is done through subgoals. -### Chunking learns control rules for selecting operators. -### Sometimes it can learn rules that lead to looping. - -# Change made to water-jug to enable look ahead search: -# 1. Add to _firstload "source selection.soar" -# 2. Add to elaborations/problem-space: water-jug*elaborate*problem-space -# 3. Change elaborations/goal-test so works with look-ahead goal test = -# 4. Add to elaborations/goal-test a test for failure on look-ahead if duplicate states. -# 5. Add to initialize a desired jug structure so easier to detect desired state (and to change). -# 6. Remove = preferences from operator proposals in empty.soar, fill.soar, pour.soar -# 7. Add to impasse__operator_tie monitoring rules. - - +### +### 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 (computed +### in elaborations/empty). Example: +### (state s1 ^jug j1) +### (jug j1 ^volume 5 ^contents 3 ^empty 2) +### + +### This uses the look-ahead code that is in default/selection.soar +### Thus, search is done through subgoals. +### Chunking learns control rules for selecting operators. +### Sometimes it can learn rules that lead to looping. + +# Change made to water-jug to enable look ahead search: +# 1. Add to _firstload "source selection.soar" +# 2. Add to elaborations/problem-space: water-jug*elaborate*problem-space +# 3. Change elaborations/goal-test so works with look-ahead goal test = +# 4. Add to elaborations/goal-test a test for failure on look-ahead if duplicate states. +# 5. Add to initialize a desired jug structure so easier to detect desired state (and to change). +# 6. Remove = preferences from operator proposals in empty.soar, fill.soar, pour.soar +# 7. Add to impasse__operator_tie monitoring rules. + + diff --git a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_firstload.soar b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_firstload.soar index 411347d77b..2eb6e46999 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_firstload.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_firstload.soar @@ -1,14 +1,9 @@ -# John E. Laird -# University of Michigan -# latest version 1/27/2017 -# Soar version 9.6.0 - -# this helps Soar reorder conditions so matching is more efficient -multi-attributes jug 3 - -chunk singleton any volume any -chunk singleton any contents any - -srand 1 # For consistency for testing -chunk always -chunk add-osk on \ No newline at end of file +# this helps Soar reorder conditions so matching is more efficient +multi-attributes jug 3 + +chunk singleton any volume any +chunk singleton any contents any + +srand 1 # For consistency for testing +chunk always +chunk add-osk on diff --git a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_readme.soar b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_readme.soar index 5e18e6830b..0db6106971 100755 --- a/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_readme.soar +++ b/UnitTests/SoarTestAgents/Chunking/tests/water-jug-tie/water-jug-tie/_readme.soar @@ -1,30 +1,23 @@ -# water-jug -# John E. Laird -# University of Michigan -# May 24, 2005 -# latest version 1/27/2017 -# Soar version 9.6.0 - -### -### 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 -## Using it greatly reduces the search for a solution +### +### 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 +## Using it greatly reduces the search for a solution