summaryrefslogtreecommitdiff
path: root/modeling/productions_math.py
diff options
context:
space:
mode:
Diffstat (limited to 'modeling/productions_math.py')
-rw-r--r--modeling/productions_math.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/modeling/productions_math.py b/modeling/productions_math.py
index aa22053..a064710 100644
--- a/modeling/productions_math.py
+++ b/modeling/productions_math.py
@@ -56,7 +56,7 @@ def start():
Model, DM, goal, imaginal, env = init()
# add_goal(goal, op, arg1, arg2)
add_proc(goal, "proc1")
- envs = model_env.get_env()
+ envs = model_env.generate_environments()
general_prod(Model)
prod_procedure.procedures(Model)
@@ -79,17 +79,20 @@ def start():
gui=False,
environment_process=env.environment_process,
stimuli=envs,
- triggers="space",
+ # triggers="space",
+ triggers="b"
)
i = 1
userinput = ""
while True:
sim.step()
- if sim.current_event.time >= 20:
+ if sim.current_event.time >= 40:
print(sim.current_event)
break
if "KEY PRESSED" in sim.current_event.action:
userinput = userinput + sim.current_event.action.split(":")[1]
+ if sim.current_event.action == "NO RULE FOUND":
+ print(goal)
if sim.current_event.action == "KEY PRESSED: SPACE":
i += 1
print(userinput)