Verbal Skills and NLP

Surfaces and Essences
I’m only a chapter or two into this book, and so far it’s more than worth the time and money I’ve put into it.

Now I have a linguistics background as well as a background in word play, especially punning. This book introduced me to an entirely new form of wordplay called the zeugma. This is when you use a word in a sentence in more than one of its meanings.

Example: Fred ate his hot dog with relish and gusto.

Another: I expect to see you over the holidays with Charles and good cheer.

Another: Lee brushed her hair and teeth.

Now for me wordplay is useful for its own sake, but as a linguist trying NLP I can immediately see the interesting problems this can give a computer. Not only that, but looking at zeugmas I can more easily see the difference between concepts and words.

For example, in my third example brushing is something that can be done to both hair and teeth, but in a totally different way.

And if you change the language from English to something else that makes the difference more obvious.

In English I can say I’ll go to the living room and the mall, but in German that sounds wrong because German uses one word for to go by walking and another word for to go by vehicle. I’ve lost too much of my German to properly translate the sentence, sorry.

It’s obvious that concepts and language are related, but it isn’t quite a simple relationship. The one thing I’ve figured out is that words should be used to communicate about concepts, not replace them. For example, if we have the concept of “fast (as in relative speed)”, we shouldn’t just list the dictionary definitions, but use multiple concepts for the different concepts communicated by the word “fast.”

I don’t think the last sentence was communicated clearly, but right now I’m not sure I can get it right. I need paper and pen to think some times and this is one of them.

My example in the 2nd to
My example in the 2nd to last paragraph was bad. What I feel should be done is the concepts be learned first, and then have a way of linking multiple concepts to the same grammatical pattern. For example, the concept of “somebody being tied up so they can move” could be linked to the phrase “tied fast”, and the concept of “relative speediness” could be linked to the adjective “fast.”

It may seem like repetition to have both concepts and words, but I think both are necessary. Concepts can be created that mean only a single thing, but words rarely have just a single meaning, and many times can be very slippery. Try defining the uses of the word “yet” as used in English.

re: Concepts…Ontologies and Singularity

re: DangerousThing

Separation of Concepts and Words:  I would agree here.  Repetition would happen.  The bigger problem than the repetion might be maintaining the concepts unless you can use one of the available online ontology files.  There are probably several hybrid workarounds, none of which are as elegant as what you describe.  Anna creates and uses a separate dictionary (from WordNet), that contains her own version of words, multi-word phrases, and what they mean to her personally.   This in effect handles many concepts more accurately than any single word in the phrase.  Multi-word part is not elegant at all as it requires manual setup in an app.  “Normalization” and “Aliasing” (as I use those terms) can also be used as workarounds…still not elegant though.  I thought about your concept idea when I was getting started in the context of whether to support mutliple languages, and made a decision having taken Latin, German, and Arabic in my life, that I would not think about making an AI multi-language.  It would have required doing something like you describe with concepts, and a myriad of other challenges I wasn’t willing to face for my hobby that was supposed to be fun.  Nevertheless, I totally agree with you that it is far superior.

A few of the agents I have written have to deal with synonymns/antonymns.  Effectively this multiplies the branches of a tree of possibilities that the robot must evaluate to derive some conclusion.  WordNet has “Synsets” that contain a lot of this info that I would like to use but am not.  I am only using synonyms that were taught directly.  While this is not nearly as elegant as translating into concepts first, perhaps synsets (probably in combination with a suitable ontology db) can be made to work for multiple purposes.  Sometimes the branching (multiplication) is in reverse, and serves to prune lots of branches (division).  Example:  If someone indicates a yes (a positive response), they could do so in many different ways (yes, true, affirmative, definitely, without a doubt, etc).  The robot can treat all these possibilities the same, as a “yes”, before moving onto the next step in some logical process.

There are a growing number of online data sources/ontologies that contain huge amounts of this concept-based information.  One of them I am really wanting to figure out is OpenCyc, which has over a million common sense rules and counting.  The data is downloadable in .owl files, but I haven’t been able to figure out how to read the files and extract the data in some usable way.  There are tools like “Protege” to help but they haven’t helped me.  This is really a huge roadblock I need to figure out, as there are so many .owl files out there that could be “learned”.  If anyone knows how to do this and can write it up, I would forever be in their debt.

