Commit c37c1241 authored by mrk022's avatar mrk022

latest update

parent 3ceddefe
......@@ -47,6 +47,8 @@ class TutorState:
moved = True
q.enqueue(currentNode.right)
q.dequeue()
self.combine_like_terms(True) # will need to change this to just combine variables 4x + 0x
return self.tree.get_expression()
#self.tree.printTree()
#self.tree.get_expression()
......@@ -166,10 +168,10 @@ class UserState(ccm.Model): #ccm.ProductionSystem
class IntelligentTutor(ACTR):
goal = Buffer()
user = UserState("4x+7=5x+2")
tutor = TutorState("4x + 3 = 2x + 7")
tutor.move_constants_right()
tutor.combine_like_terms(False)
tutor.combine_like_terms(True)
tutor = TutorState("4x + 7 = 5x + 2")
#tutor.move_constants_right()
#tutor.combine_like_terms(False)
#tutor.combine_like_terms(True)
def init():
cc = user.get_input()
......@@ -177,12 +179,13 @@ class IntelligentTutor(ACTR):
goal.set(user.get_state(cc)) #
def moved_constants(goal="move_constants"): #user="ready:True"
#execute move constants on current equation
#check if user input is the same as what we expect
#if so then
print("here??")
user.get_input()
goal.set(user.state)
tutorEq = tutor.move_constants_right()
if tutorEq == user.equation:
user.get_input()
goal.set(user.state)
else:
print("INVALID")
goal.set("end_process")
#if it is invalid then move to invalid state, and return correct state we found in that function
#print("constants")
#goal.set("add_constants")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment