Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AICogSciFinalProject
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mrk022
AICogSciFinalProject
Commits
c37c1241
Commit
c37c1241
authored
Dec 04, 2019
by
mrk022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latest update
parent
3ceddefe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
tutor.py
tutor.py
+13
-10
No files found.
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 = 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")
...
...
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