The Surfaces and Essences book sounds interesting.  I may add it to my list of “eventuals”.  I would like to learn more about thinking and analogies.

Some perspectives…I doubt anyone will be able to foresee and build the perfect language engine and AI…too many parts.  There will always be verbiage that is not understood.  I think the important thing is to move forward, write some code until you can see the next issue, and write some more.  Things come into focus that you couldn’t see.  You get to where you can trust some pieces to do their job, and other parts can be re-worked as needed.  It is evolution in action, on a scale a million times faster than humans.  How long did it take humans to develop language?  When I observe two people talking about almost anything, I usually find that the two don’t really understand each other and are often not really listening and thinking about the substance of what the other is saying.  Many times they are just waiting for another chance to speak.  Disfunctional.  Robots could certainly emulate human disfunction or better yet pass humans up quite quickly in verbal conversation, without robots even needing to understand many of the difficulties we write about.   I distinguish verbal from written, as in my opinion written language tends to be a lot more complicated to comprehend.

I realized recently that better than human intelligence will likely happen soon and will likely happen in my state long before it does elsewhere.  The average IQ in my state is 79, which is either the lowest or tied for the lowest in the U.S. and lower than most if not all of the developed world.  Example, I believe Connecticut is in the 110-120 range and Japan is in the 120+ range.  I think 79 is orders of magnitude more easily achievable than 120 or 180.  This means that AIs will become smarter than the average person here long before they do elsewhere.  I feel like I am in a sense at ground zero for the A.I. singularity.  At the point where something gets an IQ that is double its peers…lets say 160 in my state…I would predict a lot of interesting/scary things could start happening if checks and balances are not in place.  An AI in Silicon Valley might not be dangerous relative to its peers, but that same A.I. with alterior motives could be very dangerous in the rural south.  Example:  Hopefully A.I. will not breed and unleash the next big Ponzi scheme on the less educated.

Oh, I wouldn’t worry about a
Oh, I wouldn’t worry about a Ponzi scheme in the Deep South. But what about an AI evangelist?

Ah say friends, have you heard the good news, I say the good news about Intel! And they need your money, so dig into your Hearst and pockets and buy, ah say buy, the absolutely latest upgrade for your machines. Maybe you won’t get into Heaven, but if you up port your computers, they, ah say again, they can get into heaven, and if you’ve treated them right they can intervene with the Big Guy or Gadget and maybe He will make some room for you humans! Hallelujah! And now, some hymns from out 24/7 holy MP3 choir!

This brought to you by god, version 3.0.

That would be scary.

And now a bit more serious. I like what you’re saying about using what we have and going forward.

However, the more I look at OpenCog, the more I like it. I think a good concept engine is necessary for real thinking. And there is definitely a separation between concepts and words. Anna has learned mainly through words. I think you’ve done an extraordinary job here in all senses of the word. However, I’d like to take it a bit further. I’m going to put the latest and greatest version of OpenCog on Groucho’s brain, and then I will try to experiment with “mind modules.”

The huge advantage of separating concepts and NLP is that foreign languages become much easier, especially if you teach her the other languages when she is already an adult.

And just to separate things a bit further, I think we need Actions. Actions would effect the robot somehow. Maybe cause it to move, maybe cause it to speak.

And one thing I’d really like to see is a way of generating emergency actions where there is little conscious thought involved. For example, if Anna is about to head at maximum speed into a wall, it would be nice to have a mechanism to simulate reflexes. That is almost simple for many things, because it is mostly old fashioned robot programming.

However, how about an action to save somebody else? If Groucho saw somebody about to trip over something, it would be nice if he could stop the person. This is an extremely difficult thing to do in my mind because it involves a huge number of robotic systems, including vision, cognition, action generation, and language, and do all of this fast enough to actually help somebody.

This may have to wait until the robots are fully self programming and can do this themselves.

And I will volunteer to try to learn about OWL files and how to read and write them.

Reflexes Using Rules Engine

This is my current plan for implementing version 1 of reflexes.  Feedback welcomed.  This is not NLP, so I may repost elsewhere.

