From db26a0849a47773770df1e737e8faa5d9ad5d52b Mon Sep 17 00:00:00 2001 From: Niclas Dobbertin Date: Fri, 5 Jul 2024 15:18:14 +0200 Subject: start multi procs --- modeling/productions_math.py | 24 +++++++++++++++++++----- 1 file 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)) -- cgit v1.2.3