diff options
author | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-07-05 10:47:56 +0200 |
---|---|---|
committer | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-07-05 10:47:56 +0200 |
commit | 89f11b1c74664054aee78de8610344791a0c8c03 (patch) | |
tree | 743a25d58d820ee1734b218f42cc060462ab4870 | |
parent | e3d3c3343031a7aaba0f9c687928df11107d956f (diff) |
fixed lesser comparison
-rw-r--r-- | modeling/prod_comp.py | 168 |
1 files changed, 64 insertions, 104 deletions
diff --git a/modeling/prod_comp.py b/modeling/prod_comp.py index 5d3ceff..84ae370 100644 --- a/modeling/prod_comp.py +++ b/modeling/prod_comp.py @@ -277,15 +277,15 @@ def greater_than(Model): return prods -def less_than(Model): +def lesser_than(Model): prods = [] - less_done = Model.productionstring( - name="less_done", + lesser_done = Model.productionstring( + name="lesser_done", string=""" =g> isa math_goal - op less_done + op lesser_done result ~None result =result arg1 =arg1 @@ -296,81 +296,68 @@ def less_than(Model): op done +imaginal> isa math_op - op less + op lesser result =result arg1 =arg1 arg2 =arg2 """ ) - arg1_less = Model.productionstring( - name="arg1_less", + arg1_lesser = Model.productionstring( + name="arg1_lesser", string=""" =g> isa math_goal - task arg1 - =imaginal> - isa math_op - op less + op lesser_arg1 hundreds1 =hun1 tens1 =ten1 ones1 =one1 ==> =g> isa math_goal - task done - =imaginal> - isa math_op + op lesser_done hundreds_ans =hun1 tens_ans =ten1 ones_ans =one1 """, ) - prods.append(arg1_less) + prods.append(arg1_lesser) - arg2_less = Model.productionstring( - name="arg2_less", + arg2_lesser = Model.productionstring( + name="arg2_lesser", string=""" =g> isa math_goal - task arg2 - =imaginal> - isa math_op - op less + op lesser_arg2 hundreds2 =hun2 tens2 =ten2 ones2 =one2 ==> =g> isa math_goal - task done - =imaginal> - isa math_op + op lesser_done hundreds_ans =hun2 tens_ans =ten2 ones_ans =one2 """, ) - prods.append(arg2_less) + prods.append(arg2_lesser) - start_less_hun = Model.productionstring( - name="start_less_hun", + start_lesser_hun = Model.productionstring( + name="start_lesser_hun", string=""" =g> isa math_goal - task calc - =imaginal> - isa math_op - op less + op lesser hundreds1 =hun1 hundreds2 ~=hun1 hundreds2 =hun2 + hundreds_ans None ?retrieval> state free ==> =g> isa math_goal - task comp +retrieval> isa math_op op greater @@ -378,17 +365,14 @@ def less_than(Model): arg2 =hun2 """, ) - prods.append(start_less_hun) + prods.append(start_lesser_hun) - start_less_ten = Model.productionstring( - name="start_less_ten", + start_lesser_ten = Model.productionstring( + name="start_lesser_ten", string=""" =g> isa math_goal - task calc - =imaginal> - isa math_op - op less + op lesser hundreds1 =hun1 hundreds2 =hun1 tens1 =ten1 @@ -399,7 +383,6 @@ def less_than(Model): ==> =g> isa math_goal - task comp +retrieval> isa math_op op greater @@ -407,30 +390,25 @@ def less_than(Model): arg2 =ten2 """, ) - prods.append(start_less_ten) + prods.append(start_lesser_ten) - start_less_one = Model.productionstring( - name="start_less_one", + start_lesser_one = Model.productionstring( + name="start_lesser_one", string=""" =g> isa math_goal - task calc - =imaginal> - isa math_op - op less + op lesser hundreds1 =hun1 hundreds2 =hun1 tens1 =ten1 tens2 =ten1 ones1 =one1 - ones2 ~=one1 ones2 =one2 ?retrieval> state free ==> =g> isa math_goal - task comp +retrieval> isa math_op op greater @@ -438,17 +416,14 @@ def less_than(Model): arg2 =one2 """, ) - prods.append(start_less_one) + prods.append(start_lesser_one) - comp_result_hun_less_arg2 = Model.productionstring( - name="comp_result_hun_less_arg2", + comp_result_hun_lesser_arg1 = Model.productionstring( + name="comp_result_hun_lesser_arg1", string=""" =g> isa math_goal - task comp - =imaginal> - isa math_op - op less + op lesser hundreds1 =hun1 hundreds2 =hun2 =retrieval> @@ -456,24 +431,21 @@ def less_than(Model): op greater arg1 =hun1 arg2 =hun2 - result =hun1 + result =hun2 ==> =g> isa math_goal - task arg2 + op lesser_arg1 """, ) - prods.append(comp_result_hun_less_arg2) + prods.append(comp_result_hun_lesser_arg1) - comp_result_hun_less_arg1 = Model.productionstring( - name="comp_result_hun_less", + comp_result_hun_lesser_arg2 = Model.productionstring( + name="comp_result_hun_lesser_arg2", string=""" =g> isa math_goal - task comp - =imaginal> - isa math_op - op less + op lesser hundreds1 =hun1 hundreds2 =hun2 =retrieval> @@ -481,24 +453,21 @@ def less_than(Model): op greater arg1 =hun1 arg2 =hun2 - result =hun2 + result =hun1 ==> =g> isa math_goal - task arg1 + op lesser_arg2 """, ) - prods.append(comp_result_hun_less_arg1) + prods.append(comp_result_hun_lesser_arg2) - comp_result_ten_less_arg2 = Model.productionstring( - name="comp_result_ten_less_arg2", + comp_result_ten_lesser_arg1 = Model.productionstring( + name="comp_result_ten_lesser_arg1", string=""" =g> isa math_goal - task comp - =imaginal> - isa math_op - op less + op lesser tens1 =ten1 tens2 =ten2 =retrieval> @@ -506,24 +475,21 @@ def less_than(Model): op greater arg1 =ten1 arg2 =ten2 - result =ten1 + result =ten2 ==> =g> isa math_goal - task arg2 + op lesser_arg1 """, ) - prods.append(comp_result_ten_less_arg2) + prods.append(comp_result_ten_lesser_arg1) - comp_result_ten_lesser_arg1 = Model.productionstring( - name="comp_result_ten_lesser_arg1", + comp_result_ten_lesser_arg2 = Model.productionstring( + name="comp_result_ten_lesser_arg2", string=""" =g> isa math_goal - task comp - =imaginal> - isa math_op - op less + op lesser tens1 =ten1 tens2 =ten2 =retrieval> @@ -531,24 +497,21 @@ def less_than(Model): op greater arg1 =ten1 arg2 =ten2 - result =ten2 + result =ten1 ==> =g> isa math_goal - task arg1 + op lesser_arg2 """, ) - prods.append(comp_result_ten_lesser_arg1) + prods.append(comp_result_ten_lesser_arg2) - comp_result_one_less_arg2 = Model.productionstring( - name="comp_result_one_less_arg2", + comp_result_one_lesser_arg1 = Model.productionstring( + name="comp_result_one_lesser_arg1", string=""" =g> isa math_goal - task comp - =imaginal> - isa math_op - op less + op lesser ones1 =one1 ones2 =one2 =retrieval> @@ -556,24 +519,21 @@ def less_than(Model): op greater arg1 =one1 arg2 =one2 - result =one1 + result =one2 ==> =g> isa math_goal - task arg2 + op lesser_arg1 """, ) - prods.append(comp_result_one_less_arg2) + prods.append(comp_result_one_lesser_arg1) - comp_result_one_lesser_arg1 = Model.productionstring( - name="comp_result_one_lesser_arg1", + comp_result_one_lesser_arg2 = Model.productionstring( + name="comp_result_one_lesser_arg2", string=""" =g> isa math_goal - task comp - =imaginal> - isa math_op - op less + op lesser ones1 =one1 ones2 =one2 =retrieval> @@ -581,13 +541,13 @@ def less_than(Model): op greater arg1 =one1 arg2 =one2 - result =one2 + result =one1 ==> =g> isa math_goal - task arg1 + op lesser_arg2 """, ) - prods.append(comp_result_one_lesser_arg1) + prods.append(comp_result_one_lesser_arg2) return prods |