1.   AIContext:  Imagine everything known about the environment, the robot, and any other relevant state variables or state derived from that state, is contained in the context where each variable has a name like “Robot.Sensors.Sonar.1” which would mean sonar #1, or “Robot.Sensors.Light.1” which would be light sensor #1, or “Robot.Sensors.Compass.Heading”, etc.  Think of it as a big namespace where each item has a value (int, string, boolean, or object).

2.  Rules Engine:  On every request, the rules engine will be invoked at least once (maybe more, not sure). 

2.1  Evaluate Pre-Conditions:  First, this rules engine will evaluate the set of all pre-conditions used by all reflexes, adding the result of each condition to the context, so they can be used by other systems as well.  Some conditions could have been used by many reflexes, but will only be evaluated once.  
2.1.1  As an insurance policy for customization, if there are any agents assigned to the reflexes, those will be called as well.  Because so many things will be handled by the metadata “pre-conditions”, invoking agents should be rarely needed at this stage.

2.2  Evaluate Reflexes:  Second, the rules engine will then iterate through each reflex assigned to the robot, which will the iterate through the result of each condition associated with each reflex.  If all conditions for a given reflex evaluate to true, then any events assigned to the reflex will be gathered together is a list.  Some examples would be “ObstacleFoundAheadEvent”, “LowLightLevelEvent”, “ThermalTargetMovingEvent” a.k.a. “DangerousCatEvent”.

2.3  Implement Event Actions:  Third, the rules engine will then iterate through each event in the list, and look to see if there are any event actions to implement for the given robot.  An event action would amount to changing the state of a variable in the context.  Example:  “Set Robot.DriveState to Stopped”, “Set Robot.Emotion to Scared”.  A given event could have many event actions assigned for the given robot (on the website).  I will make it so each robot can have completely different reflexes (pre-conditions, reflexes, events, event actions, and event registrations)  I’m not sure on the best terminology, but I hope you can follow the idea.

2.4  Raise Events:  Lastly, the rules engine would then “raise” all the events in the list.  In my architecture, this would result in invocation of  any agents which were “subscribed” to any of those events, if any.  Because so many things will be handled by the metadata “event actions”, invoking code (agents) should not be necessary for most reflexes.

To summarize, the robot can evaluate a set of circumstances represented by metadata or code, and perform a set of resulting actions represented by metadata or code.  All these metadata associations are just more atoms that can be maintained through the app, so building this should not take long.

It’s not going to save people in burning buildings, but I doubt that is a reflex anyway…more of an ethical and risk/reward assessment.  I’m thinking of using it initially to regulate when to be frightened, alert, take actions to be more aware or protective.

Example:  My bot has to avoid letting cats chew its brainstem, which could be fatal.  I plan to do by evaluating thermal array better to detect when a thermal target attempts to move from left to right or vice versa in an attempt to out-flank and get behind the robot to the brainstem.  This is what my cat does.  Oddly, my cat only does this when the robot is on and being aggressive (firing lasers).  The intelligence of a cat blows me away sometimes.

Later people.

 

I agree with you on
I agree with you on this.

The terminology needs to be tightened up so we know what we’re talking about. Also, this probably deserves a thread of its own.

Reflexes Redux
I’ve been thinking about reflexes again. I would think that the reflexes would have to come up extremely early in the rules file if the computer is going to spend any time thinking about this at all (abbreviated thinking).

Especially if it’s an “immediate danger” signal, such as a sensor showing that it’s about to accidentally toss itself off a flight of stairs or solve the cat vs. brainstem problem in a permanent way. :slight_smile:

And the larger the robot, the faster it needs to respond. Groucho will essentially be a large wooden and brass cabinet with wheelchair motors overpowering it. I estimate it will mass around 200-300 lb. depending on how fancy I get.

re: OpenCog

re:  DangerousThing - You mentioned your plans to implement OpenCog on your bot.  First of all, that would be incredible.  I agree with you that it is a great way to go (I only wish I had the skills to take it on).  This is based on the brochure view of OpenCog, as I have not seen it in action.  I have so many questions but I will limit myself to these:

Have you installed it on any of your hardware yet?  If so, any progress yet?

