summaryrefslogtreecommitdiff
path: root/modeling/productions_math.py
diff options
context:
space:
mode:
authorDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-05-22 22:15:36 +0200
committerDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-05-22 22:15:36 +0200
commit228a2ee1750b31e7045d4686473adc49ce6c4205 (patch)
treedcf4c2fef996510825142ce7a76d6fd62aca16fe /modeling/productions_math.py
parent27124f640cd8a8df934cc736216c7bda6a2e9f8c (diff)
update
Diffstat (limited to 'modeling/productions_math.py')
-rw-r--r--modeling/productions_math.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/modeling/productions_math.py b/modeling/productions_math.py
index 9e0911a..b179102 100644
--- a/modeling/productions_math.py
+++ b/modeling/productions_math.py
@@ -6,6 +6,7 @@ import prod_comp
import prod_multi
import prod_numbers
import prod_procedure
+import prod_motor
# https://stackoverflow.com/a/39644726
@@ -28,17 +29,17 @@ def init():
"op1",
"arg1_1",
"arg1_2",
- "result1",
"op2",
"arg2_1",
"arg2_2",
- "result2",
),
)
actr.chunktype(
"math_goal",
(
"task",
+ "result1",
+ "result2",
"op",
"nextop",
"arg1",
@@ -76,11 +77,11 @@ def init():
"procedure",
proc="proc1",
op1="add",
- arg1_1=9,
- arg1_2=2,
+ arg1_1=99,
+ arg1_2=211,
op2="greater",
- arg2_1=100,
- arg2_2=200,
+ arg2_1=10,
+ arg2_2=2,
)
)
@@ -192,6 +193,7 @@ def start():
greater_prods = prod_comp.greater_than(Model)
less_prods = prod_comp.less_than(Model)
multi_prods = prod_multi.multiplication(Model)
+ motor_prods = prod_motor.procedures(Model)
# for prod in multi_prods:
# print(prod)
@@ -200,7 +202,7 @@ def start():
print("goal: ", goal)
# print("imaginal: ", imaginal)
x = Model.simulation()
- x.run(max_time=3)
+ x.run(max_time=4)
print("goal: ", goal)
# print("imaginal: ", imaginal)
# imaginal.show("hundreds_ans")
@@ -220,6 +222,10 @@ def start():
# x for x in list(DM) if x.typename != "number" and x.typename == "math_op"
# ]
# print(numbers)
+ math_goals = [
+ x for x in list(DM) if x.typename == "procedure"
+ ]
+ print(math_goals)
if __name__ == "__main__":