Hoping this will spark a huge discussion on what everyone is looking for when it comes to their robot's AI.
AI is something I've been working on since before I even learned of EZ-Robots. My JARVIS replica from IronMan is coming up to being 3 years old come December and, while not started in EZ-Builder, over the last few months I've been porting parts over to ARC and those which are beyond the capabilities of ARC are integrated via Telnet. These include such things as voice controlled media playback, voice activated control of appliances, lights etc. and, well to be honest, far more than I can really explain right now.
Basically, up until now it is entirely built around home automation and automated media acquisition, storage, playback and logging. Recently I have been integrating and porting over parts of it in to ARC and where ARC is not capable of carrying out the actions, integration via Telnet so that ARC (and it's scripts) are aware of everything they need to be aware of (i.e. if media playback starts, EventGhost sends ARC a script command $mediaplayback = 1, when it's finished it sends $mediaplayback = 0 (that's a very simple example, it also sends more info on the media). This will be demonstrated soon by Melvin when I get around to making the video of him knowing what's on TV.
Like I said, so far it's mainly based around Media and Home Automation. What I want to discuss is...
What do you want in your robot's AI?
What do you want him/her to be able to do without human interaction?
What do you want him/her to react or respond to?
What do you want the AI to enhance?
Why do you want AI?
And, for anyone who already has some kind of AI running;
What does your AI add to your robot?
Hopefully this will spark up some interesting conversation, get some ideas out there, inspire others (and myself) to push on with the AI and make robots more intelligent
Asked
— Edited
There's two ways to do it...
1) Use the speech recognition module which sends ControlCommand("PandoraBot" SetPhrase, "yes"), etc... on the response yes.
2) Use the WaitForSpeech() command and send the ControlCommand("PandoraBot", SetPhrase, "xxxx")
This allows you to take further advantage of the PandoraBot module. You would need to create your own personality that accepts more specific commands.
In the book How to Build Your own working Robot Pet , the author talks about making good decisions through having confidence levels.
Here is an example:
Select a random number. Based on (0-3) four random numbers.
If confidence level is not equal to zero, go in that direction.
The robot goes forward after selecting the move through a random number.
He has a Confidence Level =3.
He bumps into a wall.
His confidence level drops to 2.
Then he goes forward again.
It goes to 1, then 0.
Once it is Zero, the robot knows the wall is there, so He will not go in that direction until his confidence builds up in that direction.
ALWAYS LET THE ROBOT DECIDE WHICH TASK TO DO. HE WILL ALSO SELECT THIS WAY FOR ACTIONS OR FOR DIRECTIONS, ETC. Give him a group of actions say (0-15) and let HIM decide which action to take. At any given point he will NOT be told what to do, Only that HE MUST DO SOMETHING. And, HE will decide. It will be HIS choice.
At the same time, if he has a success in that direction, the number 1 is added to his
confidence level until it gets to 3.
So, you see, the decisions are intelligent based on experimental information.
If you wanted to have a higher resolution, you could have levels of up to 16 (being 0-15). this would be more accurate, but at the same time much much slower.
NOTE : we MUST keep THIS Thread Alive!
Hope that this helps or inspires someone.
I think the method in the book could be useful, but compared to newer decision making methods, do you think this method still holds value?
Stochastic Learning Automaton:
A stochastic learning automaton is used to obtain supervised machine learning. The robot has a given set of possible actions, and every of these actions is tagged with the same probability at start-up. An action is then randomly selected when an according event occurs and the the robot waits for input from the user or evaluates by itself by given targets as to whether it was a good action or not. If it was good, this action will be tagged with a higher probability while the other actions will be tagged with a lower probability to be chosen if this even occurs again and vice versa.
Beside learning to avoid obstacles the algorithm will be used in the chat mode. Instead of actions the robot chooses randomly topics. According to your response the robot learns after a while, about which topics you want to talk and about which topics not so much.
I have attached a first draft of the Arduino source code and added it below. You can test it by just using the serial monitor. I am sure the code can still be simplified and cleaned up. For bug reports and suggestions, feel free to post a comment.
Code:
I think this method still applies but, if we could find a reasonable "Fuzzy Logic" algorithm it might work better.
Thank You on this.
Mel
If you are wanting to make a port you may want to search for a program called Animals , it has been ported to almost every language known to man.
and you will have more references to base your port on.
For example, if I recall the Animals program (the one I remember seeing an example of) asked questions like "Does the Animal have 4 legs?". Depending on the answer y/n it would then pose a follow up questions and each time narrow down the list of possible animals from a given list.
Can you explain what you see in the code that makes it appear like a knowledge base?
My questions for the next steps are what to replace the Serial.Print in/out with and I'm not sure what to replace "RETURN" with. Looks like Return might be used as a print command? And then the gcd function Ardiuno, Greatest Common Divisor...not sure what to use there.
Last Updated 9/5/14
Code:
Some of the math is a little if-e right now. The part I'm pondering is "gcd" which should not be a variable like I have it listed. It appears to be a math function in the Arduino to find the Greatest Common Divisor. I could probably use some help tackling how to do that.
If a Euclidean magically appeared in the next release that would swell!
As a work around, I suppose it might be possible to create a Euclidean script that compares other values from other scripts, then it could be used by anybody for anything. It makes me very sad (lol) to think of scripting that process though (Whaaaaaa!)
I don't know if anyone has used this, or maybe everyone knew this....but I did not think ARC had the ability to divide or multiple or subtract. But it can do all of these things with the ABS()
The Script manual only show the example of converting a negative number:
" Abs( value )
Returns the absolute value of a number
Converts a negative into a positive number
Example: $x = Abs(-22)"
But does a LOT more! With some luck I might have a functional script soon.
Code:
And you can mix together operations:
Code:
Code: