diff options
author | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-07-12 12:37:15 +0200 |
---|---|---|
committer | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-07-12 12:37:15 +0200 |
commit | f520b7a6e163ab4e88ae51598ecef80cdad3e19d (patch) | |
tree | d98b1a27de950f0252ba8e751877129896a01e67 /modeling/productions_math.py | |
parent | e0eb227cd77550d7f34521406b8ab77017183134 (diff) |
add overall procedure
Diffstat (limited to 'modeling/productions_math.py')
-rw-r--r-- | modeling/productions_math.py | 27 |
1 files changed, 20 insertions, 7 deletions
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") |