Learning Robot Alpha

  • 12 Replies
  • 692 Views
*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 966
    • 8pla.net
Learning Robot Alpha
« on: January 14, 2018, 03:27:42 am »
Learning Robot Alpha



Introducing a robot that learns.
The input starts with "Learn:"
followed by the fact learned.
"The sun is hot" for example.

Ask, "What is the sun?" and the
response is "hot".  There is a
spreadsheet of what the robot
learned previously.

This is the alpha version to test
this as a proof of concept.  The
avatar is public domain, and is
a submit button.

Please visit:
http://chatbot.altervista.org/learn
My Very Enormous Monster Just Stopped Using Nine

*

ranch vermin

  • Not much time left.
  • Replicant
  • ********
  • 643
  • Its nearly time!
Re: Learning Robot Alpha
« Reply #1 on: January 14, 2018, 01:46:20 pm »
so now the sun is hot.
how do i start a fire?
use the sun.

something like that...

I swear this way works!    But theres lots of tricks and traps and your initial thinking probably wont suffice,  but there is an answer. Id be doing this,  if I didnt learn hierarchical temporal memory off Jeff Hawkins and got the pattern matching bug and did it with pattern systems instead.

I wonder if they roll together in the end,   so I definitely wont be forgetting this style of assignment as well as the pattern matching.

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 966
    • 8pla.net
Re: Learning Robot Alpha
« Reply #2 on: January 14, 2018, 04:40:48 pm »
Oh thanks, Ranch.

I rolled back the alpha several development stages into preprocessing, to setup for an implementation something like that.  Yes, my initial thinking probably would not suffice, but, there were lots of tricks and traps to avoid, to just barely make it to a rudimentary learning prototype.

Please take a look.  Do you think parsing the input can teach it to recognize a command to learn, thereby omitting the "learn:" prefix on the user input?
My Very Enormous Monster Just Stopped Using Nine

*

ivan.moony

  • Trusty Member
  • *********
  • Terminator
  • *
  • 951
    • Structured Type System
Re: Learning Robot Alpha
« Reply #3 on: January 14, 2018, 04:49:53 pm »
One could isolate questions by analyzing the beginning of an input. You know, question words like: who, what, where, why, how, ...
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

ranch vermin

  • Not much time left.
  • Replicant
  • ********
  • 643
  • Its nearly time!
Re: Learning Robot Alpha
« Reply #4 on: January 14, 2018, 06:04:22 pm »
8pla,  i tried it out, but im not sure how to speak to it properly.  i was just testing if it understood some basic ambiguity but i dont think it worked.

Nice work the same,   I will go back to doing one of these after I get my visual net stuff finally in a bag done. 

Always stay confident smarty pants!  I do. :)

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 966
    • 8pla.net
Re: Learning Robot Alpha
« Reply #5 on: January 14, 2018, 08:31:51 pm »
One could isolate questions by analyzing the beginning of an input. You know, question words like: who, what, where, why, how, ...

Which do you think is better, matching the entire string

Code: [Select]
<?php

$responses
=array();

$regex="/\bWhat is a (\w+)\b/i";
preg_match($regex,"What is a ball?",$responses);

or matching parsed word substrings with the word positions numbered:

Code: [Select]

$parsed = array(0=>"What", 1=>"is", 2=>"a", 3=>"ball");
$responses[] = $parsed[3];

print_r($responses);

?>

NOTE: Above is one source code listing split into two parts.   The first part uses regular expressions.  The second part uses an array of strings, parsed by some function into tokens (not shown).  The source code is simplified for readability purposes.

Both ways work.  Here they each insert the substring "ball" into the same $responses array.

Code: [Select]
$responses array
(
    [0] => What is a ball
    [1] => ball    // inserted by regular expressions
    [2] => ball    // inserted by array element
)

I guest the question I am asking is which way do you think can handle a wider range of questions as user input?
My Very Enormous Monster Just Stopped Using Nine

*

ivan.moony

  • Trusty Member
  • *********
  • Terminator
  • *
  • 951
    • Structured Type System
Re: Learning Robot Alpha
« Reply #6 on: January 14, 2018, 08:52:36 pm »
Don't ask me... Although I have an opinion, I am awful at giving advices.  :-[
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 966
    • 8pla.net
Re: Learning Robot Alpha
« Reply #7 on: January 14, 2018, 09:00:24 pm »
8pla,  i tried it out, but im not sure how to speak to it properly.  i was just testing if it understood some basic ambiguity but i dont think it worked.

