summaryrefslogtreecommitdiff
path: root/modeling
diff options
context:
space:
mode:
Diffstat (limited to 'modeling')
-rw-r--r--modeling/productions_math.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/modeling/productions_math.py b/modeling/productions_math.py
index 7d7a94d..aa22053 100644
--- a/modeling/productions_math.py
+++ b/modeling/productions_math.py
@@ -81,11 +81,25 @@ def start():
stimuli=envs,
triggers="space",
)
- # while True:
- # sim.step()
- # if sim.current_event.action == "KEY PRESSED: SPACE":
- # break
- sim.run(max_time=25)
+ i = 1
+ userinput = ""
+ while True:
+ sim.step()
+ if sim.current_event.time >= 20:
+ print(sim.current_event)
+ break
+ if "KEY PRESSED" in sim.current_event.action:
+ userinput = userinput + sim.current_event.action.split(":")[1]
+ if sim.current_event.action == "KEY PRESSED: SPACE":
+ i += 1
+ print(userinput)
+ print("NEW PROC")
+ goal.add(
+ actr.makechunk("", "math_goal", proc=f"proc{i}", ones_carry="hello")
+ )
+
+ # sim.run(max_time=25)
+ print(userinput)
print("Simulation time: ", sim.show_time())
print("goal: ", goal)
# print(list(env))