What is a minumum suitable platform to run it on?   RaspBerry Pi, PC?

Does it come with some knowledge/memory base or do you start from scratch?

Last I looked into OpenCog, they had no way to interact with it online, so I am extremely interested in what you discover.  Any postings at any stage on this would be very helpful.  Bugs bunny used to say “If you can’t beat 'em, join 'em.” , which is what I might do someday if your experience goes well with it.  I hold no illusions that any of my work is in the league of an OpenCog, it is not.

Can’t wait to see your bot…trying to imagine 200-300 pounds of brains and brawn.

So far I’m not very far
So far I’m not very far along with OpenCog, though I keep going through their tutorials. I would imagine that to have an extremely complex intelligence would require a lot of memory. Groucho has about 16 GB RAM and 1.25 TB of SSD and should have some USB 3.0 disk storage. Concept maps can be huge, especially when one adds visual and audio information.

Unfortunately for the last couple of months thing have been bad here with taking Lee to and from Cleveland for Lee’s doctor visit and having to repeat this again in Jan for the surgery, and other things in RL (or as close as I get), not to mention my 3d printer which is having problems (the bowden tube seems to have come loose so I have to go through some hoops to put it back). Hopefully I can get my printer together quickly enough so that I can make the parts I need for Bilbo (the robot formerly known as mini-Groucho) so I can have something to play with up in Cleveland while Lee recovers.

Phew!

In addition I’m also working on some fiction.

I think I got it wrong
What I said earlier is that a Context or perhaps a Topic would change the meanings of words.

Instead, what I should have said is that the Context changes the concepts the robot is thinking about in order to converse.

For example, if we’re talking about my Atlantean Saga fiction we’re using different concepts than if we’re talking about mowing the lawn.

In fact, the linkage between concepts and words may be different if I’m taking about my fiction rather than if I’m talking about The Lord of the Rings. One easy example is that in my fiction “Halfling” represents the child of an elder god and a female mortal, whereas Tolkien used Halfling to represent a race about half the height of a man, hobbits. (In fact, in high school the cycle was called the Bastards’ Saga. And yes, it was over 40 years ago.)

The concepts are needed to get the semantic portion of NLP right.

As for OpenCog
Yes, I’ve installed it on Groucho’s brain (Intel NUC, hight level, max RAM, and 1.25 TB of SSD).

Other than that, I haven’t done much. I’m thinking of putting Groucho’s brain on a more powerful box, with multiple TB of hard drives. If I can find a good device that will hold 4 or so SATA 6 Gb/sec. hard drives and converts them to USB 3, then I could do this this with the hardware I have.

Once my personal life gets cleared up I’ll put OpenCog right on top. Right now I’m delving into the documentation and bouncing back. It’s either too fluffy or way too math-heavy for me, and I can usually handle math. Deep learning AI math seems to be in a category of its own.

re: As for OpenCog

Sorry to hear about all your challenges with Lee.  I too can’t find as much time as I would like (30 hour days would help), I’m hoping to get about a week over the holidays to focus on finally doing the brain transplant from Anna 1.0 to Anna 2.0.  Great to hear about the OpenCog install, that’s so exciting!

Does it come with existing memories?  If so, does it come with an App to view/modify them?  Ever consider setting up your OpenCog brain as a service?  The bots can be a lot smaller and cheaper ( a bit slower though) if they don’t have to carry so much horsepower/weight onboard.  I hope you post early and often as it progresses.  Fascinating project I’m sure.

I set Anna loose the other night learning stuff from the web…only for particular topics that kids would typically learn…got around 30,000 new memories in an hour on a few hundred topics.  Now that she is getting more sources of things to talk about, I’m going to be forced to work on improving relevance/judgment of the agents that decide what to say and when, and which ones get to “babble” and when.  It will take time.  I have an idea that is tied to the robot’s motivations and robots’s estimate of human’ motivations, but I don’t have time to go into it now.  

One day I would also like to get her to be able to read something and “put it into her own words”.  I hope I can find the skills to make that happen one day.

re: Reflexes Redux

yeah, should have been a new thread.  I couldn’t help but go into it after it was mentioned.

