Commit 77efe1b5 authored by mrk022's avatar mrk022
Browse files

tutor file

parent f88ba9d7
import ccm
from ccm.lib.actr import *
class UserState(ccm.ProductionSystem):
#moveConstants = "0" # move constants is 0 when need to move them, 1 when move variables, 2 when neither
ready = False
def init(self, equation):
self.equation = equation
self.state = "none"
self.end = False
def get_input():
user_step = input("Please enter your next step: ") #figure out what user step means
# call some get_state() function comparing user step to what state should be
self.state = "move_constants"
ready = True
def moveConstants():
print("Constants moved to one side of equation")
#self.state = "move_constants"
def moveVariables():
print("Variables moved to one side of equation")
#self.state = "move_variables"
class IntelligentTutor(ACTR):
goal = Buffer()
user = UserState()
def init(self):
user.get_input()
goal.set(user.state)
def moved_constants(user="ready:True", goal="move_constants"):
user.moveConstants()
goal.set("add_constants")
def add_constants(goal= "add_constants"):
goal.set("move_variables")
def moved_variables(user="ready:True", goal="move_variables"):
user.moveVariables()
goal.set("add_variables")
def add_variables(goal = "add_variables"):
goal.set()
def end_process(goal = "end_process"):
goal.set("Simulation Complete!")
self.stop()
class EmptyEnvironment(ccm.Model):
pass
def main():
#eqn = "3x + 4 = 0"
env_name = EmptyEnvironment()
agent_name = IntelligentTutor()
env_name.agent = agent_name
ccm.log_everything(env_name)
env_name.run()
main()
\ No newline at end of file
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