My Bookmarks

Empty at the moment

As i tell everybody, this blog is mostly a dump for my trivial technical ramblings and self-deprecating sub-negative posts wallowing in my own self-pity

Monday, May 02, 2005

the story of robocology

robotics is an emerging discipline. or not. man has strived to create autonomous machines and we've moved from mechanical automatons to electrically controlled machines running pon computers with fantastically complex and long algorithms. we thought that with our newfound discipline of electronics and its rapid advances, we could soon create thinking, autonomous machines with ease. And we quickly ran head-on into a brickwall. moving around a real-world environment filled with obstacles in the way is something we do in our daily lives without even realising what it takes our brains to accomplish this task...until we try to make computers armed with video cameras and sitting on wheeled platforms do this. I believe we're still having some difficulty.

the academic fraternity that deals with AI is coming up with many new computer programs and algorithms for visual processing, moving around obstacles, having robots get up on their feet and walk properly. Many ideas and schools of thought. Then there are those who prefer to start on a lower level: try achieving the intelligence of insects and other 'simpler' organisms before we try to create artificial humans. Years ago i came across this idea as i read one of my first encounters with literature on robotics research (a book approximately titled "Behaviour-based robotics") Then, i felt this was quite lame and unnecessary, but i now think this is the way we should proceed. I'll first have to set the background and explain the rationale for a methodology of artificial intelligence research that i will also outline here.

The various physical and mental abilities of living creatures today have evolved over time, to meet the demand for survival. And survival is for reproduction, which is in turn for the continued existence of the genes. Creatures own the capabilities they possess to allow them to survive in the ecosystem they call home. It was natural circumstances which forced creatures to become smart enough to find their way around based on the visual information from their eyes, to execute the hunting of their prey...Perhaps by analogy we can try to reverse-engineer this process of evolution by which nature gave living creatures their intelligence. Perhaps we could try to create robotic creatures that similarly have to fight for their survival in a robotic ecosystem. Then we'd put ourselves in the shoes of mother nature...how could we engineer these robots to give them abilities which they need to survive, just like their biological counterparts? Using the 'simpler' insects as inspiration, thus removing other distractions like visual processing by advanced eyes that mammals possess and social skills like language etc. we concentrate instead on creating solid, robust control mechanisms for 'simpler' tasks insects are capable of and then building upwards to higher level skills which are more difficult to design.

First and foremost, this approach serves to guide us and give us focus in our quest to develop artificial, intelligent systems.
The second reason for this bottom-up approach is related my belief in how to 'create' intelligence. (i don't think "create" is a very appropriate in this case, but i couldn't find a better word)

I disagree with the approach of trying to programme our way to intelligence. that somehow we will one day be able to develop an algorithm that would make a robot intelligent. besides, many of the efforts in software are directed towards specific "intelligence goals", such as visual obstacle avoidance, recognition of facial social ques, locomotion, moving a hand to manipulate something, working as a group...I think we need a common underlying methodology to achieve all these. I would refer to the brain as an example of this. From insect brains to human brains, organic brains (yikes that sounds awful for some reason) are composed of complex and vast networks of neurones. Neurones and the sound interconnection of neurones is the basic methodology by which nature builds its brains and creates intelligent creatures. Using these basics, nature has shown us what complex and interesting and intelligent behaviours it can create. And for that reason i think we should give nature's method a try too.

This approach of creating a robotic ecosystem and starting out by creating the simplest and most primitive robotic creatures which possess the most basic skills that nature's most primitive creatures have facilitates our playtime with creating networks composed of basic functional units and once we can get our own networks and robots to achieve the basics as exemplified by nature's primitive creatures, we can build on our success and use what we have learnt to get there, to create more complex creatures.

Mark Tilden's BEAM robotics is a well known effort that uses this approach. But the robots so far, while exhibiting interesting behaviours, are still purely reactive devices. No memory, no learning, and the networks cannot modify themselves, their connections. The last feature is important, and in neuroscience, the ability of the brain to do this is called neuroplasticity. Plasticity. Important quality. That'll be a gap we can attempt to fill. What matters in a cognitive system that's made up of networks of functional units is its architecture. Methods and ways of combining the units to create behaviours is the goal for this project. And we hope to progress from the simplest behaviours and skills in the most primitive organisms to the most complex ones.


