Followers

Recent Posts

Tuesday, February 8, 2011

Now 80% more Handy!

I had a birthday not long ago. I've always valued practical gifts over expensive ones, and this year I made a special request to friends and family for things which would make working at my new job just a little bit easier.

When it comes to gadgets, there is a thin line between practical and gimmicky, but I am pleased to report that I couldn't be happier with everyone's choices.

Topping the list are the leatherman multitools. One might expect that two would be one too many, but they complement each other nicely. The first one is a full sized tool which finds use primarily as a bit driver (I am forever absent mindedly putting down screwdrivers and then not having the right size), but which also has pliers, wire cutters, and absurdly sharp knife. I believe it has wire strippers too, but years of incomplete toolkits from university labs have taught me that there is no substitute for teeth.

The other multitool is a keychain sized leatherman which (in addition to another set of smaller screwdrivers) I mainly use as scissors. "What?" You exclaim, "Are scissors at such a premium that you need to carry a pair with you all the time?" Sort of. Next time you are opening a package - food, electronics, shrink wrap - stop and think about what your options are. You can:
a) walk to the kitchen/study and hope whoever used the scissors last has remembered to put the back,
b) use a knife/pen/teeth to bludgeon you way in (god help you if you want to repeal it again), or
c) assault the packaging like an enraged gorilla.

I've put my keys on the keychain one, and I carry the full sized one with me whenever possible. Combined with my other two "tools" which I have on me at all times (a smartphone and a 16gb USB stick), I find that there is almost no problem I lack the equipment to handle. The other day I was able to field strip my ps3 (along with the warranty) in less than an hour.

Obviously my technical experience as a hobbyist plays a large part in making good use of the tools at hand, but I didn't realise how much of a difference it makes having good equipment at you fingertips. Obviously, having a workshop and a full toolbox would be a further improvement, but as a hobbyist living in an apartment these tools have really boosted my productivity.

As a side benefit, I'd say that my zombie apocalypse survival rate has at least doubled.
Published with Blogger-droid v1.6.5

Wednesday, December 15, 2010

Artificial Intelligence for Fun and Profit!

AI is one of those buzzwords which get's thrown around without people really understanding what it means.

Before I continue, I would like to mention that "Cloud" is by far my least favorite word du jour. There is no such thing as the Cloud! Just because you can't see it doesn't mean it is some kind of panacea! Everything still happens SOMEWHERE on SOME COMPUTER, and that computer can still fail!

Sorry, side-rant over. Where was I?

One of the biggest hurdles is defining "Intelligence". Even wikipedia doesn't have a simple answer. whenever I'm asked the question though, I usually go with:

"Intelligence is the ability to solve a wide variety of problems with a limited set of tools"

Which applies very nicely to robots.

Robots need to be more than just state-machines. Generally, robots have tasks or missions, and they are given a set of tools to complete the task. An intelligent robot needs to have the capacity to alter it's behavior to complete it's mission even if the environment changes. This is where artificial intelligence and machine learning play a role.

Many AI techniques can be thought of simply as optimizing techniques. There is a feedback loop (which may be supervised or unsupervised) and an algorithm which is capable of altering itself to satisfy some condition of the feedback.

In a previous post, I mentioned using Genetic Algorithms as a method of creating "intelligent" (per the definition above) robots. Every individual in a population is a "pilot", which takes turns to "drive" the robot. The pilots who are most succesful at the mission get to "train" the next generation of pilots.

Conceptually, this is not a bad way to get a basic adaptable AI working for a robot. Every individual's genetic code is represented as a decision making algorithm which decides what action the robot should take given the input (if any) from the sensors.

My somewhat clumsy implementation involved a 2DOF robot "inchy the inchbot", which learned to crawl forwards using a distance sensor mounted at the back. Every individual had 100 actions in which to move the furthest possible distance - after a few hundred generations, this is what happened:



My sincere apologies for the horrible webcam video. This was a good proof of concept for me, but there were a few things which need improvement:
  1. All individuals get a chance to "drive", even if they suck at "driving" particularly in the early generations, this meant that the robot was just as likely to go backwards as it was to go forwards. On a real mission, this would be unacceptable, since a bad driver might put the whole robot in harms way.
  2. The method of encoding the pilots in the GA was too prone to sudden changes. I used a heuristic function which evolved by swapping and switching operators in a tree format (more on this later), and this meant that even in later generations there was no shortage of evolutionary throwbacks.
  3. The combination of 1 and 2 meant that even though the population as a whole did get fitter, the robot would sometimes spaz out or just stall for apparently no reason.
  4. Another huge drawback was that each individual was very selfish. The individual had to regard for the (sometimes awkward or precarious) position it would leave the robot in for the next individual who drove the robot. The next individual would then have to waste some its "actions" to extricate the robot from a weird configuration - this mean that sometimes even the best individuals would under perform unnecessarily.
  5. In this particular application, the tendency for genetic algorithms to "Cheat" was very apparent. The sensor was mounted on the back, and early tests resulted in the robot simply pointing the distance sensor at the ceiling to maximize the "distance traveled" =)
This was a good proof of concept test, but I might need to re-examine some of the details. I don't know of many applications of GAs to do this kind of robot decision making, but if someone has some references I would love to hear about them.

Saturday, November 27, 2010

Where I've been

It's been a very long time since I posted anything, hasn't it. In case you were wondering if I had a good excuse or not, here is a list of things that have happened since my last update:
  • Got a part time job,
  • Got a full time job,
  • Learned lambda calculus and LISP,
  • Wrote a programming language and a compiler,
  • Learned to sing,
  • Sang on stage,
  • Held some more Robot Wars competitions,
  • Handed over the society to next year's president,
  • Put together a tender bid for work,
  • Won the contract,
  • Bought and built a new computer,
  • Set up a home file server and uPnP media server,
  • Accidentally erased my MFT and boot sector,
  • Managed to restore them,
  • Built and programmed a robot for the New Inventors TV Show,
  • Appeared on TV,
  • Studied for exams,
  • Finished university
So yeah. I've been busy. Fortunately, each of these is an excellent story which I hopefully will be able to recount here in the future.

But now that that's out of the way, we can get back to talking about robots.

I've been following the Google AI challenge (http://ai-contest.com/) and I highly suggest you check out the forums. Were it not for the aforementioned points, I would have loved to put an entry in, but as I write this there are only 6 hours left to go for submissions. Ooohhh.... now there's a challenge....

I also wanted to bring your attention to this amazing post. Give it a read while I go beat my head against the wall for even considering giving myself MORE things to do.