summaryrefslogtreecommitdiff
path: root/modeling/productions_math.py
diff options
context:
space:
mode:
Diffstat (limited to 'modeling/productions_math.py')
-rw-r--r--modeling/productions_math.py37
1 files changed, 17 insertions, 20 deletions
diff --git a/modeling/productions_math.py b/modeling/productions_math.py
index 580a031..120dddf 100644
--- a/modeling/productions_math.py
+++ b/modeling/productions_math.py
@@ -7,6 +7,7 @@ import prod_multi
import prod_numbers
import prod_procedure
import prod_motor
+import prod_vis
import model_env
@@ -30,10 +31,14 @@ def init():
"proc",
"op1",
"arg1_1",
+ "arg1_1_idx"
"arg1_2",
+ "arg1_2_idx"
"op2",
"arg2_1",
+ "arg2_1_idx"
"arg2_2",
+ "arg2_2_idx"
),
)
actr.chunktype(
@@ -45,7 +50,9 @@ def init():
"op",
"nextop",
"arg1",
+ "arg1_idx"
"arg2",
+ "arg2_idx"
"result",
"expand_slot",
"hundreds1",
@@ -79,11 +86,15 @@ def init():
"procedure",
proc="proc1",
op1="add",
- arg1_1=99,
- arg1_2=211,
+ arg1_1="Algen",
+ arg1_1_idx=1,
+ arg1_2="Mineralien",
+ arg1_2_idx=1,
op2="greater",
- arg2_1=10,
- arg2_2=2,
+ arg2_1="result1",
+ arg2_1_idx=0,
+ arg2_2="Algen",
+ arg2_2_idx=1,
)
)
@@ -135,21 +146,6 @@ def init():
def add_goal(goal, op, arg1, arg2):
goal.add(actr.makechunk("", "math_goal", op=op, task=op, arg1=arg1, arg2=arg2))
- # imaginal.add(
- # actr.makechunk(
- # "",
- # "math_op",
- # op=op,
- # arg1=arg1,
- # arg2=arg2,
- # ones1=get_digit(arg1, 0),
- # tens1=get_digit(arg1, 1),
- # hundreds1=get_digit(arg1, 2),
- # ones2=get_digit(arg2, 0),
- # tens2=get_digit(arg2, 1),
- # hundreds2=get_digit(arg2, 2),
- # )
- # )
def general_prod(Model):
@@ -198,6 +194,7 @@ def start():
less_prods = prod_comp.less_than(Model)
multi_prods = prod_multi.multiplication(Model)
motor_prods = prod_motor.procedures(Model)
+ visual_prods = prod_vis.procedures(Model)
# for prod in multi_prods:
# print(prod)
@@ -218,7 +215,7 @@ def start():
# x.run(max_time=8)
print("Simulation time: ", sim.show_time())
print("goal: ", goal)
- print(list(env))
+ # print(list(env))
# print("imaginal: ", imaginal)
# imaginal.show("hundreds_ans")
# imaginal.show("tens_ans")