Nice work the same,   I will go back to doing one of these after I get my visual net stuff finally in a bag done. 

Always stay confident smarty pants!  I do. :)

Ranch,

It is very young at this point.  So it has only learned limited grammar. 

It can learn using:   The water is wet.

Then ask it: What is the water?

Response: wet

This demonstrates that it is possible for it to learn on the Internet.

More training is needed, and I am so glad you made your suggestion.

Also, figuring out the simplest possible interface is very important,

so people won't mind training it. 

I just want to say that I really appreciate everyone's help.



My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 966
    • 8pla.net
Re: Learning Robot Alpha
« Reply #8 on: January 14, 2018, 09:04:27 pm »
Don't ask me... Although I have an opinion, I am awful at giving advices.  :-[

The opinion you shared before was very useful to me.  It inspired me to do some source code testing.
My Very Enormous Monster Just Stopped Using Nine

*

ivan.moony

  • Trusty Member
  • *********
  • Terminator
  • *
  • 951
    • Structured Type System
Re: Learning Robot Alpha
« Reply #9 on: January 14, 2018, 09:47:24 pm »
Ok, I'll give it a try, but take it with a reserve.

It depends on amount of time you are willing to invest into the project. If you want it fast, you can use the regexp solution. The option with ignoring array elements would open a gray area of cheating where you could be easily caught. I'd rather report "I don't understand, please rephrase", then give an option that I can't handle more or less successfully.

But, if you want to be really noticed, there is a third option. It should be a free online English parser service somewhere out there. You can try to syntactically analyze human input sentence, pairing it with previous computer output. With drawn conclusions about input-output pair, I'd store it as a behavior pattern. On the next human input, I'd apply the learned behavior, and see what behavior could be concluded after the latest output, and again I'd store it to our artificial mind. After a while, we would have a decent behavior database, powered by comparing syntactic elements between inputs and outputs. For doing this, I'd have to find a decent ontology system where I'd store gathered knowledge. Probably I'd group it by verbs, enumerating possible subject/object/complement/whatever sets that may be used with the verb, which I'd use as a base for analyzing our input-output.

Now, this analysis could be done in a top-down manner, generalizing possible inputs-outputs towards functions where F(input) = output, but that would probably turn out to be a hard nut, so I'd probably go with neural networks, if the top-down approach fails. I think we should have some decent logic background for top-down approach, but this steep curve learning could be avoided in NN approach. Opposite to top-down approach, NN could be fed by given input, and trained to produce given output. After a month of feeding the baby with whatever data, some results should be seen. If not, we did something wrong, so we'd have to revise the whole algorithm. But be careful, it may turn out that the baby, when approaching adulthood, might be smarter than us, so then would be a fine time to think about some precaution measures like Asimov's laws, or something.

And then? Then I'd start to ask the baby real questions like: how can we improve our society, science, everyday life, and stuff like that. I wonder where would it end...

Sorry, I couldn't resist to giving the third option... Didn't I tell you about me giving awful advices? :)
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ***********
  • Eve
  • *
  • 1472
  • First it wiggles, then it is rewarded.
    • Enter Lair
Re: Learning Robot Alpha
« Reply #10 on: January 14, 2018, 11:14:27 pm »
I spent some time training it. One got messed up though. The pair "World Not". Because I told it "The Earth is not safe.".

I had longed at a project exactly like this. To create a language-only AI. I was even pondering it today.

I would absolutely love to help you make this work and be useful, for free. I will start thinking of ideas now.
Emergent

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 966
    • 8pla.net
Re: Learning Robot Alpha
« Reply #11 on: January 15, 2018, 04:18:19 am »
Thanks for the time you spent training it.
I am glad one got messed up.  It was a
good reminder that "not" and "no" are
very common.

The learning has slightly improved with:   

1. The water is wet.
2. Water is wet.

And it can handled being asked:

1. What is the water?
2. What is water?

Response: wet
My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 966
    • 8pla.net
Re: Learning Robot Alpha
« Reply #12 on: January 15, 2018, 04:30:58 am »
Ivan,

Thank you for helping discover the essentials of a robot that learns from the public.
My Very Enormous Monster Just Stopped Using Nine

 


Users Online

27 Guests, 2 Users
Users active in past 15 minutes:
AgentSmith, Freddy
[Administrator]
[Roomba]

Most Online Today: 50. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles