summaryrefslogtreecommitdiff
path: root/modeling/prod_vis.py
diff options
context:
space:
mode:
authorDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-08-07 07:52:12 +0200
committerDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-08-07 07:52:12 +0200
commit347d3c943462a73c35c9d246c4970833d96180bf (patch)
treef3507e40a3a76b07b507fb294871ad777a3a27d6 /modeling/prod_vis.py
parentd3a81759c311a9ccfc4d17d2cb9347b9367cb7d1 (diff)
full experiment, fixed and random
Diffstat (limited to 'modeling/prod_vis.py')
-rw-r--r--modeling/prod_vis.py237
1 files changed, 234 insertions, 3 deletions
diff --git a/modeling/prod_vis.py b/modeling/prod_vis.py
index 3360b33..c3c113d 100644
--- a/modeling/prod_vis.py
+++ b/modeling/prod_vis.py
@@ -1,9 +1,240 @@
#!/usr/bin/env python3
-
+# unrolled search loops and hardcoded positions
+# - missing feature (visual: relative and multiple constraints)
+# - ease of implementation
def procedures(Model):
prods = []
+ vis_find_next_proc = Model.productionstring(
+ name = "vis_find_next_proc",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_header
+ vis_counter 1
+ +visual_location>
+ isa _visuallocation
+ value Formeln
+ """
+ )
+ vis_find_next_proc_header_done = Model.productionstring(
+ name = "vis_find_next_proc_header_done",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_header
+ =visual_location>
+ isa _visuallocation
+ screen_x =x
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_find
+ +visual_location>
+ isa _visuallocation
+ screen_x =x
+ screen_y 200
+ """
+ )
+ vis_find_next_proc_find = Model.productionstring(
+ name = "vis_find_next_proc_find",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_find
+ =visual_location>
+ isa _visuallocation
+ ?visual>
+ state free
+ buffer empty
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_read
+ +visual>
+ isa _visual
+ cmd move_attention
+ screen_pos =visual_location
+ """
+ )
+ vis_find_next_proc_read = Model.productionstring(
+ name = "vis_find_next_proc_read",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_read
+ =visual_location>
+ isa _visuallocation
+ screen_y =y
+ =visual>
+ isa _visual
+ value =value
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_answer
+ proc =value
+ +visual_location>
+ isa _visuallocation
+ screen_y =y
+ screen_x 100
+ """
+ )
+ vis_find_next_proc_answer = Model.productionstring(
+ name = "vis_find_next_proc_answer",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_answer
+ ?visual>
+ state free
+ =visual_location>
+ isa _visuallocation
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_answer_check
+ +visual>
+ isa _visual
+ cmd move_attention
+ screen_pos =visual_location
+ """
+ )
+ vis_find_next_proc_answer_empty = Model.productionstring(
+ name = "vis_find_next_proc_answer_empty",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_answer_check
+ =visual>
+ isa _visual
+ value null
+ ==>
+ =g>
+ isa math_goal
+ op None
+ vis_counter None
+ ~visual>
+ ~visual_location>
+ ~retrieval>
+ """
+ )
+ vis_find_next_proc_answer_1_full = Model.productionstring(
+ name = "vis_find_next_proc_answer_1_full",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_answer_check
+ vis_counter 1
+ =visual>
+ isa _visual
+ value ~null
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_find
+ vis_counter 2
+ +visual_location>
+ isa _visuallocation
+ screen_x 0
+ screen_y 300
+ ~visual>
+ """
+ )
+ vis_find_next_proc_answer_2_full = Model.productionstring(
+ name = "vis_find_next_proc_answer_2_full",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_answer_check
+ vis_counter 2
+ =visual>
+ isa _visual
+ value ~null
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_find
+ vis_counter 3
+ +visual_location>
+ isa _visuallocation
+ screen_x 0
+ screen_y 400
+ ~visual>
+ """
+ )
+ vis_find_next_proc_answer_3_full = Model.productionstring(
+ name = "vis_find_next_proc_answer_3_full",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_answer_check
+ vis_counter 3
+ =visual>
+ isa _visual
+ value ~null
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_find
+ vis_counter 4
+ +visual_location>
+ isa _visuallocation
+ screen_x 0
+ screen_y 500
+ ~visual>
+ """
+ )
+ vis_find_next_proc_answer_4_full = Model.productionstring(
+ name = "vis_find_next_proc_answer_4_full",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_answer_check
+ vis_counter 4
+ =visual>
+ isa _visual
+ value ~null
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_find
+ vis_counter 5
+ +visual_location>
+ isa _visuallocation
+ screen_x 0
+ screen_y 600
+ ~visual>
+ """
+ )
+ vis_find_next_proc_answer_5_full = Model.productionstring(
+ name = "vis_find_next_proc_answer_5_full",
+ string="""
+ =g>
+ isa math_goal
+ op find_next_proc_answer_check
+ vis_counter 5
+ =visual>
+ isa _visual
+ value ~null
+ ==>
+ =g>
+ isa math_goal
+ op find_next_proc_find
+ vis_counter 6
+ +visual_location>
+ isa _visuallocation
+ screen_x 0
+ screen_y 700
+ ~visual>
+ """
+ )
+
vis_find_arg1_header = Model.productionstring(
name="vis_find_arg1_header",
string="""
@@ -1052,7 +1283,7 @@ def procedures(Model):
=g>
isa math_goal
op max_arg2_attend
- arg2 ~Answers
+ arg2 ~Kennwerte
arg2_idx max
vis_counter 1
=visual_location>
@@ -1620,7 +1851,7 @@ def procedures(Model):
string="""
=g>
isa math_goal
- arg2 Answers
+ arg2 Kennwerte
op max_arg2_attend
arg2_idx max
vis_counter 1