Skip to content

Commit

Permalink
Remove copy-pasted headers from .soar files
Browse files Browse the repository at this point in the history
It's hard to keep all of these up-to-date, and some of them were already
incorrect.
  • Loading branch information
garfieldnate committed Jan 3, 2023
1 parent 5a1a2ab commit 7db8d52
Show file tree
Hide file tree
Showing 19 changed files with 379 additions and 478 deletions.
37 changes: 16 additions & 21 deletions PerformanceTests/TestAgents/arithmetic94.soar
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -240,7 +235,7 @@ sp {arithmetic*elaborate*state*compare-results*not-equal
(<ap> ^computed-result <cr>
^top-number <tn>
^bottom-number <bn>
^operation-symbol <os>
^operation-symbol <os>
^result-number { <> <cr> <rn>})
-->
(write (crlf) |***************************Results Incorrect: | <tn> | | <os> | | <bn> | = | <cr> | <> | <rn> | Diff | (- <cr> <rn>))
Expand All @@ -261,14 +256,14 @@ sp {elaborate*state*top-state
}

sp {process-column*elaborate*arithmetic-problem
(state <s> ^name
(state <s> ^name
^superstate.arithmetic-problem <ap>)
-->
(<s> ^arithmetic-problem <ap>)
}

sp {process-column*elaborate*arithmetic-facts
(state <s> ^name
(state <s> ^name
^superstate.arithmetic <a>)
-->
(<s> ^arithmetic <a>)
Expand Down Expand Up @@ -368,7 +363,7 @@ sp {process-column*compare*carry
sp {process-column*propose*compute-addition-result
(state <s> ^name process-column
^digit1 <d1>
^digit2 <d2>
^digit2 <d2>
^arithmetic-problem.operation addition
-^result)
-->
Expand All @@ -379,7 +374,7 @@ sp {process-column*propose*compute-addition-result
sp {process-column*apply*compute-addition-result
(state <s> ^operator.name compute-addition-result
^digit1 <d1>
^digit2 <d2>
^digit2 <d2>
^arithmetic.facts <af>)
(<af> ^digit1 <d1>
^digit2 <d2>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -558,7 +553,7 @@ sp {arithmetic*apply*finish-problem3*column*result
^result <a3>
^next-column nil)
-->
(write (crlf) | |)
(write (crlf) | |)
(write (crlf) | | <n5> <n3> <n1> )
(write (crlf) <as> <n6> <n4> <n2> )
(write (crlf) |----|)
Expand Down Expand Up @@ -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 <s> ^name generate-problem
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 <s> ^operator.name get-digit1
^arithmetic-problem.operation addition
^current-column <cc>)
(<cc> ^digit1
(<cc> ^digit1
^new-digit1 <a>
^carry << 0 unknown >>)
-->
Expand Down Expand Up @@ -1109,7 +1104,7 @@ sp {process-column*apply*get-digit2
# ^operation-symbol <as>)
# (<oc> ^digit1 <n1>
# ^digit2 <n2>
# ^next-column <tc>)
# ^next-column <tc>)
# (<tc> ^digit1 <n3>
# ^digit2 <n4>
# ^next-column nil)
Expand All @@ -1126,7 +1121,7 @@ sp {arithmetic*monitor*state*3column
^operation-symbol <as>)
(<oc> ^digit1 <n1>
^digit2 <n2>
^next-column <tc>)
^next-column <tc>)
(<tc> ^digit1 <n3>
^digit2 <n4>
^next-column <hc>)
Expand Down Expand Up @@ -1205,7 +1200,7 @@ sp {get-digit1*elaborate*state
(state <s> ^name get-digit1
^current-column <c>)
(<c> ^digit1 <a>
^carry <cb>)
^carry <cb>)
-->
(<s> ^digit1 <a>
^digit2 <cb>)
Expand Down Expand Up @@ -1285,7 +1280,7 @@ sp {process-column*apply*write-digit1-carry1
sp {process-column*apply*write-digit1*carry0
(state <s> ^operator.name write-digit1
^result <a>
^carry 0
^carry 0
^superstate <ss>)
-->
(<ss> ^digit1 <a>)
Expand All @@ -1304,7 +1299,7 @@ sp {process-column*propose*write-result
(<op> ^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 <s> ^name process-column
^result <a>
Expand Down
37 changes: 16 additions & 21 deletions PerformanceTests/TestAgents/arithmetic94_learning.soar
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -240,7 +235,7 @@ sp {arithmetic*elaborate*state*compare-results*not-equal
(<ap> ^computed-result <cr>
^top-number <tn>
^bottom-number <bn>
^operation-symbol <os>
^operation-symbol <os>
^result-number { <> <cr> <rn>})
-->
(write (crlf) |***************************Results Incorrect: | <tn> | | <os> | | <bn> | = | <cr> | <> | <rn> | Diff | (- <cr> <rn>))
Expand All @@ -261,14 +256,14 @@ sp {elaborate*state*top-state
}

sp {process-column*elaborate*arithmetic-problem
(state <s> ^name
(state <s> ^name
^superstate.arithmetic-problem <ap>)
-->
(<s> ^arithmetic-problem <ap>)
}

sp {process-column*elaborate*arithmetic-facts
(state <s> ^name
(state <s> ^name
^superstate.arithmetic <a>)
-->
(<s> ^arithmetic <a>)
Expand Down Expand Up @@ -368,7 +363,7 @@ sp {process-column*compare*carry
sp {process-column*propose*compute-addition-result
(state <s> ^name process-column
^digit1 <d1>
^digit2 <d2>
^digit2 <d2>
^arithmetic-problem.operation addition
-^result)
-->
Expand All @@ -379,7 +374,7 @@ sp {process-column*propose*compute-addition-result
sp {process-column*apply*compute-addition-result
(state <s> ^operator.name compute-addition-result
^digit1 <d1>
^digit2 <d2>
^digit2 <d2>
^arithmetic.facts <af>)
(<af> ^digit1 <d1>
^digit2 <d2>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -558,7 +553,7 @@ sp {arithmetic*apply*finish-problem3*column*result
^result <a3>
^next-column nil)
-->
(write (crlf) | |)
(write (crlf) | |)
(write (crlf) | | <n5> <n3> <n1> )
(write (crlf) <as> <n6> <n4> <n2> )
(write (crlf) |----|)
Expand Down Expand Up @@ -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 <s> ^name generate-problem
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 <s> ^operator.name get-digit1
^arithmetic-problem.operation addition
^current-column <cc>)
(<cc> ^digit1
(<cc> ^digit1
^new-digit1 <a>
^carry << 0 unknown >>)
-->
Expand Down Expand Up @@ -1109,7 +1104,7 @@ sp {process-column*apply*get-digit2
# ^operation-symbol <as>)
# (<oc> ^digit1 <n1>
# ^digit2 <n2>
# ^next-column <tc>)
# ^next-column <tc>)
# (<tc> ^digit1 <n3>
# ^digit2 <n4>
# ^next-column nil)
Expand All @@ -1126,7 +1121,7 @@ sp {arithmetic*monitor*state*3column
^operation-symbol <as>)
(<oc> ^digit1 <n1>
^digit2 <n2>
^next-column <tc>)
^next-column <tc>)
(<tc> ^digit1 <n3>
^digit2 <n4>
^next-column <hc>)
Expand Down Expand Up @@ -1205,7 +1200,7 @@ sp {get-digit1*elaborate*state
(state <s> ^name get-digit1
^current-column <c>)
(<c> ^digit1 <a>
^carry <cb>)
^carry <cb>)
-->
(<s> ^digit1 <a>
^digit2 <cb>)
Expand Down Expand Up @@ -1285,7 +1280,7 @@ sp {process-column*apply*write-digit1-carry1
sp {process-column*apply*write-digit1*carry0
(state <s> ^operator.name write-digit1
^result <a>
^carry 0
^carry 0
^superstate <ss>)
-->
(<ss> ^digit1 <a>)
Expand All @@ -1304,7 +1299,7 @@ sp {process-column*propose*write-result
(<op> ^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 <s> ^name process-column
^result <a>
Expand Down
Loading

0 comments on commit 7db8d52

Please sign in to comment.