Ghost questions/issue

47 views
Skip to first unread message

Randy Deborggraeve

unread,
Jan 30, 2018, 5:43:05 PM1/30/18
to opencog
I'm trying to get the ghost module running, but i have some questions/issues with it.

Scenario1: test-ghost
scheme@(guile-user)> (use-modules (opencog)
             
(opencog nlp relex2logic)
             
(opencog openpsi)
             
(opencog eva-behavior)
             
(opencog ghost))
scheme@
(guile-user)> (ghost-parse "s: (hi robot) Hello human")
[2018-01-30 22:25:46:462] [WARN] [GHOST] Did you forget to link a goal to the rule?
$1
= #t
scheme@
(guile-user)> (ghost-parse "concept: ~young (child kid youngster)")
$2
= #t
scheme@
(guile-user)> (test-ghost "hi robot good morning")
[2018-01-30 22:26:04:431] [INFO] [GHOST] Say: "Hello human"
scheme@
(guile-user)> (test-ghost "hi robot good morning")
scheme@
(guile-user)>
When u run test-ghost for the second time i get no respose.

Scenario2: ghost-run
scheme@(guile-user)> (use-modules (opencog)
             
(opencog nlp relex2logic)
             
(opencog openpsi)
             
(opencog eva-behavior)
             
(opencog ghost))
scheme@
(guile-user)> (ghost-parse "s: (hi robot) Hello human")
[2018-01-30 22:26:49:038] [WARN] [GHOST] Did you forget to link a goal to the rule?
$1
= #t
scheme@
(guile-user)> (ghost-parse "concept: ~young (child kid youngster)")
$2
= #t
scheme@
(guile-user)> (ghost-run)
$3
= #<thread 140098361210624 (254e8c0)>
scheme@
(guile-user)> (ghost "hi robot good morning")
$4
= (StateLink
   
(AnchorNode "GHOST Currently Processing")
   
(SentenceNode "sentence@812d10bb-f1db-440f-a940-c59ab9427a25")
)

scheme@
(guile-user)> [2018-01-30 22:27:24:115] [INFO] [GHOST] Say: "Hello human"
(ghost "hi robot good morning")
$5
= (StateLink
   
(AnchorNode "GHOST Currently Processing")
   
(SentenceNode "sentence@e2092ba1-eb11-4a57-8922-338231efca67")
)

scheme@
(guile-user)> (quit)
Segmentation fault (core dumped)
In this case i also get an answer only the first time.


If i run the ghost-parse commands again, i'm getting answer again. I guess this is not supposed to work like this?
It also seems when using (ghost-run), i get segmentation fault when i quit guile.

Is there somewhere a more detailed description on how to use this correctly or should i go for chatbot-psi instead?
Working on a ROS node that contains the atomspace and scheme interpeter, so trying to get "a" simple chatbot working, so i can boot the chatbot script from my ROS node and feed the incomming message to the chatbot and send the response back to ROS.


Leung Man Hin

unread,
Jan 30, 2018, 11:12:55 PM1/30/18
to ope...@googlegroups.com
Hi,

For question 1, that's a feature borrowed from ChatScript that the same rule won't be triggered again unless you do "keep". This may not be a feature we want in Ghost but we'll see in the coming months.

For question 2, the segfault is caused by interrupting the process, it can be avoided by stopping the psi-loop first (by doing `(ghost-halt)`) before quitting Guile.

A lot of the existing features are modeled on ChatScript, you may have a better sense of it if you have a look at the ChatScript basic manual as well.

Thanks!

--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/6df7e704-6edf-432b-b53b-d59a3879b2a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Linas Vepstas

unread,
Feb 2, 2018, 9:18:15 PM2/2/18
to opencog


On Tue, Jan 30, 2018 at 10:12 PM, Leung Man Hin <manhi...@gmail.com> wrote:
Hi,

For question 2, the segfault is caused by interrupting the process, it can be avoided by stopping the psi-loop first (by doing `(ghost-halt)`) before quitting Guile.

Why would that cause a seg-fault?  I'm guessing there needs to be some cleanup,
some kind of RAII (resource acquisition is initalization) issue here?

-- Linas

--
cassette tapes - analog TV - film cameras - you

Leung Man Hin

unread,
Feb 4, 2018, 11:41:23 PM2/4/18
to ope...@googlegroups.com
Why would that cause a seg-fault?  I'm guessing there needs to be some cleanup,
some kind of RAII (resource acquisition is initalization) issue here? 

​It seems so, I'll look into this​

Linas Vepstas

unread,
Feb 5, 2018, 2:27:42 AM2/5/18
to opencog
Oh hang on, I think I know what this is -- its an openpsi issue, I opened a bug report for it last week.  The openpsi C++ class is declaring some globals that hold handles.

--linas

--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.

For more options, visit https://groups.google.com/d/optout.

Leung Man Hin

unread,
Feb 5, 2018, 2:42:21 AM2/5/18
to ope...@googlegroups.com

amebel@hr

unread,
Feb 5, 2018, 9:06:13 PM2/5/18
to opencog
I am working on it


On Monday, February 5, 2018 at 3:42:21 PM UTC+8, Man Hin Leung wrote:
OK will see if it still crashes once that's fixed: https://github.com/opencog/opencog/issues/2991

On Mon, Feb 5, 2018 at 3:27 PM, Linas Vepstas <linasv...@gmail.com> wrote:
On Sun, Feb 4, 2018 at 10:41 PM, Leung Man Hin <manhi...@gmail.com> wrote:
 
Why would that cause a seg-fault?  I'm guessing there needs to be some cleanup,
some kind of RAII (resource acquisition is initalization) issue here? 

​It seems so, I'll look into this​

Oh hang on, I think I know what this is -- its an openpsi issue, I opened a bug report for it last week.  The openpsi C++ class is declaring some globals that hold handles.

--linas

--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.



--
cassette tapes - analog TV - film cameras - you

--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
Reply all
Reply to author
Forward
0 new messages