Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbound variable: psi-demand #3075

Open
mhatta opened this issue May 1, 2018 · 5 comments
Open

Unbound variable: psi-demand #3075

mhatta opened this issue May 1, 2018 · 5 comments
Labels

Comments

@mhatta
Copy link
Contributor

mhatta commented May 1, 2018

Following the instruction at https://github.com/opencog/opencog/tree/master/opencog/nlp/aiml, OpenCog gives me the following error:

$ aiml2psi psychology.aiml
No weightfile specified.

AIML Source directory = .
 
*****  processing ./psychology.aiml ****
Aieee! Unhandled screwball person tag!!!
<person index='3'/> is <person index='2'/>.
Processed 663 rules

(Gives me aiml-flat.txt and aiml-rules.scm, seems okay)

$ guile
GNU Guile 2.2.3
Copyright (C) 1995-2017 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (opencog) (opencog nlp) (opencog nlp aiml) (opencog openpsi))
scheme@(guile-user)> (primitive-load "./aiml-rules.scm")
ERROR: In procedure %resolve-variable:
Unbound variable: psi-demand

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 

@linas
Copy link
Member

linas commented May 2, 2018

Also, doing this:

(use-modules (opencog nlp aiml) (opencog openpsi))

I get

;;; opencog/nlp/aiml.scm:185:12: warning: possibly unbound variable `psi-action?'
;;; opencog/nlp/aiml.scm:219:25: warning: possibly unbound variable `psi-get-exact-match'
;;; opencog/nlp/aiml.scm:254:24: warning: possibly unbound variable `psi-get-dual-match'

so apparently openpsi changed somehow. @amebel any commentary or help with this?

The hacky fix would be to find some older version of openpsi that still worked, and copy the needed routines into the aiml side of things. However, that might require some fairly complex refactoring, so I dunno how that would work out. The alternaive is to port aiml.scm to the new openpsi API but I don't know how hard that is.

@amebel
Copy link
Contributor

amebel commented May 2, 2018

Yes those functions have been removed. And the (opencog nlp aiml) module hasn't been updated. Not sure it will be updated either.

I think it is best to stop installing the module, so @mhatta can have an easier time creating the packages. @linas what do you think ?

@linas
Copy link
Member

linas commented May 2, 2018

well, what makes it so hard to update? If the API changes, why not change it everywhere? When it bit-rots like this, it becomes hard, painful, time-consuming to fix...

@mhatta
Copy link
Contributor Author

mhatta commented May 2, 2018

@amebel @linas This doesn't affect Debian packaging, but I still think it's awesome if it works, even if AIML support might be at odds with the concept of AGI.

@amebel
Copy link
Contributor

amebel commented May 2, 2018

@linas I don't know what will make it hard, as I haven't read the code. If there are some tests then the update can be done against the tests. Or I can hunt down those functions from history and add them back to the openpsi module.

@linas linas added the openpsi label Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants