diff options
| author | Dobbertin, Niclas <niclas.dobbertin@mailbox.org> | 2024-06-21 19:59:07 +0200 | 
|---|---|---|
| committer | Dobbertin, Niclas <niclas.dobbertin@mailbox.org> | 2024-06-21 19:59:07 +0200 | 
| commit | eb2e5ca2ffa74e3dd2579dcb70a347e6cd481545 (patch) | |
| tree | ad35fe47a230069b4f33f63c928e007011aceaf8 /modeling/prod_vis.py | |
| parent | ff52130ae894942d8d1006eb5894015300512eed (diff) | |
visual search
Diffstat (limited to 'modeling/prod_vis.py')
| -rw-r--r-- | modeling/prod_vis.py | 372 | 
1 files changed, 366 insertions, 6 deletions
| diff --git a/modeling/prod_vis.py b/modeling/prod_vis.py index 2bcbcc8..4fc1883 100644 --- a/modeling/prod_vis.py +++ b/modeling/prod_vis.py @@ -22,6 +22,7 @@ def procedures(Model):          """      ) +    # start value index search      vis_find_arg1_header_done = Model.productionstring(          name = "vis_find_arg1_header_done",          string=""" @@ -30,6 +31,8 @@ def procedures(Model):          op          find_arg1_header          arg1        =var          arg1_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter          =visual_location>          isa         _visuallocation          screen_x    =screen_x @@ -40,17 +43,374 @@ def procedures(Model):          =g>          isa         math_goal          op          search_arg1_idx +        vis_counter 1          +visual_location>          isa         _visuallocation          screen_x    =screen_x -        >screen_y  =screen_y +        screen_y    closest +        +retrieval> +        isa         number +        number      1          """      ) +    vis_find_arg1_search_step1 = Model.productionstring( +        name = "vis_find_arg1_search_step1", +        string=""" +        =g> +        isa         math_goal +        op          search_arg1_idx +        arg1        =var +        arg1_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        =retrieval> +        isa         number +        number      =vis_counter +        next        =next +        ==> +        =g> +        isa         math_goal +        op          search_arg1_idx +        vis_counter =next +        +visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    closest +        +retrieval> +        isa         number +        number      =next +        """ +    ) + +    vis_find_arg1_search_step2 = Model.productionstring( +        name = "vis_find_arg1_search_step2", +        string=""" +        =g> +        isa         math_goal +        op          search_arg1_idx +        arg1        =var +        arg1_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        =retrieval> +        isa         number +        number      =vis_counter +        next        =next +        ==> +        =g> +        isa         math_goal +        op          search_arg1_idx +        vis_counter =next +        +visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    400 +        +retrieval> +        isa         number +        number      =next +        """ +    ) + +    vis_find_arg1_search_step3 = Model.productionstring( +        name = "vis_find_arg1_search_step3", +        string=""" +        =g> +        isa         math_goal +        op          search_arg1_idx +        arg1        =var +        arg1_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        =retrieval> +        isa         number +        number      =vis_counter +        next        =next +        ==> +        =g> +        isa         math_goal +        op          search_arg1_idx +        vis_counter =next +        +visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    500 +        +retrieval> +        isa         number +        number      =next +        """ +    ) + +    vis_find_arg1_search_done = Model.productionstring( +        name="vis_find_arg1_search_done", +        string=""" +        =g> +        isa         math_goal +        arg1_idx    =idx +        vis_counter =idx +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        ==> +        =g> +        isa         math_goal +        op          search_arg1_done +        +visual> +        isa         _visual +        cmd         move_attention +        screen_pos  =visual_location +        ~visual_location> +        """ +    ) + +    vis_find_arg1_replace = Model.productionstring( +        name="vis_find_arg1_replace", +        string=""" +        =g> +        isa         math_goal +        op          search_arg1_done +        arg1_idx    =idx +        vis_counter =idx +        =visual> +        isa         _visual +        value       =arg1 +        ==> +        =g> +        isa         math_goal +        op          check_if_number_arg2_start +        arg1        =arg1 +        vis_counter None +        ~visual> +        """ +    ) + + +    vis_find_arg2_header = Model.productionstring( +        name = "vis_find_arg2_header", +        string=""" +        =g> +        isa         math_goal +        op          vis_find_arg2 +        arg2        =var +        ==> +        =g> +        isa         math_goal +        op          find_arg2_header +        ?visual_location> +        attended    False +        +visual_location> +        isa         _visuallocation +        value       =var +        """ +    ) + +    # start value index search +    vis_find_arg2_header_done = Model.productionstring( +        name = "vis_find_arg2_header_done", +        string=""" +        =g> +        isa         math_goal +        op          find_arg2_header +        arg2        =var +        arg2_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        ==> +        =g> +        isa         math_goal +        op          search_arg2_idx +        vis_counter 1 +        +visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    ~=screen_y +        screen_y    closest +        +retrieval> +        isa         number +        number      1 +        """ +    ) + +    vis_find_arg2_search_step1 = Model.productionstring( +        name = "vis_find_arg2_search_step1", +        string=""" +        =g> +        isa         math_goal +        op          search_arg2_idx +        arg2        =var +        arg2_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        =retrieval> +        isa         number +        number      =vis_counter +        next        =next +        ==> +        =g> +        isa         math_goal +        op          search_arg2_idx +        vis_counter =next +        +visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    300 +        +retrieval> +        isa         number +        number      =next +        """ +    ) + +    vis_find_arg2_search_step2 = Model.productionstring( +        name = "vis_find_arg2_search_step2", +        string=""" +        =g> +        isa         math_goal +        op          search_arg2_idx +        arg2        =var +        arg2_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        =retrieval> +        isa         number +        number      =vis_counter +        next        =next +        ==> +        =g> +        isa         math_goal +        op          search_arg2_idx +        vis_counter =next +        +visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    400 +        +retrieval> +        isa         number +        number      =next +        """ +    ) + +    vis_find_arg2_search_step3 = Model.productionstring( +        name = "vis_find_arg2_search_step3", +        string=""" +        =g> +        isa         math_goal +        op          search_arg2_idx +        arg2        =var +        arg2_idx    =idx +        vis_counter ~=idx +        vis_counter =vis_counter +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        =retrieval> +        isa         number +        number      =vis_counter +        next        =next +        ==> +        =g> +        isa         math_goal +        op          search_arg2_idx +        vis_counter =next +        +visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    500 +        +retrieval> +        isa         number +        number      =next +        """ +    ) + + +    vis_find_arg2_search_done = Model.productionstring( +        name="vis_find_arg2_search_done", +        string=""" +        =g> +        isa         math_goal +        arg2_idx    =idx +        vis_counter =idx +        =visual_location> +        isa         _visuallocation +        screen_x    =screen_x +        screen_y    =screen_y +        ?visual> +        state       free +        ==> +        =g> +        isa         math_goal +        op          search_arg2_done +        +visual> +        isa         _visual +        cmd         move_attention +        screen_pos  =visual_location +        ~visual_location> +        """ +    ) + +    vis_find_arg2_replace = Model.productionstring( +        name="vis_find_arg2_replace", +        string=""" +        =g> +        isa         math_goal +        op          search_arg2_done +        arg2_idx    =idx +        vis_counter =idx +        =visual> +        isa         _visual +        value       =arg2 +        ==> +        =g> +        isa         math_goal +        op          done +        arg2        =arg2 +        vis_counter None +        ~visual> +        ~retrieval> +        """ +    ) + +      return prods -        # +visual> -        # isa         _visual -        # cmd         move_attention -        # screen_pos  =visual_location -        # ~visual_location> | 
