forked from tcstewar/ccmsuite
-
Notifications
You must be signed in to change notification settings - Fork 9
/
pm_3.py
executable file
·40 lines (33 loc) · 1.49 KB
/
pm_3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# initial code to set up Python ACT-R
import ccm
from ccm.lib.actr import *
log=ccm.log(html=True)
# define the model
class ExpertCountingModel(ACTR):
goal=Buffer()
def countFromOne(goal='action:counting current:one target:!one'):
goal.modify(current='two')
def countFromTwo(goal='action:counting current:two target:!two'):
goal.modify(current='three')
def countFromThree(goal='action:counting current:three target:!three'):
goal.modify(current='four')
def countFromFour(goal='action:counting current:four target:!four'):
goal.modify(current='five')
def countFromFive(goal='action:counting current:five target:!five'):
goal.modify(current='six')
def countFromSix(goal='action:counting current:six target:!six'):
goal.modify(current='seven')
def countFromSeven(goal='action:counting current:seven target:!seven'):
goal.modify(current='eight')
def countFromEight(goal='action:counting current:eight target:!eight'):
goal.modify(current='nine')
def countFromNine(goal='action:counting current:nine target:!nine'):
goal.modify(current='ten')
def countFinished(goal='action:counting current:?x target:?x'):
print('Finished counting to',x)
goal.clear()
# run the model
model=ExpertCountingModel()
ccm.log_everything(model)
model.goal.set('action:counting current:one target:five')
model.run()