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_multi.py | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) (limited to 'modeling/prod_multi.py') diff --git a/modeling/prod_multi.py b/modeling/prod_multi.py index c7e2cbd..9fd088d 100644 --- a/modeling/prod_multi.py +++ b/modeling/prod_multi.py @@ -16,6 +16,95 @@ def multiplication(Model): # ) # prods.append(switch_mul) + mul_arg1_1 = Model.productionstring( + name="mul_arg1_1", + string=""" + =g> + isa math_goal + op mul + arg1 1 + arg1 =arg1 + arg2 =arg2 + ==> + =g> + isa math_goal + op done + result =arg2 + +imaginal> + isa math_op + op mul + arg1 =arg1 + arg2 =arg2 + result =arg2 + """ + ) + mul_arg2_1 = Model.productionstring( + name="mul_arg2_1", + string=""" + =g> + isa math_goal + op mul + arg2 1 + arg1 =arg1 + arg2 =arg2 + ==> + =g> + isa math_goal + op done + result =arg1 + +imaginal> + isa math_op + op mul + arg1 =arg1 + arg2 =arg2 + result =arg1 + """ + ) + mul_arg1_0 = Model.productionstring( + name="mul_arg1_0", + string=""" + =g> + isa math_goal + op mul + arg1 0 + arg1 =arg1 + arg2 =arg2 + ==> + =g> + isa math_goal + op done + result 0 + +imaginal> + isa math_op + op mul + arg1 =arg1 + arg2 =arg2 + result 0 + """ + ) + mul_arg2_0 = Model.productionstring( + name="mul_arg2_0", + string=""" + =g> + isa math_goal + op mul + arg2 0 + arg1 =arg1 + arg2 =arg2 + ==> + =g> + isa math_goal + op done + result 0 + +imaginal> + isa math_op + op mul + arg1 =arg1 + arg2 =arg2 + result 0 + """ + ) + mul_start = Model.productionstring( name="mul_start", string=""" -- cgit v1.2.3