More details of the robotic ecosystem in the next post ;P

miscellaneous ramblings on design philosophy

I like aesthethics. Engineering a new piece of technology that's novel and works wonders, yet simple and reliable. No patchwork designs allowed, where imperfections in design are spotted at last minute, and patches are added (adding complexity and part count too) to make it work. That makes a design more complicated, when it could have worked desirably with better design and less components. This is art.

Artificial intelligence probably sounds better in its acronymn form, AI. The combination of two letters looks simpler and more aesthetically pleasing. It also hides the word "artificial". This is such a notorious word; it carries the implications of imperfection, especially in the realm of robotics, where artificial, man-made creations pale in comparison to the beautiful creations of mother nature. Nature is such a brilliant engineer, architect, artist. We can only seek to emulate her...we've not surpassed her even though many people would like to think so by making mental references to our 'giant' land-clearing machines whose sheer 'size and power' seemingly dominates the land. Most of us probably haven't realised that nature's subtlety is a very good lesson in engineering. The masculine part of us has forgotten subtlety and simplicity and given disproportionate attention to 'raw power' and strength.


hmm i wonder if i'm making much sense. surely i do agree with the above, and it certainly reflects my design philosphy, but i sensed a lack of sincerity as i typed the previous paragraph. that's a little cause for concern. =P

Ramblings on the Matrix P layer (no not the movie)

