-
Notifications
You must be signed in to change notification settings - Fork 9
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
IllegalArgumentException while doing a query on vardemo.sneps with some additional assertions. #3
Comments
Hi there... I'll admit you're testing a bunch of things I haven't looked into very carefully! It's a summer plan of mine to really get this codebase solidified. I really appreciate the report! I actually think there are two things here:
Because if Sancho owns more than one donkey, we don't know that he beats all of them, and if not, which one he beats. Without the closed world assumption, with only one donkey we can't say there aren't more that we don't know about. On the other hand, if we said that the arbitrary farmer beats the arbitrary donkey that they own: This one would theoretically do the inference you want it to. On my current build it isn't working, but I can see that both arbs are emitting messages for the substitutions. What isn't happening is that Another thing I've considered: adding a quantifier for saying something like "If a farmer owns a single donkey, they beat that donkey", then we could do the inference you want... let me know if that would be useful. I'd imagine it would look something like: Thanks again! If you want to shoot me an email about what you're doing, perhaps I can be more helpful! |
Hello, thanks for answering so soon! :) I'll have a closer look during the weekend, but let's see very quickly now. Sorry if I mess up.
Ah! I see. This (Skolemized?) SNePS notation can be tricky at first, if one is used to typical prefix scoped quantifier notation, like in Cyc, Snark, Powerloom, etc. So I guess, yes, what I was thinking of is like "Every farmer beats every donkey he owns", as you wrote in that new formula. So I changed that accordingly:
Here's the new file, vardemo-modified-v2.sneps: https://github.com/martinodb/CSNePS/blob/semtype-objectlang/Demo/vardemo-modified-v2.sneps And here's the result of loading it and asking the same questions:
OK, so now there's no errror, but, as you said, not the expected result (it gives zero results, while it should give one). I can try other stuff during the weekend.
Yes, no doubt it would be useful. But now I have doubts about its name ("the"). Maybe there should be a "the" operator and a "the-if-any", or similar? So, for instance, if I ask "Does Sancho beat the-if-any donkey he owns?" the answer would be something like "No (because he doesn't own one).". But if I ask "Does Sancho beat the donkey he owns" the answer would be something like "That question doesn't make sense. Sancho doesn't own a donkey". I don't know to what extent that makes sense in the context of SNePS, but ultimately I think I would need a feature like that. I can elaborate all day, but I don't want to make this issue comment too long. Which leads me to..
Thank you, that's very encouraging! :) Sure, I'll take your word for it and send you an email. Anyway, the sort version is, I want to make a really smart Clojure chatbot that can communicate in a controlled natural language expressive enough to handle time, events, beliefs and other typical notions of natural language. I would leave machine learning techniques (as will probably be needed to understand unrestricted natural language) for later, once the CNL interaction works well and the language is expressive enough. This is a personal, toy project, nothing "serious", and of course I'm a novice in both Clojure and AI-related stuff, like logic, NLU, etc. That said, with those caveats, here's what I've got for now: https://github.com/martinodb/bobtailbot It can connect to IRC or it can be tried as a CLI program. You can also try different "brains". The main one I'm using now is based on Instaparse and Clara. https://github.com/martinodb/bobtailbot/tree/master/src/bobtailbot/brains/general It can store facts about individuals in the form of triples (like "Mary likes Brad Pitt"), and also rules with the usual Horn-clause limitations (like "Brad Pitt likes ?x when ?x likes Brad Pitt"), but not much is implemented regarding that last part (connectives are probably still missing, I'll have to check). Anyway, going beyond that into actual FOL seems a big challege (for a novice like me, at least), so I thought it would make sense to grab some ready-made, open source FOL reasoner, written in Clojure or at least in Java, so I would only have to work on the CNL and the actual KR model. Well, even that turned out to be harder than I thought! So far, the best candidate seems to be SNePS, once confirmed that it works reliably. I wouldn't need the GUI, of course, just snuser and its dependencies. Anyway, I ended up turning this comment into an email. Sorry about that! Looking forward to getting advice, etc, by email ;) Thanks! |
So, I'm trying to get a hang of CSNePS (from the command-line, eventually to use it as a library), but I'm running into problems. I started with the demo "vardemo.sneps", in particular I'm intrested in how "Every farmer who owns a Donkey, beats it" is handled. I did a slightly modified version, where the rellevant "assert" commands are turned into "assert!" to trigger forward inference, and I added assertions about a particular farmer (Sancho) and a particular donkey (Rucio):
So far, so good. Then I ask a trivial question and it answers correctly:
But then I ask whether Sancho beats Rucio, and BOOM, error:
Here's the modified demo file in my fork of CSNePS:
https://github.com/martinodb/CSNePS/blob/semtype-objectlang/Demo/vardemo-modified.sneps
Can you please confirm as bug or explain my mistake? Thanks!
The text was updated successfully, but these errors were encountered: