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
77efe1b5
Commit
77efe1b5
authored
Nov 26, 2019
by
mrk022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tutor file
parent
f88ba9d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
tutor.py
tutor.py
+69
-0
No files found.
tutor.py
0 → 100644
View file @
77efe1b5
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
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