diff options
author | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-06-21 14:57:28 +0200 |
---|---|---|
committer | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-06-21 14:57:28 +0200 |
commit | ff52130ae894942d8d1006eb5894015300512eed (patch) | |
tree | 7804146c13c7c25cbe3fe680658f7dd72da7d2f6 /modeling | |
parent | 76ef769e1770ab0510845f7ffcc0299f0c165d4f (diff) |
update
Diffstat (limited to 'modeling')
-rw-r--r-- | modeling/prod_vis.py | 54 | ||||
-rw-r--r-- | modeling/productions_math.py | 11 |
2 files changed, 38 insertions, 27 deletions
diff --git a/modeling/prod_vis.py b/modeling/prod_vis.py index 893c588..2bcbcc8 100644 --- a/modeling/prod_vis.py +++ b/modeling/prod_vis.py @@ -14,33 +14,43 @@ def procedures(Model): =g> isa math_goal op find_arg1_header + ?visual_location> + attended False +visual_location> isa _visuallocation value =var """ ) - # vis_find_arg1_header_done = Model.productionstring( - # name = "vis_find_arg1_header_done", - # string=""" - # =g> - # isa math_goal - # op find_arg1_header - # arg1 =var - # arg1_idx =idx - # =visual> - # isa _visual - # screen_y =vis_y - # ==> - # =g> - # isa math_goal - # op search_arg1_idx - # +visual> - # isa _visual - # cmd move_attention - # screen_x current - # screen_y nearest - # """ - # ) + vis_find_arg1_header_done = Model.productionstring( + name = "vis_find_arg1_header_done", + string=""" + =g> + isa math_goal + op find_arg1_header + arg1 =var + arg1_idx =idx + =visual_location> + isa _visuallocation + screen_x =screen_x + screen_y =screen_y + ?visual> + state free + ==> + =g> + isa math_goal + op search_arg1_idx + +visual_location> + isa _visuallocation + screen_x =screen_x + >screen_y =screen_y + """ + ) return prods + + # +visual> + # isa _visual + # cmd move_attention + # screen_pos =visual_location + # ~visual_location> diff --git a/modeling/productions_math.py b/modeling/productions_math.py index 120dddf..57a655a 100644 --- a/modeling/productions_math.py +++ b/modeling/productions_math.py @@ -21,6 +21,7 @@ def init(): Model = actr.ACTRModel(environment=env) DM = Model.decmem + Model.visualBuffer("visual", "visual_location", DM, finst=4) goal = Model.goal imaginal = Model.set_goal(name="imaginal", delay=0.2) @@ -208,11 +209,11 @@ def start(): stimuli=envs, triggers="space", ) - while True: - sim.step() - if sim.current_event.action == "KEY PRESSED: SPACE": - break - # x.run(max_time=8) + # while True: + # sim.step() + # if sim.current_event.action == "KEY PRESSED: SPACE": + # break + sim.run(max_time=8) print("Simulation time: ", sim.show_time()) print("goal: ", goal) # print(list(env)) |