
MovieMaker
All you professional programmers. This is a Chalenge to you.
The algorythm below is what I am trying to accomplish on my robot. It is NOT a program, but just an idea. If this works, we will have not only an autonymous robot, but one that will be able to LEARN and Improve over time.
Anyone is welcome to tackle it. If you succeed, please POST the code.
This should be changed into code and Placed inside your Navigation script.
Initialize Set ConfidenceLevel to 3 #a group of any actions could be more or less than 16 but I have actions (0-15) Actions: 0=sleep 1=Forward 2=Backward 3=TurnLeft 4=TurnRight 5=Spin Around 6=playExplore 7=LookCenter 8=LookLeft 9=LookRight 10=LookUp 11=LookDown 12=GiveTimeDateDay 13=checkSonars 14=Check4Lifeforms (ScanPIR) 15=Laugh
While navigating:
Generate Unique Random Number (RN) (0-15) choose action (that random number) Read LastMove if last move=bad then (confidence level=confidenceLevel -1) if last move=good then (confidence level equal ConfidenceLevel +1) if ConfidenceLevel more than 3 then confidenceLevel=3 if ConfidenceLevel less than 0 then confidenceLevel=zero if confidenceLevel greater than Zero then confidenceLevel=good if confidenceLevel =zero then goback and generate New RN and start over at the top read status of sonars if status= good then confidenceLevel =(confidenceLevel+1) if status=good then preform Action if status=bad then confidencelevel=(confidenceLevel-1) if status=bad then goback and generate new RN let lastmove=newmove save status save lastmove
We would also listen for the word "No!" if we heard that, Confidencelevel would shrink to Zero also we listen for the word "GOOD!" if we heard that, confidencelevel would be equal to 3
This is a very CRUDE representation of this Algorythm, but, By doing this, the robot could be trained and have More accuracy and Learning. he would be smarter. He will know Good from Bad. Bad would be like running into something. Good would be clear path, etc.
Hope you understand what I am trying to accomplish. If I were a good programmer, it would have already been done.
@MovieMaker, take a look at the File Operations example to see how to parse a comma separated file. Also, there is a post about regarding reading from a spectrometer to determine liquids. This was an example I wrote for @RobotMaker to adapt onto. BUt it gives you an idea of how you could read treat a CSV Text File as a database....
*Disclaimer: this code will not work for a spectrometer as discussed, it was only an example. This is also not the proper thread for spectrometer discussion - so do not comment on this regarding spectrometer, there is already a thread open for that discussion. The original thread for spectrometer can be found here: https://synthiam.com/Community/Questions/2442
This code is only presented as an example of how to read from a file.
Create a comma separated text file in Excel with the ADC range of each liquid. Then you only need to do something like this...
In your CSV:
Here is an example CSV... [feature] 10, 15, Beer 20, 28, Water 30, 45, Oil 66, 80, Hair Gel 90, 95, Banana 120, 160, DJ 170, 185, Milk 190, 210, Vanilla Ice Cream Yummmmmm [/feature]
Here is the EZ-Script code...
DJ i said nothing about the specrometer on this post at all.
Thank YOU, D.J.
I understood, I was just explaining how that is only a tiny part of an AI program/script and how it can be expanded upon in one way.
Rich, I agree.
MEL i can try to help you on the code for AI like DJ POSTED ,i kinda understand it ,getting use to scripts alot and they seem easy so far.

OK, that is a starting point. I invite all good programmer's to add on to it.
Thanks,
Mel
Another point MEL ,DJ made the scripts so even a non-programmer can write them ,including young kids too, i would try it first,
A idea i use is i take a EZB and breadboard or attach sensors or motors or whats you going to use on your robots and then with the ARC try the code,if doesnt work try again and again if still stuck post the code. Reason to breadboard as i call it sometimes hard to program attached to a robot,but sometimes you do also.
I know maybe most guys here dont have time to work on you code ,not because they dont want too just too busy working on thier projects.