summaryrefslogtreecommitdiff
path: root/modeling
diff options
context:
space:
mode:
authorDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-04-16 03:52:52 +0200
committerDobbertin, Niclas <niclas.dobbertin@mailbox.org>2024-04-16 03:52:52 +0200
commit6814aaedb09243d677c5862b22cd201d1c4af974 (patch)
treec68bead196ac5f0ae6c49ce56db943be6bbf0656 /modeling
parent4411e6c43e26cd2979691fff8e0e3822f0aa291f (diff)
print final result
Diffstat (limited to 'modeling')
-rw-r--r--modeling/productions_math.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/modeling/productions_math.py b/modeling/productions_math.py
index c8dfc8e..93c7762 100644
--- a/modeling/productions_math.py
+++ b/modeling/productions_math.py
@@ -197,6 +197,15 @@ x = Model.simulation()
x.run()
print("goal: ", goal)
print("imaginal: ", imaginal)
+# imaginal.show("hundreds_ans")
+# imaginal.show("tens_ans")
+# imaginal.show("ones_ans")
+result_ones = str(getattr(imaginal._data.copy().pop(), "ones_ans"))
+result_tens = str(getattr(imaginal._data.copy().pop(), "tens_ans"))
+result_huns = str(getattr(imaginal._data.copy().pop(), "hundreds_ans"))
+
+result_num = result_huns + result_tens + result_ones
+print(result_num)
# print(list(DM))
numbers = [x for x in list(DM) if x.typename != "number" and x.typename != "math_op"]
numbers = [x for x in list(DM) if x.typename != "number" and x.typename == "math_op"]