From 347d3c943462a73c35c9d246c4970833d96180bf Mon Sep 17 00:00:00 2001 From: "Dobbertin, Niclas" Date: Wed, 7 Aug 2024 07:52:12 +0200 Subject: full experiment, fixed and random --- modeling/prod_subtraction.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'modeling/prod_subtraction.py') diff --git a/modeling/prod_subtraction.py b/modeling/prod_subtraction.py index a0ac8b7..91137bb 100644 --- a/modeling/prod_subtraction.py +++ b/modeling/prod_subtraction.py @@ -17,29 +17,31 @@ def subtraction(Model): ==> =g> isa math_goal + op sub_retrieve +retrieval> isa math_op - op sub - arg1 =arg1 + op add + result =arg1 arg2 =arg2 """, ) # Can remember addition fact, addition done + # TODO: save all sub-facts as addition facts? sub_retrieve_success = Model.productionstring( name="sub_retrieve_success", string=""" =g> isa math_goal - op sub + op sub_retrieve arg1 =arg1 - arg2 =arg1 + arg2 =arg2 =retrieval> isa math_op op add - arg1 =arg1 + arg1 =result arg2 =arg2 - result =result + result =arg1 ==> =g> isa math_goal @@ -47,10 +49,10 @@ def subtraction(Model): result =result +imaginal> isa math_op - op sub - arg1 =arg1 + op add + arg1 =result arg2 =arg2 - result =result + result =arg1 ~retrieval> """, ) @@ -59,7 +61,7 @@ def subtraction(Model): string=""" =g> isa math_goal - op sub + op sub_retrieve ones1 =num1 ones2 =num2 ?retrieval> -- cgit v1.2.3