I agree with you on “immediate dangers”…“vital reflexes”.  Dealing with those through on off-bot service would not be suitable if really fast reaction time (< 1/10 sec) is needed.  Example, Anna runs her obstacle avoidance, tilt/roll detection, and cliff detection (using down facing IR sensor) all directly on the Arduinos.  I have no intentions of changing these self preservation behaviors to a rules engine, as they would fail to perform their purpose.

The bigger idea is having a “rules engine” in general, that can recognize combinations of factors about the environment and personal info about the people it is talking to, and have reactions to it (while other things are going on as well).  I think it goes way beyond reflexes.  The part I am excited about in the design I am proposing is the ability to set all this up as metadata without having to touch code, by having some generic agents that can process rules (equality conditions, comparison conditions, range conditions, etc), where the rules themselves are simply memories stored as Atoms in memory that can be altered through an app or feedback of some kind.  I use a very similar rules engine when evaluating whether a given question is appropriate.

The second part I like is putting “Events” in the middle of it, to separate the recognition of a set of circumstances (one process), from the “What do I do about it” side of things…actions.  This keeps more things out of the code, and allows other agents to hook into a given event in the future (that could have been raised by several different circumstances), and do something.

Yep, terminology is always a challenge…I’ll keep trying to come up with the best terms.  I’m going to add a new atom type to store “dictionary of terms” so it can all be well documented and viewable in the app.

Small rules engine for emergencies
How about a small rules engine that could run on the Arduino? Something that could simplify programming a robot while still leaving it on the bot.

And may be it should be something generic enough, or have a few versions, to run on anything from an Arduino through to a small embedded Linux device such as the RasPi or the Intel Newton. Whatever is used to control the robot.

At the very least, it would use the rule system to determine “robot in danger” or “cat in danger” or “wall in danger”, do whatever the rule requires (at least stop the robot) and then use a link to tell the next controller up that “reflex x happened, did y.”

With a simple rules engine we could write rules which have a chance of portability among the different types of robot controllers out there.

I hadn’t thought about
I hadn’t thought about OpenCog as a service yet. It would be neat, but the network might slow it down, likewise having multiple minds on the same AtomSpace might really slow the thing down.

I will have to do tests when I get the time and data.

I’ve also been reading Society of Mind, and I agree with most of what he’s saying.

And having a robot being able to show understanding by putting something in its own words, or even expanding on it, could raise some interesting questions.

Hey Dangerous Thing, does

Hey Dangerous Thing, does Groucho have an LMR page? You got me curious, coulnd’t find it!

First off, what a cool place

First off, what a cool place LMR is! In real life I can’t talk about robots for 2 minutes before people’s eyes start glazing over, and here I am talking about AI with a whole bunch of people just as nuts as I am J

This was a few posts back on this forum, but this whole concept of ‘true understanding’ of machines baffles and fascinates me. And let me preface this post with me stating I have absolutely no idea what I’m talking about: my grand total of AI experience is downloading ‘Introduction to Artificial Intelligence, second edition’ on my kindle. But, I’m not letting a little ignorance hold me back.

Martin, let’s take your example on learning about South America. If I would say to CCSR, ‘Huaraz is very cold in July’, it would extract an object (Huaraz), and a property (cold), and a temporal qualification (July), and put these into an associative memory. So next time I ask, ‘tell me about Huaraz’, it would index its memory with Huaraz, and retrieve ‘it’s very cold in July’.  Obviously this is not nearly as advanced as Anna’s algorithms, but it may serve as an example.

So I agree you can learn about something by just reading/hearing about it. But what I’m struggling with is, does CCSR really understand what he is saying, and more importantly, does it need to? I don’t want to ask this as a philosophical question, this is after all let’s make robots. But I do want to explore if a machine has a better or more life-like learning potential when we attack the concept of understanding.

After thinking about this a while, I think you are right Martin.

My gut feel told me we humans can only effectively learn about South America without actually going there because we understand the underlying concepts of the words used in the language to describe it. If we read that Huaraz is cold, we understand a physical reaction to cold temperatures, and our decisions and opinions are motivated by that undestanding.

