diff options
author | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-07-05 15:18:14 +0200 |
---|---|---|
committer | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-07-05 15:18:14 +0200 |
commit | db26a0849a47773770df1e737e8faa5d9ad5d52b (patch) | |
tree | b84b7ab88742de694864fa4d16d434b552ceddb1 | |
parent | 4721cd226e693c1933c22d643d982d29e9b59121 (diff) |
start multi procs
-rw-r--r-- | modeling/productions_math.py | 24 |
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)) |