diff options
Diffstat (limited to 'modeling')
-rw-r--r-- | modeling/model_env.py | 10 | ||||
-rw-r--r-- | modeling/productions_math.py | 27 |
2 files changed, 14 insertions, 23 deletions
diff --git a/modeling/model_env.py b/modeling/model_env.py index c548e99..6b8b210 100644 --- a/modeling/model_env.py +++ b/modeling/model_env.py @@ -4,11 +4,13 @@ def generate_environments(): envs = [] - screen = {} - generate_variables(screen) - generate_procedures(screen) + for i in range(3): + screen = {} + screen["id"] = {"text": i, "position":(0,0)} + generate_variables(screen) + generate_procedures(screen) - envs.append(screen) + envs.append(screen) return envs diff --git a/modeling/productions_math.py b/modeling/productions_math.py index cbacfa0..1a756c9 100644 --- a/modeling/productions_math.py +++ b/modeling/productions_math.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import pyactr as actr +from pprint import pprint from model_init import init import prod_addition @@ -94,6 +95,7 @@ def start(): # if sim.current_event.action == "NO RULE FOUND": # print(goal) if sim.current_event.action == "KEY PRESSED: SPACE": + sim._Simulation__env.stimulus["Answer1"]["text"] = "99" i += 1 print(userinput) print("NEW PROC") @@ -118,27 +120,14 @@ def start(): print("Simulation time: ", sim.show_time()) print("goal: ", goal) print(sim.current_event) - # print(list(env)) + pprint(vars(sim)) + pprint(vars(sim._Simulation__env)) + # print(sim.__env) + # sim.__printenv__() + # print(envs.stimulus) # 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" - # ] - # print(numbers) math_goals = [sim for sim in list(DM) if sim.typename == "procedure"] - print(math_goals) + # print(math_goals) if __name__ == "__main__": |