From f520b7a6e163ab4e88ae51598ecef80cdad3e19d Mon Sep 17 00:00:00 2001 From: Niclas Dobbertin Date: Fri, 12 Jul 2024 12:37:15 +0200 Subject: add overall procedure --- modeling/productions_math.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'modeling/productions_math.py') diff --git a/modeling/productions_math.py b/modeling/productions_math.py index a064710..cbacfa0 100644 --- a/modeling/productions_math.py +++ b/modeling/productions_math.py @@ -80,31 +80,44 @@ def start(): environment_process=env.environment_process, stimuli=envs, # triggers="space", - triggers="b" + triggers="b", ) i = 1 userinput = "" while True: sim.step() - if sim.current_event.time >= 40: + if sim.current_event.time >= 50: 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 == "NO RULE FOUND": - print(goal) + # if sim.current_event.action == "NO RULE FOUND": + # print(goal) 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") - ) + if i <= 6: + goal.add( + actr.makechunk( + "", "math_goal", proc=f"proc{i}", ones_carry="hello" + ) + ) + elif i == 7: + goal.add( + actr.makechunk( + "", "math_goal", proc="proc_overall", ones_carry="hello" + ) + ) + elif i > 7: + print("DONE") + break # sim.run(max_time=25) print(userinput) print("Simulation time: ", sim.show_time()) print("goal: ", goal) + print(sim.current_event) # print(list(env)) # print("imaginal: ", imaginal) # imaginal.show("hundreds_ans") -- cgit v1.2.3