#check if user input is the same as what we expect
#if so then
user.get_input()
goal.set(user.state)
#if it is invalid then move to invalid state, and return correct state we found in that function
#print("constants")
#goal.set("add_constants")
defadd_constants(goal="add_constants"):
print("add")
# use tree functionality to add constants, pass in expression with two constants to expression tree and solve
# generate new correct equation based on this result
# check if user input is the same as what we caluclated
# if it is correct then
user.get_input()
goal.set(user.state)
# if it is invalid then move to the invalid state
defmoved_variables(goal="move_variables"):
#user.moveVariables()
...
...
@@ -124,6 +127,12 @@ class IntelligentTutor(ACTR):
print("add")
goal.set("end_process")
defincorrect_state(goal="invalid state"):
print("You have entered an invalid state. We anticipated the correct step to be: \n Please continue solving the problem with the corrected equation above.")
# need to print what correct state would have been