Shop OBEX P1 Docs P2 Docs Learn Events
Let's Start a Thread on Artificial Intelligence in boebot Robots — Parallax Forums

Let's Start a Thread on Artificial Intelligence in boebot Robots

MovieMakerMovieMaker Posts: 502
edited 2009-01-10 19:43 in Robotics
I have mentioned this many times in other posts. But, it seems that most people are not interested in discussing or sharing this info. So, I figured, maybe if it has a dedicated thread.

Let this be a thread to share ideas and comments and even code to try on the boebot.

Not too long ago, there was a person at Parallax that actually did some coding for Artificial Intelligence. His name was Terry Newton. You can do a google search and find him. I do not know if he is still with Parallax. But, also David Heiserman and Frank DeCosta had the same ideas long ago. So this is not new.

It may be impossible with the basic boebot to make it learn by it's mistakes, but I am going to give it my all until there is no breath left in me before giving up.

The traits should be as follows:

The robot has a set of instructions for several tasks or subroutines. (The more the merrier)
The robot starts off randomly picking new tasks to preform.
The robot has certain situations that give it Pleasure (Maybe taking a nap and sleeping, or for sure eating and charging it's batteries)
The robot has certain situations that give it PAIN. (maybe a stalled motor or battery drain, or simply being bored by doing the same thing over and over.)
As the robot randomly picks a task and preforms it, it decides if it is good or bad.
It remembers what it did and attaches a CONFIDENCE level to the task.
It Roams it's environment until it runs into another change in it's environment.
At this point, we have programmed it that it MUST DO SOMETHING.
But, we don't tell it what to do, we let IT decide what it shall do.
It picks a random task and then tests it for the Confidence Level. If it is LOW( painful), like running into a wall, it spins the random number generator again and picks something else.
When the Confidence level is high, it will preform and remember this task.
Eventually, it will develop a sort of "Personality" that it will keep until it looses power to the eeprom.
It will be able to go through a maze without hitting the sides of the maze.
It will know where it can be charged and do this automatically.
It will know where the fireplace is by it's temperature gauge and not get too close.
It will also recognize that it has an animal or human (mammal-warm blooded ) in the room with it.
It can tell WHO the person is by what the person is wearing, ie; Red, bright yellow, etc.

I feel like there is a way to do this, I don't know EXACTLY how. But, if we narrow every task, solution, situation or a specific action down to a single bit in a word, it would be easier to do, I think. It's Environment can just be a single Binary number with each of it's bits changing constantly as it roams.

I Invite you to share snipets, algorithms, and even full blown code until we have the Smartest -Self taught- Learning Robots on the planet.



tongue.gif
«1

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-12-25 20:55
    It's almost like trying to teach a mouse to fly: it just doesn't have the capacity. You'd need to use one of the nicer stamps, and you won't be able to do everything on your list at once, probably one or two at a time. Not to be a downer, but realistic: the BS2 is nice, but it can't compete with a human brain (or a mouse's for that matter).
  • kwinnkwinn Posts: 8,697
    edited 2008-12-25 21:12
    Hmm... could this be a job for the 3x3 (or larger) array of props mentioned in the sandbox? How about a bytecode interpreter for AI to run on all the cogs? Inter prop/inter cog communication and co-ordination would be the first issue to work on. Any one out there have any ideas?
  • Tom CTom C Posts: 461
    edited 2008-12-25 21:13
    MovieMaker,

    I think that your idea of a thread that can act as a clearing house for code/algorithms to create an autonomous robot is a great idea.

    I have been collecting code and algorithms for building both indoor and outdoor autonomous robots for about a year, but I do not think that I am anywhere near having even a fraction of what will be required.

    I can write and understand PBASIC pretty well and am now working on learning Spin because I think that the Propeller is the way to go for the tasks you have described.

    If you want to use the BS2s, you might want to take a look at the Blue Bell Design website (http://www.bluebelldesign.com/) to read about Subsumption Engines, Coprocessors,·and how they can be used to help simplify autonomous robotic designs.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!

    Post Edited (Tom C) : 12/25/2008 9:19:27 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-26 01:52
    I did not even put EVERYTHING on the list. I am talking voice recognition, and voice and music generation, showing emotions and more. I only listed the most important items. There is Vision Navigation and running off a Solar Panel to charge it's rechargeable batteries and many more items.

    I started with the propeller, then went to the bs2px24, then the bs2e, then finally the bs2 because of compatibility issues.

    If it could be done in the '70s on an 8 bit microcomputer, it should be able to be done today which is over 30 years later.

    I just know in my heart that it is possible. Even if it is not, still keep those subroutines coming.

    How do you eat an elephant . . . one byte at a time. So this Pink Elephant can be digested if we all get together and do it one little part at a time.

    Thanks for the input. Don't give up. If we get it at least pointed in that direction we are making progress!!

    One thing I forgot to mention. In the Book ROBOT PROGRAMMER'S BONANZA, the author has a simulated robot that LEARNS from his Experience in the same manner that i am talking about. It is written in RoBotBasic. All we need to do is translate this code to PBASIC for the BS2 and plug in a REAL robot. A second option is to make our BS2 compatible boebot work with RoBotBasic instead of Pbasic. This robot in the simulation gets Really Good at what he is doing in about an hour. Of course things are speeded up because he is only a simulation. But, the whole thing doesn't take that much more room. Even if it takes more ports we can make them, I think with some 595 shift registers, etc. Keep all of this in mind. I have written some Vertical Markets before, so I have programmed professional. But, this has been years ago and I am really rusty. But, for someone up on the language it may not be that big of a deal.

    Just think of what the importance of the situation would become. . . . . A robot that could learn from his mistakes and demonstrate true AI (although it is not Real it sure would be neat.)

    I will add to this thread as I can remember stuff and would appreciate your input as a body.


    hop.gif

    Post Edited (MovieMaker) : 12/26/2008 2:09:30 AM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-26 02:30
    The Bluebell coprocessor looked nice.
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2008-12-26 05:46
    These ideas are really big, and I question the practicality. I prefer projects that are useful or educational. For example, today I walked into my office and the thermostat was not very accurate, causing the boiler to add heat to the floor. I decided I'll replace the wire-wound thermostat with something effective - a DS1620 and a BS1 with a high and low set point. That's all. Totally useful and consisting of very basic logic and easy programming.

    On the way out of my office I caught a glimpse of the robot I most recently built, complete with GPS, radio modems, four Pings, and every piece of hardware we make at Parallax. Lots of great hardware. Although I've built this robot, I haven't loaded the first line of code into it at this point. Probably because it's a big project - and it will take a long time to develop the application that I want to make which is actually very simple compared to what you propose above. I'll achieve the project, but I know what lies ahead. It's really important to divide the project into very small manageable and useful subsystems that are functional on their own and in the whole robot control system.

    Based on my own experiences, I'd recommend to learn how small pieces of a project work and to build them one at a time to completion. Don't get too caught up in the end result and set reasonable goals. And be really sure that the next 100 hours of time you invest were for a good reason. What will you learn from the project? Is it something that sounds really interesting, or is it a project you've thought about for the past several years and you've accumulated enough experience with the little pieces to put it all together?

    Ken Gracey
    Parallax, Inc.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-26 13:54
    Ken,

    That's what I am talking about. Adding one little piece at a time. Even if it takes a lifetime. It's the Hunt not the Kill that's the thrill, if you know what I mean. But these algorithms have been done before. The learning parts of things are the parts that I like. Not my learning, but the robot's learning.

    Thanks for the Reply. Science fiction 20-50 years later usually becomes a Reality. We can not put a cap on things even if they sound impossible.
  • Tom CTom C Posts: 461
    edited 2008-12-26 15:46
    MovieMaker/Ken,

    I am taking the approach of using distributed processing as I feel that no one processor is up to all of the demands of a truly autonomous robot.

    I have leveraged off of Steve Norris' excellent hardware/software designs (http://www.norrislabs.com/)·and plan to have 1) a processor to provide directional control, 2) a processor to sample and analyze sensor inputs, 3) a processor to provide control of auxiliary components such as arms/grippers, camera servos, voice synthesis, and the like, and 4) a central master processor that will coordinate the distributed processors, make intelligent decisions, and learn from its environment.

    Like Ken has said, this will be a massive project with respect to the time and effort that will need to be expended. That is why I have broken it down into what I consider to be manageable chunks so I will not be overwhelmed by the final goal of a fully autonomous robot.tongue.gif
    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!

    Post Edited (Tom C) : 12/26/2008 3:52:44 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-27 02:36
    TomC,

    That was a Great link. Maybe , if we can not have one processor do all things, we could break up the tasks into numbers of tasks and have each processor do one set of things. Ie; roaming 1st cpu, video another cpu, audio and so on. . . . .
  • SamMishalSamMishal Posts: 468
    edited 2008-12-28 13:24
    Hi All,
    ·
    I·have been·an advocate of·distributed processing for a LONG TIME now. It is really the only way to do any serious robotic AI work. It is also what serious researchers use.
    ·
    I have written an article about the matter that actually implements a distributed processing project to control a Simulated AND emulated Space Station Attitude control (only yaw) using PID digital control.
    ·
    The system can switch from controlling a simulated station to controlling a REAL model.
    ·
    I used·two BS2s and a PC running RobotBASIC. I also used a Pololu module which is really just another processor....so I really used 3 processors (and support circuitry) along with the PC.
    ·
    Here is my thought.... You can use the PC to control various processors. The processors do not have to have a lot of power. They do not do any AI, they just do the job of collecting sensory data and then send them to the PC (wired or wireless). The PC then does the AI and sends actuator settings (wired or wireless) to the various processors that do the work of controlling the actuators; and the process repeats.
    ·
    If your setup is located on one robot you can have a central (communications) processor to do the job of communicating with the PC and then distributing the commands on to its subordinate-processors and collecting data from them. This simplifies the communications process from the PC to the robot/device.
    ·
    The PC can then be used with a suitable language like RobotBASIC to do all the AI thinking and memory/math/arrays etc. crunching.
    ·
    This exactly what I do in the Space Station project
    http://www.robotbasic.org/resources/SpaceStation.zip
    ·
    the zip file has the article PDF and program code for RobotBASIC and for PBasic
    ·
    This YouTube video shows the setup in action
    http://www.youtube.com/watch?v=oxqlTaJy31M
    ·
    ·
    Regarding the AI robot mentioned in the Robot Programmer's Bonanza book in Chapter 16 you can implement it RIGHT NOW with very little work. Chapter 17 shows how you can have a BoeBot modified so as to be able to respond to THE EXACT SAME algorithms from the simulated environment. The idea is the same as I have mentioned above.
    ·
    The processor on the BoeBot does not do any AI, it just sends sensory data· and receives actuator settings all through a BlueTooth link to the PC running RobotBASIC.
    ·
    It is all described in Chapter 17. and is shown in action in a two part Youtube video
    http://www.youtube.com/watch?v=i5JT4WdMofQ&feature=user
    and the second part shows how to make a REAL robot do the line following that was simulated, with JUST ONE EXTRA LINE OF CODE.
    http://www.youtube.com/watch?v=vftgmZQCheA&feature=user
    ·
    So now to implement the AI in chapter 16, all you have to do is setup the robot as described in chapter 17 and setup the environment as desired and make sure the right sensory devices are installed and PRESTO....you have a REAL robot that can do REAL COMPLEX AI work.....
    ·
    ·
    I am writing a third book all about the subject above as well as how to do advanced Interfacing I/O projects using RobotBASIC as a language to do projects such as the space station above and lots more (e.g. Robotic arms).
    ·
    In the book I am thinking about using the Parallax Propeller Chip as a major support for the distributed processors TO PC linking and for doing multitasking work. The only consideration is time taken to learn the propeller and its language (Spin). I may just stick with what I know (SX and Stamp) which are good enough for doing most things.
    ·
    I hope that the book will be out in May 2009. It will have many interesting projects and it will use the concept of distributed processing extensively. It will also stress the concept of using the PC (using RB) as a REMOTE COMPUTATIONAL PLATFORM for doing real AI work for small robots that will have only limited onboard processing power.
    ·
    RobotBASIC has many capabilities to do a lot of AI work as well as the I/O capabilities to communicate with devices (do not underestimate this aspect). Here are some examples:
    ·
    See this video to see how RobotBASIC can be used to create VISION projects. This project is described in an article that will be out soon in Servo Magazine. It shows how RB can be used to capture REALTIME images from a camera, do Image Processing and then command a HUMANOID ROBOT to react to the situation. I use the Parallax servomotor controller to control all the servos on the robot directly from the PC.
    http://www.youtube.com/watch?v=LwvspYFXJMM&feature=related
    ·
    All the source code can be found here
    http://www.robotbasic.org/resources/Humanoid+Vision.zip
    ·
    ·
    See this video to see how RobotBASIC can be used to simulate a robotic arm. RobotBASIC’s 3D graphics engine is used to draw the simulated arm.
    http://www.youtube.com/watch?v=AukHmkZqmys
    ·
    The demo programs are available here (binary only, source code will be released with the book)
    http://www.robotbasic.org/resources/ArmDemos.zip
    ·
    ·
    There are a lot of other videos showing RB in action that may interest you too
    http://www.youtube.com/profile_videos?user=john30340
    ·
    Also I have an article about RB published in the January 2009 issue of Servo Magazine
    (www.ServoMagazine.com )
    ·
    Here is another reason you may want to consider using RB as your PC language. This paper I wrote shows code written in Java and the exact same action written in RB. The Java code is 1½ pages long and is almost scary. The RB code is ¼ page long and is readable to any person. The paper deals with other issues, you may like to read it.
    http://www.robotbasic.org/resources/RobotBASIC_AnEffectiveEducationalTool.pdf
    ·
    Regards
    ·
    Samuel
    P.S. I wrote a Sudoku game using RB. The program can solve any Sudoku puzzle you give it, but it can also GENERATE puzzles for you to solve. It can save you lots of paper and magazine purchases if you like the game. I made the source code available as a Christmas gift to members of RB’s forum. You DO need to join the forum to be able to download the zip file. Here is the address of the forum.
    http://tech.groups.yahoo.com/group/RobotBasic/message/130
    ·
    I am enclosing the binary version of the program so that you can play the game even if you do not want to join the forum and are not interested in the source code (You do need to have RobotBASIC.exe, download it from http://www.robotbasic.org/resources/RobotBASIC.exe )

    Post Edited (SamMishal) : 12/28/2008 1:51:47 PM GMT
  • GWJaxGWJax Posts: 267
    edited 2008-12-28 14:24
    I do have to admit RobotBasic is a great program for everyone and everything, My Elvinator Project will be using this program as well along with a few Basic Samp 2px24's. Now its just really learning how to connect them up to the program using the RS232 port, but a John has informed me that his book should be out soon, So I guess I've waited this long and few more months won't hurt.

    Jax

    ps the program was going to be built in VB6 until I seen that RB was much easier to program the AI in.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-28 17:06
    Hey Sam! I am glad you could join us. I feel honored. Your book Robot Programmer's Bonanza is one of the one's that had such programs in it. If it can be done on the computer screen, then it can be done in real life. Over Ten Years ago, Terry Newton with Parallax did this same thing. But, he did it in ASM language. I feel I just need to convert from RobotBasic to BasicStamp2 Pbasic. This is the only language I think I can use on it. It would be wonderful to have a RobotBasic to Pbasic Converter program. The program I would like to see converter over the most is 16.4 out of your book. In the past in my whole life, I have seen several times that people have done the impossible simply because no one told them it could not be done. So , they did it. At any given time, there are Equal Right ways and Wrong ways to do something. Most people give up when they try and fail one or two times. They JUST need to find a better way. My favorite word in the English Language is: YET! ie; Well, no, I haven't gotten this to work . . . . . . . . . . . . . . . . . . YET!

    If it takes more cpus we will just stack them up. They are not very big. We can just make a larger package.

    Tell John B. I said "Hi!"


    By the Way: GREAT BOOK! Look forward to your new book.

    smile.gif

    Post Edited (MovieMaker) : 12/28/2008 5:42:17 PM GMT
  • AImanAIman Posts: 531
    edited 2008-12-28 21:50
    SamMishal - is that your clown or is it just a picture?

    Moviemaker - I agree totally with Ken Gracey, start on one thing thats simple and build from there.

    What you want can be done if you are willing to be patient and tackle one thing at a time. Dream and dream big, but in the pursuit of that dream don't get discuraged or give up. Keep it simple...

    Pick an item and create a very simple skeleton, work out your programing bugs and then flesh out your program for that item only. Once flawless move to the next item.

    Your first main item is a list of subs - Ok. Thats going to happen when programming the robot and expand as new tasks are added. Done.

    Second - randomly decide what to do. How? Use a random number generator? What triggers that? Use select case? What cause's it to select? Use enviromental situations? What causes the enviroment to trigger responses? Use if then? Once again, whats going to trigger the if statment?

    My point is this, there needs to be some programming as a starting point.

    First rule of AI - Nothing happens without guidance.

    Post Edited (AIman) : 12/28/2008 9:55:50 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-29 01:40
    Thanks AIman.

    smile.gif
  • SamMishalSamMishal Posts: 468
    edited 2008-12-29 03:26
    AIman, that is actually MY picture, I just come out of the ocean on moon lit nights to code then go back to snuggle inside my favorite anemone....
    MovieMaker...Chucks....I am honored by your words....BLUSH....
    There should hardly be a need to translate any RobotBASIC code to PBasic or vice versa. My idea is that the RB code does not need to know about HOW a motor is turned on, it does need to know HOW a sensor is interrogated. It just ASKS FOR and gets the data or action done.
    Think of an Executive and her secretary. The executive does not need to know how the secretary is going to type the letter and print it. She just asks for it to be printed. The secretary knows HOW, but does not need to know WHY the executive needs the letter. He just does it.
    Both the secretary and executive have their specializations. One uses PBasic and the other knows RobotBASIC. The reasoning is coded·in RB and the actions are coded in PB.
    PBasic code is very suited to doing things like PWM, FEQOUT, etc. While RB is very good at having the RAM, MATH and User Interfacing as well as the crunching power and speed. PB code is used to·turn pins on or off to activate motors, read sensors, and so forth. The µC just does what it is good at, it does not need to know WHY it needs to read a sensor, or WHY the motor needs to be turned on, it just does so because it was ASKED to do so by RB.
    RB does not need to know HOW a motor is turned on; it could be a DC/Stepper/Servo motor, RB does not care, it just says to PB "Turn the motor ON", "Read Sensor X" "Output THIS BYTE to the Arm’s Elbow controller", etc. It does not know how to do this, it just knows that IT WILL BE DONE.
    RB decides the REASON for doing things. It knows that according to the PID algorithm it needs the LEFT motor to be turned for 10 seconds. So it tells PB to turn on the left motor, waits for 10 seconds and then tells PB again to turn off the motor. It could also be talking to another PB while it is waiting for 10 seconds to ask this second µC to give it a Quadrature value. The second µC does not know what significance the quadrature reading has or why it is needed. It is just very good at·tracking·quadrature·states and giving a value·when asked for.
    So you can see that PB code and RB code would almost never need to be inter-translated. They are codes that do different but complimentary tasks. This is why distributed processing is a powerful idea. Just like the executive would be at a loss to use a word processor, the secretaries would be at a loss to think of long term goals. Both the executive and secretaries working together (each doing what they are best at doing) create a functional and efficient company.
    This is how RB on a PC should be used in conjunction with various SXs or Stamps or µCs. Which also brings out another point, if you are using different processors they may need different languages to be able to utilize them in the most efficient manner. Thus an SX could be best for implementing a quadrature encoding circuit. Stamp is very good at doing PWM control. Use both by coordinating them with RB. The SX is best programmed in assembly. The stamp in PB.
    All that is needed is that RB (the executive) be able to TALK to each and send commands and receive data from each.
    This is all explained in chapter 17 of the Robot Programmer’s Bonanza book. The program 16.4 does not to be translated to PB to make a BoeBot do the same action. A BoeBot that can sense heat, and has bumpers and color sensors can do the actions in Chapter 16 without any code being transported to it from the program 16.4.
    In Chapter 17 (and youtube videos) we show how the very same code used to make a simulated robot follow a line can be made to make a BoeBot follow a line. The code was not translated to the BoeBot. The BoeBot had code that could communicate with RB and accordingly send line sensors’ readings and turn left or right or go forward. That is all the code that was on the BoeBot. RB decided according to the sensory data received weather to turn the robot right left etc. and told the BoeBot to do so. The BoeBot just obeyed motor direction commands and sent sensory data. IT DID NOT know that it was following a line.
    The same thing can be done for chapter 16. You just need a few more sensors. Ones to detect the play area, food area etc. Also a good way of knowing where the robot is. Having this you can make the simulated robot in 16.4 do the same thing in real life without ever translating the complicated AI stuff to the robot itself. All the robot needs to know is how to read sensors, send them to RB, receive motor directions and activate the motors accordingly. RB will still continue to do the very same AI work but now instead of making the simulated robot move it would be making the real robot move. Instead of reading the simulated robot’s sensors it would be reading the real robots sensors. BUT THAT IS ALL the difference. The actual THINKING is still in RB on the PC.
    I hope this clear enough. It is a simple concept yet it is SUCH A PARADIGM SHIFT. I call a PC with RB doing the above described actions A REMOTE COMPUTATIONAL PLATFORM.

    Regards·
    Samuel
  • SamMishalSamMishal Posts: 468
    edited 2008-12-29 04:21
    Hi Jax,
    Thanks for your nice comments about RB!
    What is an Elvinator?
    The RS232 commands in RB are explained very nicely in the Help File.
    The code in the Vision project shows how to communicate the PC
    running RB to the Parallax multi-ServoMotor Controller using RS232
    http://www.robotbasic.org/resources/Humanoid+Vision.zip

    The code from the Space Station project shows how to communicate
    a PC running RB to a BS2 (Read the PDF for details)
    http://www.robotbasic.org/resources/SpaceStation.zip

    I hope these code examples would help you while you are waiting
    for our new book to come out.
    ·
    Thanks for your support and kind comments.
    ·
    Samuel
  • MovieMakerMovieMaker Posts: 502
    edited 2008-12-29 14:30
    The Elvinator is an Animated Elvis Bust that talks with Elvis' voice. This gentleman has disassembled the robot bust and added a "Terminator" type mask instead of the rubber skin. The Terminator +Elvis = the Elvinator.

    Thanks for your comments.

    By cutting and pasting the code from RobotBasic code from 16.4, the syntax needs to be changed. This is what I am talking about. This is the program I wish to run. The most Important thing to me that I wish to run is "Adaptive Behavior" and the robot learning from the robots mistakes. The program in 16.4 will probably run on the pc, but I want it to run directly on the basicstamp2. The ONLY language that the stamp that I have knows is Pbasic2.5. I believe this to be true. Correct me if I am wrong. I really don't want to "teather" to the pc. Hooking it up to the PC is only possible through the usb port for programming in Pbasic2.5 for me right now. I don't mind hooking a BUST up to the pc because it is not mobile.

    I hope that I have explained myself properly. Got to go. Time to go to work.

    smile.gif
  • Tom CTom C Posts: 461
    edited 2008-12-29 15:50
    MovieMaker,

    I too had originally planned to have my robot be able act alone without a "computational assistance" teather with a PC.

    However, Samuel makes a very strong case for the usefulness of a "division of labor" between the base PC and the robot.

    The cost and complexity of implementing autonomous behavior, as you have described, on only the robot is going to be a momentous undertaking.

    I believe that I will take Samuel's RobotBasic approach as a first cut at attempting to implement an autonomous robot for home use and then maybe attempt to go fully autonomous after, I am sure, a series of "lessons learned".

    Samuel,

    I like your very persuasive "division of labor" arguments for the use of a PC and on-board processors to implement an autonomous robot. I took your advice and just ordered your book off of Amazon last night.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
  • SamMishalSamMishal Posts: 468
    edited 2008-12-29 18:17
    Hi MovieMaker,
    To add a PC as a Computational Platform to a robot you can do it in various ways.
    1-··· Have a Laptop or small desktop onboard the robot and is directly wired into other onboard microcontrollers and/or equipment.
    This solution is actually currently being used by two people who are RobotBASIC users·in South Africa·and in England. I also did this exact same thing·17 years ago with a mobile robot and a laptop running C (not C++) programs, I had not written RobotBASIC by then. You do have to have a hefty robot, mine was almost as big·as a wheel chair and it had the mobility and capacity of one of those modern wheelchairs. It was a fun platform to do MANY things with.


    2-··· Modify a PC Motherboard + SD card or USB flash ram to run a preset program. This simple PC would then be onboard your robot along with other micros and so forth. This solution is good for people who know what they are doing when it comes to PC electronics and OS. I know of no one who has tried this.

    3-··· This is MY preferred solution and is the PROFESSIONAL solution used by people·in NASA and other SERIOUS researchers. You can have a WIRELESS link between the PC and the robot. The PC is then a REMOTE COMPUTATIONAL PLATFORM (RCP). With this solution you have a LOT MORE VERSATILITY in the way you control your robot. see the discussion below for more details. Also the robot can be as small as needed. Also the PC does not even need to be close to the robot, as long as there·are signal relays for example the INTERNET.

    With the RCP option you are able to implement a USER INTERFACE to the robot while it is running. You can have systems monitoring you can have occasional user override of actions of the robot, you can have feedback to the things the robot "sees" and you can monitor its thoughts and you can command it with new tasks to perform.

    With this option the robotic platform can be kept small. Only the sensory and actuations systems are needed onboard. Maybe some gyros in the case of airborne or seagoing platforms, or even for doing INS (inertial navigation, or even with a digital accelerometers).
    Also with the RCP option once the robot is configured and its onboard microcontrollers programmed, it never needs to be tampered with again. All the work can now be done through the PC to make the robot do different TASKS and actions depending on the projects. You can even reconfigure the robot in REAL TIME while it is in the field still doing its work. You can convey imperatives to it to make it do new actions while it is running.
    Have a look at Chapter 15 in the Robot Programmer's Bonanza book. The robot in this chapter is autonomous but yet can be commanded to go to different places using a networked system (simulated). How can you do this if the robot did not have some kind of REMOTE LINK to be able to tell it where to go next. Through this very same link the robot can also have access to the computational power it requires to perform its autonomous actions. You can also monitor and command the robot over the INTERNET.
    I think a paradigm shift eyes.gif is necessary to appreciate this kind of robot. Most think that an autonomous robot has to be human like. We humans do not have an RCP (or do we???? Hmmmm food for thought here·burger.gif. An autonomous robot is still autonomous even though it is using “extra brains” not onboard its physical body.
    ANOTHER ADVANTAGE of this idea is that you can have MULTIPLE robots sharing the same RCP and can act as a HIVE or MATRIX of robots smhair.gif. They can then intercommunicate and be orchestrated all at the same time through a central control system.
    Also the RCP system can provide information to the HIVE that is otherwise not possible to obtain by the individual robots. Imagine having the robot able to access the internet to collect data it requires. Think of a hive that is distributed over remote places but that can communicate and orchestrate their actions by using the internet as their communications link.
    The Terminator·skull.gif·is coming…..tongue.gif

    Tom C..............Thanks a lot for your support and I hope you like the book.··
    Regards
    Samuel

    Post Edited (SamMishal) : 12/29/2008 6:36:38 PM GMT
  • SamMishalSamMishal Posts: 468
    edited 2008-12-29 20:27
    Hi All,
    I forgot to mention that the new version of RobotBASIC that should be out in two or three·months will have the ability to send emails (SMTP) with attachments and to send data packets using the TCP (and maybe the UDP) internet protocols.
    So the Robot in Chapter 15 of the Robot Programmer's Bonanza book can be a REAL project not just a simulation with GREAT EASE. You will be able with RB and·a few·Basic Stamps or perhaps a Propeller chip to command a robot over a LAN, WAN or Internet.
    Imagine a remote data collection station that can send periodically an email with an attached data file to a monitoring station (eg environmental data or even pictures).
    All this will be possible using RB not too long from now. This topic will also be in the new book.
    RB can use TWAIN compliant cameras RIGHT NOW to capture images and to analyze those images.
    To Jax
    I forgot to mention that there is also a paper I wrote about how to use the EB500 bluetooth module from Parallax·to be able to communicate with a Basic Stamp from the PC wirelessly, I am enclosing it ·below (and other stuff). One of the documents I am enclosing below was a draft for the article that came out in March 2008 issue of Servo Magazine.
    Also there is a rudimentary Hyper Terminal program included in the ZIP file from www.RobotBASIC.com that shows how to use·RB to communicate two PCs together (I am also enclosing it).
    ·
    Regards
    ·
    Samuel
  • GWJaxGWJax Posts: 267
    edited 2008-12-30 03:37
    Thank you very much Samual, The Elvinator that I am building is very intense with reconstruction of the Elvis Alive bust from WowWee. I have been working on him on and off for about a year now, My Avatar is the Elvinator. I have been adding chapters to this hack via RoboCommunity and here is the first part of 5 that I have done : http://www.robocommunity.com/article/12655/Transforming-Elvis-to-the-Terminator---Part-1/
    you can keep following the articles all the way to part 5 which is one of my favorites. Part 6 will have all the electronics and MCUs in place and then part 7 will be the AI program written in RobotBasic. This is why I need to learn the best way to attach up the PC via RS232 or the printer port to give him the ability to learn from speech. No Elvinator will ever produce the same results because of its trainer and on down the line I'll have him go out and surf the web for information that he desires, at least that is the plan, and I think RobotBasic is the Golden Goose I was looking for.
    Also I got second place in the instructables web site and other sample video is on my youtube page under GWJax. Some sample code can be found on the threads form www.robocommunity.com . My articles are very easy to find just google GWJax and they all appear. I'll keep you informed on what I do with him using your program if you would like. And any information you can spare is much appreciated in getting the Elvinator up and running as fast as I can.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-01 15:03
    I don't have bluetooth or wireless on my robot. I was hoping to convert the rbasic program to pbasic and run the adaptive behavior program on it. I realize that it would work better in the other direction. But, until I can spring for the extras, I would just like to convert.
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-03 04:28
    Moviemaker, you can create a interesting thread.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    To make something work one must build, test, and verify bfore proceding.· -- myself
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-03 05:05
    Thank You, it is just Natural Curiosity.
  • RICoderRICoder Posts: 91
    edited 2009-01-03 05:54
    MovieMaker,

    This is an interesting and HUGE topic, also one I am fond of. I have spent a great deal of time on AI over the years for various applications but switched my focus to ALife as I find emergent behavior a bit more interesting. That focus drove me to robotics. There is a point here, so I suppose I should get to it.

    First, distributed is best, so listen to whomever said that already.

    Second, the idea of offloading to a PC is a really great idea, but for reasons other than those mentioned. Specifically, procedural languages are not equipped for AI coding. It is extremely difficult to translate AI processes into if/then statements and loops, and even where you can, it is extremely inefficient. Personally, I find the Prolog to be the best AI language, it is great for expert system type programming and problem solving and is probably what you should be looking at. Having a PC that you could write the "brains" on would be a great first step.

    I'll keep an eye on this thread as I build my first robot next week and start pushing AL rules to it to see what happens, maybe it will have application in what you are trying to do.
  • Taylor1672Taylor1672 Posts: 8
    edited 2009-01-03 14:20
    i think that the Propeller MicroController or better would be a good choice for this application.What about a wireless link to a computer to log data or to alert when he is stuck. You could also use the computer to wirelessly control the robot or tell it to dock. For outside application what about a the GPS sensor from Parallax. It monitor time, date, location,, speed, and direction; plus GPS data that would be very usefull for the robot so it could mark landmark it "finds".
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-04 00:37
    So, the boebot would have a bluetooth modgule on it and the computer to run it if the scenario outsmarts the boebot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    To make something work one must build, test, and verify bfore proceding.· -- myself
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-01-04 07:38
    I really don't see any limitations in using a Basic Stamp for Artificial Intelligence. You may need to use the chip for some data logging/storage, and PBASIC can be well suited for some really great code. I've seen some remarkable implementations using BASIC a number of years ago published in one of the books about AI. I believe all those programs will run on PBASIC and the stamp with some adaptations.

    Don't limit yourself to thinking in words and concepts of words. The numerical constructs readily lend their uses to computing thought, as well as various digital and analog means, such as light for example. After all, it is electrical energy that fires neurons along the synapse in the human brain for thought processes. And now that we have Basic Stamp coprocessors and stamp super clusters, it's a piece of cake to get started building such a project.

    Since we're all stamp users, I propose a project where each person would work on a piece of code entity, to do and accomplish some aspect of AI. In the end, the entire collective assembled could be very powerful. Of course this would take some good advanced planning. I'm saying we have all the tools and sensors plus stamp varieties to accomplish this goal.

    humanoido
  • SamMishalSamMishal Posts: 468
    edited 2009-01-04 12:00
    To Jax,
    I watched your videos, Love the glowing eye.·The Elvinator·looks like a fun project.... I love all the information you are disseminating… very admirable....
    Thank you for having confidence in RB and I hope I can keep improving it to meet your (and other people's in this forum) level of excellence and expectations. A new version will be out soon that will have some neat new stuff, that I think will please you....I won't say much more since I am still working on the new version and I do not want to promise stuff that may not quite make it into this new version.
    =======================================================================
    To MovieMaker,
    To do REAL AI work you would be required to spend REAL EFFORTS, it is not a simple thing to do INITIALLY, but once you get into it, the initial outlay rapidly becomes inconsequential in view of the ongoing advantages.
    One of the things not generally appreciated is the fact that to do any REAL AI, you require data structures like Arrays, floating point math, Files, databases, Queues, Stacks, Lists, Binary Trees, Graphs, Sorting, Searching,· FFT, etc. etc. etc…..a lot of memory and number crunching. Whether you use Prolog, Lisp, C++, Java, RobotBASIC, Forth, Haskel, Python, etc. etc. etc., you will need the memory and number crunching. Additionally, think about things like internet access, parallel processing and inter-processor communication.
    Another generally not appreciated thing is the concept of “Horses For Courses”. Tools must be used according to their functionality. Microcontrollers like the PIC and SX do not have the memory and Floating point processing that is required for REAL AI. ·
    MOST microcontrollers cannot even do floating point math. Yes, Yes, I know that you can create Assembly routines that do that, BUT, by the time you load these routines into the microcontroller there will be very little memory capacity left to do anything else. Also what about·USER INTERFACING? Mouse, Keyboard, VGA???
    Microcontrollers are really supposed to be imbedded logic circuits. They are designed to do CONTROL I/O. In the old days when one wanted to implement a LOGIC CIRCUIT, one designed it using TTL chips (And/OR gates, FlipFlops etc.) or using a PLC or an FPGA. However, a microcontroller can do most of this logic a lot easier and cheaper (not always depends on clock speeds rise times etc.). That is what microcontrollers are designed to do and they do it very well. Nevertheless, they are NOT microprocessors. They are not supposed to be used as a CPU for GENERAL COMPUTING.
    You certainly can use one to MAKE a computer, but then that is a different project. What you want is to USE a computer as the Remote Computational Platform. Which computer is up to you. If you want to use one you made up from microcontrollers, then good luck. However, why not use a tried and proven computer that you can use RIGHT NOW….the PC? You can also use the language you like, but you should use one that is easy to learn, easy to use, and has the ability to do Hardware I/O, graphics, Array math, and the ability to be able to program simulations.
    The efforts of people who have built things like the Stamp Stack are AMAZING and ADMIRABLE, but by then you might as well have bought a few wireless transceiver and used the PC with a few Stamps; a lot cheaper and simpler. Nonetheless, the fact that people do such things is what makes the horizon of knowledge keep moving evermore forward, but that is a different topic and project.
    The Basic Stamp is based on the PIC (or SX) microcontrollers·which are a family of controllers with a limited memory and no ability to expand the memory. The limitation is due to the BUSes of the devices. They have a 12 bits instructions BUS and 8 bits data BUS. Do the math and you will see that is only 4096 bytes (actually 12 bits not bytes) of possible program instructions. Also, since they are Harvard based processors, they have different Data and Instructions buses. The data (RAM) bus is only 8 bits, so only 256 bytes can be used for registers or RAM.
    Yes you can implement a paging mechanism, but that is not provided for in the device and to do so in software would use up the memory. To implement it in “helper” hardware is possible but by the time you do so you might as well have built a PC.
    PBasic is designed for the Stamp microcontroller. PBasic does not provide the constructs to be able to implement the AI structures mentioned above. Try to do an array of 20x20 in PBasic and see what happens. How about trying to sort an array? These are not shortcomings; PBasic does things that other languages cannot do and does its job wonderfully. It is supposed to make the Stamp do its work and it does so beautifully. But the Stamp is not a PC it cannot be a PC and should not be used like a PC.
    Have a look at this project at MIT. You will notice that they are actually using the Remote Computational Platform Concept.
    http://mit.edu/whall/www/heli/paper/node3.html#SECTION00030000000000000000
    There are numerous advantages in having an RCP. Think of Planetary exploration. If you have an orbiting RCP that controls multiple Rovers, you can simultaneously explore multiple regions, rather than being limited by one explorer. Also each individual explorer is simple and expendable. The RCP stays “safe” up in orbit and does not incur the possibility of damage during landing.· Since there are numerous explorers, there would be no problem if one or more gets damaged during the landing. You will still be able to achieve the mission (albeit slower or more limited).
    Why not start implementing RCP projects NOW? If the concept of RCP is to be ultimately your design goal, why not START NOW to do things this way? YOU CAN DO IT NOW…..you do not need to have TONS of money, only a little extra for transceivers. It is easily achievable and if you start implementing things using the RCP concept you will be able to achieve small or ambitious projects in the very same manner. You are able to do BIG or SMALL things in the same manner and there is no need for extra outlays or training or experience.
    Parallax has many RF transceivers, and the EB500 is an excellent Bluetooth transceiver. Chapter 17 in the Robot Programmer’s Bonanza talks about it and about how to use it. The articles I posted in the earlier post show how to use it in a practical manner. There is also the Zigbee family which is excellent and has the ability to be used by RB.
    Microcontrollers have limitations. Once you have reached the limitations of the ON BOARD design path, you will have to REDO everything again almost from scratch to implement everything all over into the RCP design path. WHY NOT START NOW with the RCP method, which has very few limitations (as far as I can see). Moreover, it is achievable, it is not a dream or an idea; you·CAN do it NOW.



    Post Edited (SamMishal) : 1/4/2009 12:05:57 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-04 15:17
    Thank You Sam, for bringing me back down to earth. I am a dreamer. I will place the bluetooth on my want list (maybe for next christmas) or maybe sooner. I have several desktops, so I can dedicate one of them to doing this job.
Sign In or Register to comment.