Commit c37c1241 authored by mrk022's avatar mrk022
Browse files

latest update

parent 3ceddefe
...@@ -47,6 +47,8 @@ class TutorState: ...@@ -47,6 +47,8 @@ class TutorState:
moved = True moved = True
q.enqueue(currentNode.right) q.enqueue(currentNode.right)
q.dequeue() 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.printTree()
#self.tree.get_expression() #self.tree.get_expression()
...@@ -166,10 +168,10 @@ class UserState(ccm.Model): #ccm.ProductionSystem ...@@ -166,10 +168,10 @@ class UserState(ccm.Model): #ccm.ProductionSystem
class IntelligentTutor(ACTR): class IntelligentTutor(ACTR):
goal = Buffer() goal = Buffer()
user = UserState("4x+7=5x+2") user = UserState("4x+7=5x+2")
tutor = TutorState("4x + 3 = 2x + 7") tutor = TutorState("4x + 7 = 5x + 2")
tutor.move_constants_right() #tutor.move_constants_right()
tutor.combine_like_terms(False) #tutor.combine_like_terms(False)
tutor.combine_like_terms(True) #tutor.combine_like_terms(True)
def init(): def init():
cc = user.get_input() cc = user.get_input()
...@@ -177,12 +179,13 @@ class IntelligentTutor(ACTR): ...@@ -177,12 +179,13 @@ class IntelligentTutor(ACTR):
goal.set(user.get_state(cc)) # goal.set(user.get_state(cc)) #
def moved_constants(goal="move_constants"): #user="ready:True" def moved_constants(goal="move_constants"): #user="ready:True"
#execute move constants on current equation tutorEq = tutor.move_constants_right()
#check if user input is the same as what we expect if tutorEq == user.equation:
#if so then user.get_input()
print("here??") goal.set(user.state)
user.get_input() else:
goal.set(user.state) print("INVALID")
goal.set("end_process")
#if it is invalid then move to invalid state, and return correct state we found in that function #if it is invalid then move to invalid state, and return correct state we found in that function
#print("constants") #print("constants")
#goal.set("add_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