It started with a dream to build a flying machine; an Unmanned Aerial Vehicle (UAV) Not just any other UAV, but a penultimate machine. Penultimate because (to borrow ACS's school motto), the best is (always) yet to be, in the quest for perfection. Penultimate because we knew that the ideal was far beyond our practical reach. Nevertheless, the team comprising of myself, martin, eric, and soon after chi hao, sought to create something special. Perhaps my imagination was running wild, and i got rather zealous trying to turn dream into reality; as the initiator of this project, i set an ambitious tone and made known my ambitious vision for the outcome of this project. The conception phase of any project is probably one of the most exciting times of a project. We spent many hours for many weeks discussing about the UAV, our visions of what it could be, and some detail design. I printed a spec sheet of the Predator UAV, and sought to make our creation better. Such lofty goals...

The electronics of this UAV were fully handled by myself, and i had underestimated the enormity of this task. It is not the design of the electronics systems that is difficult. I believe this is a relatively simple system. But combine this with the stresses of schoolwork, the fact that i was doing a lot of these things for the first time and learning as i was doing, and the many many details involved which range from conception to detail design to fabrication and all that...micromanagement is very stressful and i was doing all this by myself without any help. And i wasn't managing my time and schedules too well, as much as i tried with of timelines, deadlines, timetables and plans.

Our UAV is expected to contain several systems, including an inertial navigation unit, a servo control unit and a communications unit, and must be expandable to include more systems if necessary. I decided that this called for a modular system. Some ideas about how the modules would communicate with each other surfaced. In particular, this was the Radio Frequency Data Bus (RFDB). Something like bluetooth. Simultaneous bilateral communications between modules, broadcast capability...the rough concept was drawn up.

Then one day i walked home with a classmate. I guess i was particularly inspired that day, and i'm sure the conversation we had on the way home must have contributed to that inspiration too. When i got home, i got down to work and wrote in pencil on a few sheets of paper the concept for the "matrix".

The word "matrix" implies something of a network, a myriad of connections, an array of objects. That was what i wanted to have for the UAV. Something of an infrastructure to support the presence of modules, and peripherals such as sensors and actuators. something to "maintain and connect, power and protect". I wanted to create a system that would:

1. facilitate communication between controller units
2. facilitate connection between controllers and peripherals (such as servos, sensors etc.)
3. act as the power grid of the whole UAV
4. act as the immune system of the UAV, protecting the electronics against 'rebellious' controllers and other malicious foreign elements

Point 4 was an idea that was good to have, but it was difficult to get into the specifics.
Point 3 was partially worked out in detail, but it remains unconvincing to myself
Point 1 resembles the earlier intention of the RFDB. It was called the C layer of the matrix. C stands for Controller.

Point 2 was the part i worked on for virtually the whole of this matrix affair during the period of the UAV project. This was called the P layer of the matrix.


The P layer is an electrical network of cells which enable the connection of controller units and peripherals. That is the bottomline. But we could spice things up a little, couldn't we?

Here are the essential spices, and what stuff the P layer actually is made of:
There should be reliability. That includes the capability to recover from failure. That also includes the requirement that this system is decentralised. One failure should not topple the system.
Hence the system is composed to many basic functional units called cells.

Using the P layer is like playing an eccentric pass-the-parcel. Suppose you're a controller and would like to talk to a lightbulb and perhaps get it to turn on. You know that the lightbulb is connected to one of the cells. The controller is also connected to one of the cells in the P layer. Each cell has an address to mark its location.

To talk to the lightbulb, you would have to send a signal containing the address of the lightbulb (which is the address of the cell the lightbulb is connected to) and

The controller sends out an address signal to the cell, which receives it, takes a look at it and decides which of the cells adjacent to it should receive it, and passes on the address signal. The cell makes the decision by comparing the address signal it received and the addresses of itself, and the cells adjacent to it, and routes the signal to the destination with the closest matching address to that specified by the signal. It will not route the signal in the direction it entered the cell.

At the same time the address signal is being routed from one cell to another until it reaches its intended destination, an electrically conducting path is created that traces the same path taken by the address signal. Hence an electrical connection is created between the controller and the peripheral (the lightbulb in this case). Because this is simply an electrical connection and nothing more, this leaves a lot of flexibility as to what we can do with this connection. Any peripheral as simple as a lightbulb to a complicated sensor can talk to a controller unit, without additional hardware on the peripheral's side.

The cells are assigned addresses in such a way as to prevent signal paths from going in circles without ever reaching their destinations. Besides this, numerous other details are also being considered in this design, the oversight of which may crippple the system. This


Haiz...why was i so emotionally disturbed during the course of the design for this system? the frequency based router is now considered too complex in design, and a newly discovered flaw means the design cannot work. Perhaps i might be able to cure that flaw in future (that needs a particular voltage controlled impedance that i'm still working on), but i would choose not to. I think its too stressful and tiring to work on something that took months of really hard work and mental agony to create, that required too much thinking about too many minute details. There is no doubt i covered a lot of ground in the past, and those records of minute considerations in the design are still relevant even in the design of the new router.

I've got a very shaky sense of self-confidence. Sometimes i look back and think that i've done a lot during those months i worked on that design. I feel marginally good when i manage to remind myself how formidable a task it was to create such a complicated design, consider so many many minute details, having just learnt some of the essential knowledge less than a month ago. I still think this is doubtlessly a beautiful design. The main features of this design make it very desirable, very attractive, and very novel.

But more often than not, i'm inclined to interrogate myself. Why did you take so long to design that thing? Why do you have to feel so disturbed during the design? Couldn't you be more organised during your design process, so you'd be less stressed, distressed, and more productive? Was it so difficult to create that router design? Yes the conception took a long time, and that's justifiable because lots of those main features of the P layer design were very novel and take lots of inspiration. But how could you take so long to design the router? How could you have gotten so lost and confused that you didn't always know what you were doing?

Sometimes stress builds up so much that it clouds your mind and slows your cognition. I guess that's my only answer to all those questions above.

What isn't so healthy is the persistence of those negative stressful feelings even today. i was working on improving the design during this new effort to revive the project, because i still see its beauty and usefulness. It still is stressful to think about all the things i have to think about. Old principles remain, but its been decided that a new sorter design is to be created. Embarking on a totally new design is exciting and fun, but the many minute details and considerations involved in this design are reminiscent of those i had to consider in the design of the previous, frequency-based router (which as mentioned before, took up the bulk of the design time). This revives many of the negative emotions felt before in the past, emotions which have no reason to surface.

It won't be easy to chase away negative emotions which stick to you like a shadow. I can only wish that i can become more knowledgeable and organised, and try to indulge in the joys of a brand new creation in progress, while trying to lose the unnecessary psychological baggage that's still chained to my feet.