Skip to content

Commit 7d25f46

Browse files
committed
Revert changes to primitives.scm
1 parent 73350a5 commit 7d25f46

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

src/btree-psi.scm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
;
2-
; btree-eva.scm
2+
; btree-psi.scm
33
;
4-
; Eva behavior tree (for the Eva blender model animations).
4+
; OpenPsi-based Eva behavior action selection (for the Eva blender
5+
; model animations).
56
;
67
; Runs a set of defined behaviors that express Eva's personality.
78
; This version integrates the OpenCog chatbot.
@@ -36,6 +37,7 @@
3637
(use-modules (opencog exec)) ; needed for cog-evaluate! in put_atoms.py
3738
(use-modules (opencog eva-model)) ; needed for defines in put_atoms.py
3839
(use-modules (opencog eva-behavior))
40+
(use-modules (opencog openpsi))
3941

4042
; Load the Eva personality configuration.
4143
; (display %load-path)
@@ -51,7 +53,7 @@
5153
; Load the chat modules.
5254
;
5355
(use-modules (opencog nlp))
54-
(use-modules (opencog nlp chatbot-eva))
56+
(use-modules (opencog nlp chatbot))
5557

5658
; Work-around to weird bug: must load relex2logic at the top level.
5759
(use-modules (opencog nlp relex2logic))
@@ -68,7 +70,8 @@
6870
; Must run in a new thread, else it deadlocks in python,
6971
; since the text processing results in python calls.
7072
; (lambda () (process-query "luser" (cog-name txt)))
71-
(lambda () (grounded-talk "luser" (cog-name txt)))
73+
; (lambda () (grounded-talk "luser" (cog-name txt)))
74+
(lambda () (chat (cog-name txt)))
7275
)
7376
(stv 1 1)
7477
)

src/primitives.scm

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
(use-modules (opencog) (opencog query) (opencog exec))
1515
(use-modules (opencog atom-types))
1616
(use-modules (opencog python))
17-
(use-modules (opencog openpsi))
1817

1918
; Try loading the python code from this directory;
2019
; else go for the install directory. This is kind-of hacky;
@@ -182,16 +181,6 @@ except:
182181
;; Main loop control
183182
(define do-run-loop #t)
184183

185-
;(define-public (behavior-tree-run)
186-
;"
187-
; behavior-tree-run
188-
189-
; Run the Eva behavior tree main loop (in a new thread),
190-
; Call (behavior-tree-halt) to exit the loop.
191-
;"
192-
; (set! do-run-loop #t)
193-
; (call-with-new-thread
194-
; (lambda () (cog-evaluate! (DefinedPredicateNode "main loop")))))
195184
(define-public (behavior-tree-run)
196185
"
197186
behavior-tree-run
@@ -201,11 +190,7 @@ except:
201190
"
202191
(set! do-run-loop #t)
203192
(call-with-new-thread
204-
(lambda () (cog-evaluate! (DefinedPredicateNode "main loop"))))
205-
(psi-run)
206-
;(while #t ((usleep 100000)(psi-step)) ) causes crash
207-
208-
)
193+
(lambda () (cog-evaluate! (DefinedPredicateNode "main loop")))))
209194

210195
(define-public (behavior-tree-halt)
211196
"

0 commit comments

Comments
 (0)