Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mrk022
AICogSciFinalProject
Commits
c37c1241
Commit
c37c1241
authored
Dec 04, 2019
by
mrk022
Browse files
latest update
parent
3ceddefe
Changes
1
Hide whitespace changes
Inline
Side-by-side
tutor.py
View file @
c37c1241
...
...
@@ -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
=
2
x +
7
"
)
tutor
.
move_constants_right
()
tutor
.
combine_like_terms
(
False
)
tutor
.
combine_like_terms
(
True
)
tutor
=
TutorState
(
"4x +
7
=
5
x +
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")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment