summaryrefslogtreecommitdiff
path: root/modeling/prod_subtraction.py
diff options
context:
space:
mode:
authorDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-08-07 07:52:12 +0200
committerDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-08-07 07:52:12 +0200
commit347d3c943462a73c35c9d246c4970833d96180bf (patch)
treef3507e40a3a76b07b507fb294871ad777a3a27d6 /modeling/prod_subtraction.py
parentd3a81759c311a9ccfc4d17d2cb9347b9367cb7d1 (diff)
full experiment, fixed and random
Diffstat (limited to 'modeling/prod_subtraction.py')
-rw-r--r--modeling/prod_subtraction.py22
1 files changed, 12 insertions, 10 deletions
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>