diff options
Diffstat (limited to 'modeling/prod_comp.py')
| -rw-r--r-- | modeling/prod_comp.py | 119 | 
1 files changed, 69 insertions, 50 deletions
| diff --git a/modeling/prod_comp.py b/modeling/prod_comp.py index 5bf30c9..8bf53ce 100644 --- a/modeling/prod_comp.py +++ b/modeling/prod_comp.py @@ -4,24 +4,42 @@  def greater_than(Model):      prods = [] -    arg1_greater = Model.productionstring( -        name="arg1_greater", +    greater_done = Model.productionstring( +        name="greater_done",          string="""          =g>          isa         math_goal -        task        arg1 -        =imaginal> +        op          greater_done +        result      ~None +        result      =result +        arg1        =arg1 +        arg2        =arg2 +        ==> +        =g> +        isa         math_goal +        op          done +        +imaginal>          isa         math_op          op          greater +        result      =result +        arg1        =arg1 +        arg2        =arg2 +        """ +    ) + +    arg1_greater = Model.productionstring( +        name="arg1_greater", +        string=""" +        =g> +        isa         math_goal +        op          greater_arg1          hundreds1   =hun1          tens1       =ten1          ones1       =one1          ==>          =g>          isa         math_goal -        task        done -        =imaginal> -        isa             math_op +        op          greater_done          hundreds_ans    =hun1          tens_ans        =ten1          ones_ans        =one1 @@ -34,19 +52,14 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        arg2 -        =imaginal> -        isa         math_op -        op          greater +        op          greater_arg2          hundreds2   =hun2          tens2       =ten2          ones2       =one2          ==>          =g>          isa         math_goal -        task        done -        =imaginal> -        isa             math_op +        op          greater_done          hundreds_ans    =hun2          tens_ans        =ten2          ones_ans        =one2 @@ -59,17 +72,16 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        calc -        =imaginal> -        isa         math_op          op          greater          hundreds1   =hun1          hundreds2   ~=hun1          hundreds2   =hun2 +        hundreds_ans    None +        ?retrieval> +        state       free          ==>          =g>          isa         math_goal -        task        comp          +retrieval>          isa         math_op          op          greater @@ -84,19 +96,17 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        calc -        =imaginal> -        isa         math_op          op          greater          hundreds1   =hun1          hundreds2   =hun1          tens1       =ten1          tens2       ~=ten1          tens2       =ten2 +        ?retrieval> +        state       free          ==>          =g>          isa         math_goal -        task        comp          +retrieval>          isa         math_op          op          greater @@ -111,9 +121,6 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        calc -        =imaginal> -        isa         math_op          op          greater          hundreds1   =hun1          hundreds2   =hun1 @@ -122,10 +129,11 @@ def greater_than(Model):          ones1       =one1          ones2       ~=one1          ones2       =one2 +        ?retrieval> +        state       free          ==>          =g>          isa         math_goal -        task        comp          +retrieval>          isa         math_op          op          greater @@ -140,9 +148,6 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        comp -        =imaginal> -        isa         math_op          op          greater          hundreds1   =hun1          hundreds2   =hun2 @@ -155,7 +160,7 @@ def greater_than(Model):          ==>          =g>          isa         math_goal -        task        arg1 +        op          greater_arg1          """,      )      prods.append(comp_result_hun_greater_arg1) @@ -165,9 +170,6 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        comp -        =imaginal> -        isa         math_op          op          greater          hundreds1   =hun1          hundreds2   =hun2 @@ -180,7 +182,7 @@ def greater_than(Model):          ==>          =g>          isa         math_goal -        task        arg2 +        op        greater_arg2          """,      )      prods.append(comp_result_hun_greater_arg2) @@ -190,9 +192,6 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        comp -        =imaginal> -        isa         math_op          op          greater          tens1   =ten1          tens2   =ten2 @@ -205,7 +204,7 @@ def greater_than(Model):          ==>          =g>          isa         math_goal -        task        arg1 +        op        greater_arg1          """,      )      prods.append(comp_result_ten_greater_arg1) @@ -215,9 +214,6 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        comp -        =imaginal> -        isa         math_op          op          greater          tens1   =ten1          tens2   =ten2 @@ -230,7 +226,7 @@ def greater_than(Model):          ==>          =g>          isa         math_goal -        task        arg2 +        op        greater_arg2          """,      )      prods.append(comp_result_ten_greater_arg2) @@ -240,9 +236,6 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        comp -        =imaginal> -        isa         math_op          op          greater          ones1   =one1          ones2   =one2 @@ -255,7 +248,7 @@ def greater_than(Model):          ==>          =g>          isa         math_goal -        task        arg1 +        op        greater_arg1          """,      )      prods.append(comp_result_one_greater_arg1) @@ -265,9 +258,6 @@ def greater_than(Model):          string="""          =g>          isa         math_goal -        task        comp -        =imaginal> -        isa         math_op          op          greater          ones1   =one1          ones2   =one2 @@ -280,7 +270,7 @@ def greater_than(Model):          ==>          =g>          isa         math_goal -        task        arg2 +        op        greater_arg2          """,      )      prods.append(comp_result_one_greater_arg2) @@ -291,6 +281,29 @@ def greater_than(Model):  def less_than(Model):      prods = [] +    less_done = Model.productionstring( +        name="less_done", +        string=""" +        =g> +        isa         math_goal +        op          less_done +        result      ~None +        result      =result +        arg1        =arg1 +        arg2        =arg2 +        ==> +        =g> +        isa         math_goal +        op          done +        +imaginal> +        isa         math_op +        op          less +        result      =result +        arg1        =arg1 +        arg2        =arg2 +        """ +    ) +      arg1_less = Model.productionstring(          name="arg1_less",          string=""" @@ -353,6 +366,8 @@ def less_than(Model):          hundreds1   =hun1          hundreds2   ~=hun1          hundreds2   =hun2 +        ?retrieval> +        state       free          ==>          =g>          isa         math_goal @@ -380,6 +395,8 @@ def less_than(Model):          tens1       =ten1          tens2       ~=ten1          tens2       =ten2 +        ?retrieval> +        state       free          ==>          =g>          isa         math_goal @@ -409,6 +426,8 @@ def less_than(Model):          ones1       =one1          ones2       ~=one1          ones2       =one2 +        ?retrieval> +        state       free          ==>          =g>          isa         math_goal | 