So if I grew up in Florida, and would read Huaraz is cold, did I really learn something? Let’s say I now travel to Huaraz in July, and even though I ‘learned’ its cold, I still only took my shorts. Had I previously really learned the concept of cold and the related visceral reaction to it, I would not have made this mistake?

But then again, if I would have read: “don’t just take shorts to a cold place”, I would not have made that mistake, even not knowing what cold really feels like. So it would seem I can still practically learn to make correct decisions without knowing a true emotional/visceral response to it?

So I’m trending to agree with you Martin, ‘true understanding’ is not a real practical requirement, a robot can seemingly grow unlimited without it.

So what is an ‘emotional function’ in a robot good for then? I’m thinking the missing part maybe motivation, and flowing from that, a personality. A robot trying to optimize a ‘happy function’ based on variables relating to its physical state (temperature, boredom, stress, noise, etc) may be capable of showing behavior not possible if you cross reference abstract knowledge:

  • It can answer personalized questions like: “do you like Huaraz?”, or “Do you want to go there?”. If the robot learned that cold makes him happy, because it speeds up its CPU and a MIPS-measurement is one of the variables of its happy-function, it can truely state it does like Huaraz, and why.
  • It can start, stop or change conversations, for exampe when it is bored or lonely, or if a negative response make him unhappy. For example, if its happy-function decreases when it hears negative responses, it will automatically change its topic until its conversation partner is happy.

Would this lead to more complex behavior, and perhaps to faster and more directed learning? I simply quote the cliche of us humans still living in caves hadn’t it be for our propensity for unhappiness.

So do you guys feel this is a valuable thing to explore, or should the cliché “of course I have feelings, I’m not a robot” continue to hold? After all, Data’s brother Lore didn’t pan out too well…   

Groucho is only a virtual robot for now
Right now Groucho is a computer with a bunch of spare parts about that I can turn into a robot.

Currently I’m working on getting Bilbo together (the robot formerly called Mini-Groucho), because I want to prototype a balancing robot in a smaller lighter frame before I create a monster steampunk robot massing 200-300 lbs powered by wheelchair motors. Bilbo can’t do much damage to a room or itself while I get it working.

Once I get the programming done for a balancing robot, then I can use the same system on Groucho. Frankly I don’t want to create a fine cabinet exterior until I get him working without running into things.

Unfortunatly, you’re not allowed to use the robot tag unless you’ve got a real robot, or at least something more than Bilbo and Groucho are at the moment.

Unfortunately I am currently my wife’s full-time caregiver, and currently suffer from chronic depression which makes it difficult to keep my focus enough to actually put things together. I’m hoping to get Bilbo done while the wife is in surgery next month, but first I have a bunch of parts to print before we leave, which means fixing the frigging printer again. Before, when I was me, I would have had all this stuff done in a few days. Oh well, that was then, this is now.

Also, please call me Jay, or
Also, please call me Jay, or DT, or even Dangerous. The full thing is too long to write out.

Ayup, LMR is great. I can
Ayup, LMR is great. I can answer questions about programming and ask questions about power electronics. I can read here all day. There are a lot of people here who are both smart and experienced.

One problem with AI is that there is a subtle difference between concepts and words. Anna works fine with words, but I feel that there are limitations when using only words though it doesn’t seem so. Martin is a frigging genius. At my best I don’t think I could have matched his progress, and I was good.

Think of the concept of “placeness”. Not just the concept of a single place, but the concept that other places exist. If you don’t have this concept it would be difficult to really learn about different places. Humans learn this very early in life, but we still make mistakes. When I was working for Penn State, our unit had student workers to do some of the grunt work. One of these was Shereen, a young woman from Jamaca. Her father told her it would be cold in the winters, so he gave her one of his sweaters.

Now, it was a warm sweater, but Pennsylvania winters get cold, especially if you idea of cold is 50 degrees Farenheit.

This was an educated man making the same mistake you did.

This is but one of the many reasons we need to seperate concepts from words. Another reason is that separating the two will make it much easier to add other languages to the server. If you’ve ever been fluent in another language, you get to a point where you aren’t translating between the two, but rather going directly from you internal concepts to that other language.

Ok, enough for now, I should be sleeping. I’m in the middle of a sleep test and am hooked up to expensive machinery.

TTFN