Skip to content

Commit

Permalink
Merge pull request #20 from loonwerks/Year_3
Browse files Browse the repository at this point in the history
Restructuring for Final Delivery
  • Loading branch information
ParthGaneriwala authored Mar 29, 2023
2 parents d7d4ebd + d0a8ac5 commit 66cb7f9
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
File renamed without changes.
66 changes: 66 additions & 0 deletions examples/counter/counter.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
(clear-all)

(define-model count

(sgp :esc t :lf .05 :trace-detail high)


(chunk-type number number next)
(chunk-type count-from start end count)

(add-dm
(one ISA number number one next two)
(two ISA number number two next three)
(three ISA number number three next four)
(four ISA number number four next five)
(five ISA number number five)
(first-goal ISA count-from start two end four))

(goal-focus first-goal)

(p start
=goal>
ISA count-from
start =num1
count nil
==>
=goal>
ISA count-from
count =num1
+retrieval>
ISA number
number =num1
)

(p increment
=goal>
ISA count-from
count =num1
- end =num1
=retrieval>
ISA number
number =num1
next =num2
==>
=goal>
ISA count-from
count =num2
+retrieval>
ISA number
number =num2
!output! (=num1)
)

(p stop
=goal>
ISA count-from
count =num
end =num
=retrieval>
ISA number
number =num
==>
-goal>
!output! (=num)
)
)
File renamed without changes.

0 comments on commit 66cb7f9

Please sign in to comment.