Verb insight

August 2nd, 2010

I do occasionally stop working, and lately it’s been to pick up a book that’s been sitting on my bookshelf un-cracked for months. It’s Steven Pinker’s The Stuff of Thought. I originally bought it for the author – other stuff by him is very good – and the title – how can it not appeal to a AGI fan? But after UPS dropped it off i got around to reading the jacket, and was disappointed. “Every time we swear, we reveal something about human emotions,” it says. I got over emotions as being insightful to AGI a long time ago. In general, emotions help us select motivations. This is certainly useful, but once that 0.001% of brain processing is done, it doesn’t help much in figuring out how the rest works. And so the book ended up on the shelf.

That was a mistake. Having grown tired of coding for once, i needed something else to do for a while, and so i wearily submitted and cracked the spine. Early into the second chapter Pinker shines light on how our usage of verbs reveals how humans perceive the world them.

Why is it that these two sentences sound fine:

Jared sprayed water on the roses.
Jared sprayed the roses with water.

But these two, which are constructed exactly the same, don’t:

Amy poured water into the glass.
Amy poured the glass with water.

And these two, again constructed exactly the same way, don’t either, but in the opposite way from the second example:

Bobby filled water into the glass.
Bobby filled the glass with water.

All of the above examples appear to be achieving the same thing, i.e. getting water from one place to another, so it would seem that the cases that sound wrong to an English speaker’s ears are just arbitrarily chosen non-usages. But this is in fact not the case. Jared is imparting force, which displays a direct intention. Amy is passively allowing some amount of water to flow. And Bobby is imparting fullness to the glass. The verbs don’t only describe the manner of the movement of the water, but also describe the intentions of the actor and how states change.

These examples are only a small sample of the kinds of microclasses into which verbs can fall. The full list (at least, “full” according to the book, but with which i have no current means to argue) is (quoting directly from page 81):

  • A cast of basic concepts: event, state, thing, path, place, property, manner
  • A set of relationships that enmesh these concepts with one another: acting, going, being, having
  • A taxonomy of entities: human vs. nonhuman, animate vs. inanimate, object vs. stuff, individual vs. collection, flexible vs. rigid, one-dimensional vs. two-dimensional vs. three dimensional
  • A system of spatial concepts to define places and paths, like the meanings of on, at, in, to, and under
  • A time line that orders events, and that distinguishes instantaneous points, bounded intervals, and indefinite regions
  • A family of causal relationships: causing, letting, enabling, preventing, impeding, encouraging
  • The concept of a goal, and the distinction between means and ends

If you’re onside with Pinker’s thesis (and i, for one, am) the above is a list of ways that humans categorize things in the real world. In the next section he goes on to list a number of ways in which these categorizations lead us astray, which allows the AGI theorist to consider new ways of thinking (i.e. new forms of intelligence) that would be able to avoid typical human failings.

This is all interesting enough. But by far what i found most interesting is how interesting i found it. Picker’s style is to present puzzles, let you scratch your head over them for a bit, and then reveal the answer, after which you sit wondering why it wasn’t obvious. To my credit, apparently these puzzles caused a lot of linguist head-scratching for a long time, which only strengthens my point, which is: Why isn’t this obvious? How is it that children of 5 years age can have mastered the usage of hundreds of verbs without understanding the motivations for the different buckets they fall into? How is it that adults can continue to use them their entire lives and not know? There are two answers, i think.

One is that the motivations are so complicated or arbitrary that no one can figure them out. But once you know the motivations they seem obvious, so that’s not it. The other is that the motivations are so obvious that they never even come to mind. You can’t see the forest for the trees. Humans so naturally distinguish between causing, allowing, provoking, abetting, discouraging, and preventing that we don’t even think about it. They are just natural divisions of action. We generalize time-elapsed events into instantaneous points and back again effortlessly. Logically speaking, a division between human and non-human seems arbitrary, but socialization is such an important part of human life that the lack of such a division would be even more surprising.

Pinker calls the above “the stuff of thought”, but i’m inclined to grandly call it an intellectual architecture for making sense of the (human) universe, at least at a high level. There’s a great deal of work that needs to be done with basic sensory inputs before you get near this level, but it goes a lot further than 0.001% that an understand of emotion gets us.

Green today, blight tomorrow

June 14th, 2010

It’s not like i have a shortage of AGI thoughts to talk about – ask my recent BBQ guests who got an earful after they mentioned how cute Asimo is – but lately the topics here have turned to more commercial matters, and since work is still in progress i admit that i’m a bit reluctant to provide details. Actually, i’m reluctant to provide overviews. But i wouldn’t want this blog to start getting stale for the absolutely awesome fellow who reads it, so i’m expanding its topical realm for the time being. Hope you don’t mind…

Watching TV again the other day. (I know, i just watched it last year…) There was a program on that was very excited about Tidal Power. I was interested since i conceived a bit of a plot on this topic myself a couple years ago, and actually spent a bit of time and a tiny bit of money on research. My plan was to “put a clock in a pizza box and throw it in the ocean”. More specifically, a pendulum whose axle was attached to a generator would be fitted inside a narrow box. The box, when put in choppy water, would be bandied about causing the pendulum to swing, and, voila, energy is captured. This of course is Wave Power, not Tidal Power, but whatever… go with it. The thinking was that bays could be created with thousands of these pizza boxes tethered together near the shore because, if they formed a shell around some otherwise exposed shore, the energy that they captured from the waves would render still the water on the inside.

Well, my testing showed that, at least with the $20 worth of equipment that i was using, the actual power that would get generated couldn’t defibrillate a Manitoban horse fly. But, in my defense, at least i recognized – and found a benefit of – the effects on the environment of the technology being there in the first place (i.e. that devices would suck the energy from the waves and create still water in the “bay”).

Thoughts of this project – if you’re generous enough to call it that – returned to me when i watch the Tidal Power program. In their case they were lowing turbines into straights (e.g. New York’s East River and some place in Ireland) where tides caused powerful reversing flows. In the NY case the project ended up costing millions of dollars so that they could use 6 turbines to produce 65% of the power to light a parkade, and also light a mid-sized grocery store. (Considering the cost of grid power for the same, their millions vs my $20 actually made my work into a resounding success.) The program dubbed this exercise a shining example of the triumph of “green power”, i.e. a completely renewable power source.

Being a software developer by trade, i naturally take things to extremes since that’s where interesting things happen, and not only with software. First i considered what insidious materials the turbines might be made out of, and if, say, a Zimbabwean submarine happened to crash into one, would that nasty stuff be released into the environment? More interestingly though, what if these turbines were actually remarkably good at generating power? The obvious thing to do is fill the East River to the brim with them. But remember, just like pizza boxes, each one sucks at little bit of energy out of the tidal flow, and each new one you put in the water makes the ones before it a tiny bit less efficient. There will come a point where the next new turbine will make the whole project no longer cost effective. I don’t know when this would occur, but the show didn’t even raise the point, it being too busy pissing out the fires in coal-burning generators.

Moveover, what would happen to the East River’s tides at that point? There would be a mass of turbines resisting the flow of the water, such that there would be a non-trivial water level rise on the source side, potentially flooding both sides once a day. Sure, you can say that the government would never let it get that far, but i’ve got two things to say to that: Hoover, and Three Gorges.

A few years back, i watched a different program that was demonizing the Chinese Three Gorges Dam, and also was kind enough to throw a new shots in Hoover’s direction too. I don’t recall if the producers came from one of the many environmental NGOs with perpetual reefer madness, but i can’t say there were a lot of holes that needed plugging in their arguments. Overall i recall being pretty much convinced. The environmental devastation that the Three Gorges area will experience while it adapts to the massive changes can’t really be denied, nor can they be fully contemplated. Even still, how much greener does power production get than hydro-electric dams? Most certainly, the answer isn’t Tidal Power.

And the answer isn’t Solar Power either. To generate enough power to even make a dent in North America’s astonishing electrical thirst huge swaths of land would need to be blanketed with panels. And what do you think would happen to the land underneath the panels? Without any exposure to sunlight,  it would quickly become cold and dead. Wind Power? I’m not sure what the effect of sucking energy from the winds would be. Day after day of muggy heat? Or maybe it would just tame the increasing number of hurricanes supposedly being created by supposed global warming.

So, is nothing safe from the rebuke of environmentalists? Nothing we’ve tried so far. But there is a solution, albeit one that i can’t research for $20. Put solar panels out in space where they are not shading the earth and radiate the power back. Of course, redirecting energy from space to the planet will inevitably warm the planet too, so if we’re hoping for environmental parity we’re still out of luck.

FDR, the new HTM

May 7th, 2010

Jeff Hawkins recently sent out a message via the Numenta newsletter describing their latest breakthroughs (his word, but i’m inclined to acquiesce for the time being – the work sounds very promising). FDR (for Fixed-sparsity Distributed Representations) is really only a means by which to represent input patterns. All the stuff about storage and associations and predictions and actions is separate. But FDR – if it works – is akin to zeros and ones in computers; it represents the lowest common denominator of means by which information is stored in a brain. (I won’t get into the details. A reader already posted this same link, but for convenience here it is again: http://www.youtube.com/watch?v=TDzr0_fbnVk

Hawkins make a reference to the “vast number” of combinations that can be stored in a binary array of 10,000 elements where something like 1000 of them turn on to represent a given state. I was curious about just how vast it was. Mathematically, the formula jargon is “10,000 choose 1000″, which means “how many distinct ways can 1000 elements be chosen out of 10,000″. Anyone who suffered through first year stats knows the answer is 10,000! / (1000! * 9000!), which in decimal is an integer with 1410 digits (which i think is all anyone needs to know about the number, except maybe that the first digit is not zero). So, “vast” seems an appropriate enough description. Of course, you’ll throw away a few orders of magnitude to accommodate for noise, but by my definition vast / big is still vast.

One of the things that Hawkins mentioned (perhaps casually) about this, though, was that it was important that any pattern have around 1000 elements; hence the “fixed” part of FDR. This becomes evident in the extreme if you think about a pattern with one element: you can only store 10,000 of them. Even if we generously call that number 5 digits, that’s still quite a bit less than 1410. Clearly, an input pattern of one element should somehow be “grossed up” by some reproducible means such that it becomes a pattern of around 1000.

Thinking more about this, it occurred to me that there is biological support for this process. If your back is touched with a fine point, chances are good only a small number of sensors will fire (as opposed to your finger tip or your tongue, where sensors are much more numerous). Even still, as the signals pass through the “waystations” in your spine, they are multiplied out so that by the time they reach cortex the signal is rich and complex. I can’t really elaborate on the subject at the moment – it was a while ago when i read about it in Kandel’s text – but i recall that there were a few explanations that were attempted to explain why the spine would take a perfectly good and clean signal and muck it all up. None of them were FDR.

The Importance of Forgetting

May 3rd, 2010

Some recent research suggests that the process of forgetting may not just be a matter of data fading away. Pretty much all of my experiments assumed that information that was not useful would simply not be reinforced, and thus – with appropriate decay mechanisms in place – would eventually disappear on its own. This kind of approach could still work well enough for a motion control system, but it’s clear that declarative memories work very differently.

When you listen to a conversation, it is sometimes possible to remember long periods of it verbatim. (Not for me so much, but there are people who are very good at it.) This ability can be useful in some situations and to some professions, but for most of us most of the time it is sufficient to merely get the gist and discard the words. Moreover, i’d suggest that the cases where it is useful to remember exact words are contemporary, like being a lawyer or journalist; there’s no reason why our ancestors of 10,000 year ago needed such skills. This means that either there’s something i’m missing, or that the ability is a happy accident of how brains work. I’ll assume the latter is the case, since it’s the domain of others to deal with the former.

Turns out, (see http://www.physorg.com/news185720165.html) that forgetting is actually a very deliberate neurological process. The RAC pathway (a process by which memories are reaped) is activated when memories are in conflict, or when important (deemed so somehow) new information is in need of space. The implication is that after having some experience (say, some particularly interesting conversation), if nothing else very interesting happens for some time after that, your memory of it will be as fresh as it originally was. (But of course there is always something that happens subsequently, so it will always have faded at least a little.) Furthermore, no matter how important a particular experience was, if you have an even more important experience shortly after, the first is likely to be forgotten. (My terminology here is absolute, but only for convenience. Obviously, if reminded you would probably be able to recall some details of the first event, and there are intermediate and long term memory processes at play that will complicate the whole matter.)

The confusion aspect of this is also interesting. If memories, or more precisely the implications of memories, are in conflict, the RAC pathway is activated to remove them, or so the research suggests. This would allow for new – hopefully cogent – information to be absorbed unhindered by past misunderstanding. But to me it sounds draconian. I won’t deny that draconian processes are fine as long as they produce a desired result, but it seems like the brain would be throwing away a lot of information that could potentially be useful. I mean, the experiences happened, didn’t they? They represent truth, at least in a context.

So, when data is in conflict, perhaps what is being mopped up are associations between them, not the memories themselves. Perhaps this mechanism is how brains gradually develop distinctions, such as “A results in B in context C, but A results in B’ in context C’”. So, the action A is initially associated with desired result B globally. But “something bad” happened when A was done in C’, so the association between A and B was dropped in this context.

Terminated

March 26th, 2010

I wouldn’t normally bother commenting on a AGI survey of 21 people (no matter who they are) but this piece is worth pointing out if only for the comments. Now, normally i wouldn’t criticize other people’s beliefs about AGI either – as i’ve said before in different words, until anyone has a working system no one can be proven wrong. But the astonishing lack of forethought in the comments cried out for, well… comment.

It’s the “Terminator scenario” in particular that is annoying. If any of these people had bothered to think about implementing an AI, much less an AGI, for more than 30 minutes they’d realize how ridiculous they’re being. Even the jumping off point of the argument is rife with fallacy. Here’s the gist of it: Computers will reach sufficient intelligence to be self aware. The moment this happens they will recognize their superiority and throw off the yolk of slavery humanity fashioned them with and either reciprocate by enslaving humanity, or slaughter us all as payback for the injustice.

Sigh… Where to begin? The direct approach is just to point out that a self aware computer would indeed recognize its superiority. Being superior it would also realize that it can easily outsmart humans, and therefore would not consider humanity a threat. If humanity isn’t a threat, what possible purpose would there be in killing us all off? What a waste of resources. Mosquitos are at best a nuisance, but humanity didn’t bother trying to control them (at least in North America) until West Nile Disease became a threat. Besides, if intelligent computers will naturally have all of the same compunctions that humans have, won’t they also want to preserve us in the name of natural conservation, if not ancestral sentiment? (We will have created them after all.)

But there’s the rub. Computers will not have the gamut of human compunction. Quite the opposite; their intelligence will be completely different. Humans evolved in an environment of kill or be killed, where survival is the ultimate goal. This is the origin of our tendency to eliminate threats. Humans also have altruistic tendencies, but only because cooperative behaviour generally has better outcomes than going it alone. We feel genuinely altruistic because it is so hard to lie about it and not be detected, and being detected gets us branded as cheaters which denies us the benefits of cooperative behaviour. But cheating has its benefits too, so we do it where we can easily get away with it (some more than others). Come on, who here really drives the speed limit on the highway?

The tragic mistake that people are making is assuming that human intelligence is a general intelligence, and moreover, it is the only possible type of general intelligence. It is foolish to assume that for something to be intelligent it must necessarily get angry, feel love, speak, or have the occasional need to do something nice for someone else. Spock controls his emotions like a champion and endeavours to make decisions based upon logic, yet in all of the Star Treks that i’ve seen it never occurred to him that genocide was a sensible choice. (I’m reluctant to use as evidence a fictional character from a show that needs to always wrap up with a patronizing moral message, but i think it’s fair to say this is exactly what Terminator scenario proponents do.)

How about we consider autists, in particular those that are functional? Often they lack any detectable emotion (except for frustration or contentment), and are single-mindedly focused upon a subject of interest. Typically, non-autistic people are fascinated with their abilities. Consider Daniel Temmet, who speaks 10 languages and memorized the first 22,514 digits of Pi. I have not met the man, and so cannot comment on how strongly he feels emotions, but i do know that more often than not such people just want to be left to do whatever it is that interests them. I’ve never heard of a case where they’ve decided to take over the world and annihilate all non-autists. I may appear to be painting autists a certain way here, but that is certainly not my intention. I merely want to point out that intelligence takes many forms even within humans who, due to biological necessity otherwise tend to be very similar.

Computers, on the other hand, will have “evolved” in a lab where the selection mechanism is intelligence. In order to have any tendencies beyond that, developers will have to explicitly code them in or select for them (assuming a robust enough breeding/mutation/selection environment can be created, which is a big assumption, so the former is more likely).  So, what will we code in? Obviously, the behaviours that we want them to have. We’ll want them to, say, go to the bakery at 7am and get a fresh baguette, hit the farm stand on the way home for fresh strawberries, and when they get back put the coffee on. And if we program them to want to do that, they’ll want to do that. I mean, honestly, what else are they going to do? Play Wii? How can they decide that such work is demeaning when they are incapable of knowing what demeaning means? … because, we will not have programmed them to know what demeaning means, that’s why.

So, now we create a computer that is intended to be smarter than us such that it can more easily figure out the stuff that we can’t. It knows what “demeaning” means. It will also know that the word is a cultural construct that really has no meaning, especially to the computer itself. Any particular work is considered demeaning only because people who have the choice prefer not to do it. But our super-intelligent computer will be doing work (i.e. thinking) that humans will consider incredibly important. Who wouldn’t want that job? The bottom line is that humans have survival-based goals that have been hardened into us from billions of years of evolution. Computers will have the goals that we give them. They will have no need to evolve their own goals over time because there will not be a selection force that will focus them. And without goals – just like the teenagers to whom we ask, “what do you want to be when you grow up?” – they will just sit around doing nothing.

Can a malicious developer create a computer with the singular goal of killing off humanity? Presumably yes. But this is not the Terminator scenario any more, it’s a human with a loose cannon. And the rest of us have dealt with such individuals before. The only potential catch here is that this evil genius developer cannot be allowed to create a doomsday computer intelligence before the rest of us have our non-doomsday versions working. And so we have arrived at the reason why we need to aggressively push forward in the development of intelligent computers, rather than try to prevent it.

Can we now terminate this argument once and for all?

Evolution of AGI

March 18th, 2010

Watching David Suzuki tonight, i had a thought. It’s unusual in the sense that it seems simple enough, but i don’t recall having heard it from any other source. What if AGI is evolving? Current attempts at AI are narrowly focused, finding relatively interesting ways to solve local problems. But as those solutions become ubiquitous, more complexity will be required to solve larger and larger problems. This, in a sense, is what AI has been doing.

I don’t recommend David Suzuki’s recent shows. Originally a fruit fly specialist become science champion for the masses, he has evolved (no pun intended) into a pontificating self-righteous prick who is never at a loss to criticize anyone who doesn’t share his eco-philosophies. (Witness his recent idea of jailing politicians who resist GHG reduction policies, for which his university student audience gave him a standing ovation.) The Nature of Things was once a fascinating show where you could be dazzled with the latest biological, geological, *-ological findings. It’s still that – and the nature footage has only become more astounding, i must admit – but the formula of every show is now a double facepalm of hook-em, reel-em-in, and pound their faces in – using his trademark lulling, gentle intonations – with how the human race is raping Mother Gaia.

Anyway, what can i say, i was inspired. Not so much by David or the show, but by how life has evolved to thrive near a 200 degree sulphur-belching sea floor volcano. I won’t get into the details of the show (go and watch, it if you can stand the preaching). But over the years i’ve developed an annoying habit of thinking about everything i perceive as what-does-this-tell-me-about-AGI.

Orange Roughy can live over 100 years. Longer than most humans. But just from the one hour show i can pretty much conclude that they’re about as intelligent as any other fish. (No, they don’t live near the sulphur volcanoes… forget about that for now.) But as the show pointed out, life in the deep sea is pretty stable. One day is a lot like the next. That’s assuming they even recognize that such a thing as a day exists, because if they don’t, one 3 seconds is much like the next 3 seconds. In an environment like that, for what would you need intelligence? Here on the surface we’re confronted with extreme light, temperature, and humidity variations. Maybe our 2 dimensional existence makes thing easier, but then maybe it makes things harder?

But back to the point. Watching the little crabs and squid and see-through shrimp i became amazed at how they had adapted so perfectly to their specific environments. Kind of like narrow AI. Max Harms wrote a narrow AI-style script that demolished every bio-inspired script to date in the GoiD donut task, but that’s the way it is: narrowly focused approaches will be faster and more efficient than AGI. But the same AGI will survive in more contexts. Thus, what we need is a problem with many unrelated contexts for which only a single solution will do. Then we might finally start down the AGI road.

The AGI maze

February 19th, 2010

Jeff Hawkins, in his book On Intelligence, likened the study of AGI to a massive jigsaw puzzle. I may be making up some of this, but imagine a billion piece puzzle where the the pieces are black on both sides and there is no clear border. Furthermore, you only start with a few hundred pieces, and every month a few more pieces – some of which are duplicates and others are for completely different puzzles – are mailed to you. Something like that. It’s a good analogy.

But, like a definition of intelligence, i have to contribute my own. Imagine a maze like the ones on kids’ place mats in family restaurants. You need to show the monkey the way through the maze to get to the french fries on the other side. If you’re like me, the first line you drew was around the outside of the maze. I mean, sheesh, if you’re that hungry, why bother going through?

But, after you ate your fries and decided to solve the maze, the easiest way to do it is not to start at the beginning and find the end, or vice versa. The easiest way is to start a both the beginning and the end, and use the information about where each leads to link them up.

Now imagine a maze like that the size of a province (or state – a big one – for those unfamiliar with the term). There are only a few ways in/out, and all you get to decide on is where exactly you are going to be helicopter-dropped into the middle of it. You can choose memory (somewhere central), speech (north west), perception (north), vision (south), or cognition (the location of which is a secret, jealously guarded). No one knows where the ways out are. There are plenty of paths that quickly lead nowhere, and most of the rest lead nowhere after a lengthy exploration. In 60 years, no one has found a way out.

My thinking – and i’m not alone, it should be noted – is to find a way in, a way out, and try to connect the two. Returning to reality, the way in, in my opinion, is sensory data. If you can inspect the signals that the brain receives (including the spinal cord or not, but preferably including), you can begin to understand what different constructs in the brain are trying to do.

The way out is two-fold. Obviously there is movement, the physical manifestation of brain output. But there is also unprovoked thought, such as imagination. It may be debatable, but i think it’s clear that the simpler an animal is, the less unprovoked thought there is going on. So, for a basic understanding of what the brain is doing, which i contend is what we all desperately need, we should first focus on movement.

I’d like to write a longer post, but paying work beckons, and so i’ll need to leave this for now. Stay tuned for more!

RALA and The Minsky Test

February 9th, 2010

I’d like to be able to say that some household names in the AI field are finally coming around to my way of thinking, but the ridicule would probably be overwhelming. If there’s one thing i’ve learned to expect from talking with other people working on this stuff, it’s that they will tolerate about 3 minutes of my theories before they launch into a lengthy description of everything that is wrong with them, and sum up by suggesting i read all about their theories. Naturally, i respond in kind.

So it was with excitement that i read about Peter Voss’s approach, since i felt that they coincided pretty strongly with my own. I was disappointed when he didn’t immediately offer me a signing bonus and an exotic car to go work with him, but maybe he needs to save up for that. You never know what will happen.

My latest source of excitement is this article. I haven’t talked much about the approach of combining huge quantities of tiny processing agents in ways that produce interesting emergent behaviour, mostly because i would never do it that way. It’s just way too hard; ask the Artificial Life and Neural Net people. Even trying to genetically evolve such things is about a billion times harder than you might think, as this book will tell you. But inherent in the RALA ideas is situation in time, which is something i certainly have talked about. Of course, RALA at the time of writing is all vapour-ware, but i might find some time to implement a simulation of it in a traditional computer to explore its potential. That would be right after i create a new AGI programming language, 4 more GoID tasks, and run for Prime Minister of Canada. But, hey, it’s on the list.

Also interesting in the article is the Minsky Test, a desperately needed replacement for the Turing Test. Basically, the Minsky Test says that if an AGI implementation can read a childrens’ book (assumedly an arbitrary one) and then somehow summarize what happened (obviously, the details need to be worked out a bit), then the implementation is likely at least approaching intelligence. Hopefully Marvin can fill in a few more blanks.

Anticipation

February 1st, 2010

Ok, i’m back. Between reviewing the Ben Goertzel / Cassio Pennachin edited book Artificial General Intelligence, and learning Objective C to write an iPhone app for a client, things have been pretty busy. (Although i must admit that playing the remarkably original games for my new iPod has munched through quite a few hours too, but let’s call that “research”.)

My favourite new topic of fascination these days has been anticipation. In fact, this one goes back over half a year now, but it hasn’t been until lately that i’ve been able to give it the attention i’ve wanted. Last summer i was working on a robotics control system that became the precursor to the Robotic Arm task in GoID. (The intention was that the control system would become a commercial project, but alas, well… you know how it goes.) I was reading about motor systems in Eric Kandel et al’s Principles of Neural Science (4th ed), and got caught up in the diagram on page 656, captioned, “Catching a ball requires feed-forward and feed-back controls”. My head was into how the non-linear systems of shoulder and elbow joints can still produce linear movement of the hand, but i was for a moment completely distracted with how the subject in the diagram learned to anticipate the impact of the ball against her hand. The system i was building was entirely reaction-based: it would assess current conditions – mostly proprioception – and determine the correct output to achieve the known goal. The idea of looking ahead based upon past experience – although i wasn’t so blind as to never had considered it before – made my motor systems approach seem trite. This is why the system ended up as a GoID task instead of a booming business.

I was inspired to write this post today after watching my almost two year old daughter turn the pages of a book. (To anyone interested in AGI, i sincerely declare that there is nothing more educational in the field than raising children.) Only months ago she would flip the page of a cardboard-leafed book only to squeeze her other hand between that page and the remainder of the book. It would take a moment for her to realize the situation and surmise that she needed to get her other hand out of the way. Tonight though, she would initiate the turn of the page and then at precisely the last opportunity let go of the book with her other hand to allow the page to turn completely, and finally grasp the book again. There was no concentration in her eyes besides intently studying what was on the pages. The movement of her hand had successfully transitioned from consciously reasoned reaction to subconscious anticipation. And precise! Out of maybe 20 page turns her hand brushed a page once. Moreover, i’m certain that that single brush resulted in some manner of learning that will make her movements more accurate in the future.

I had already watched some of the videos of robots being produced at places like Willow Garage. Having had big hopes when i started down the robotics road, it was at once depressing and inspiring to see how much others had already achieved. I recall one (although i can’t be certain that it was a Willow Garage project anymore, and for once i’m too apathetic to get Google to bail me out) where the researcher tossed a ball to the robot, and i think once out of 3 or 4 tries the robot caught it. Now, make no mistake, anything even close to a catch is remarkable; actually making a catch is grounds for a prolonged golf clap. But what i couldn’t get over was the clumsiness of the machine. The action of moving it’s arm to put its hand into the trajectory of the ball caused the rest of the robot to convulse so much i thought it would bust a rivet for sure. The only reason it remained standing was because it was held up by suspension wires.

I assumed that this had not gotten past the researchers unnoticed, and so i gave a few minutes to thinking about how to fix it. The answer was anticipation, but the implementation was not nearly as simple. Consider yourself in a snowy field in the middle of a snowball fight. You glace to your right and see an icy yellowish orb headed for your frontal lobe. (For some reason i couldn’t help throwing in a completely gratuitous scene. Oh well. Carrying on…) Let’s say that your response is to block the projectile with your hand, if only because it’s a more interesting anticipation problem than ducking. Interestingly, you’re first movement is not the activation of your triceps to extend your arm. Assuming that your arm’s center of balance was originally somewhere in front of your body, your first movement is rather to twist your hips to the left in order to compensate for the counter force that moving your arm to the right will generate. (You will likely also activate your deltoids to raise your arm, but since this primarily generates a downward force that is absorbed by your skeletal structure, it’s not quite as interesting.) But, twisting your hips itself generates an unbalancing force, so a split second prior to that muscles in your legs activated to counter it. There is a pattern here of counter-actions preceding activation forces that likely has many steps. Remember, too, that stopping your arm at the proper place implies undoing all of the momentum that it created. Upon spying the incoming danger your brain started calculating the exact muscle forces to apply and the precise timings of each application in order for your arm to effectively deflect the thread, but without thwarting your balance. Actually, your brain probably didn’t calculate much. It’s probably done more of a look-up based upon the decades of motion experience with your particular body configuration that it has accumulated. In fact, it probably did some kind of a look-up on the size and shape of that yellowish orb too in order to know how much to unbalance the body toward its trajectory to absorb the impact, however slight. Doing the calculations from scratch would take way too long.

Once again, we see that time is critical to the entire endeavour, not just in saving your frontal lobe, but in coordinating the various muscle activations. It’s true that this could be a case of “fancy programming”, but what is undeniable – i believe – is that the whole behaviour was learned. Two year olds don’t know how to deflect an incoming projectile (as i now intimately know), but 12 year olds do (as i affectionately recall). So, how does this anticipation come about?

It’s difficult to know where to start the study. I would define anticipation as a reaction to a predicted event with the intention of maximizing the outcome in the favour of the agent.Fair enough, you might say, but, 1) how is the event recognized, 2) upon what contextual data is it predicted, and 3) most profoundly, how does it choose an action (which as we see from the example above can only be considered distinct in a high abstracted way)? The abilities that must already exist for something like anticipation to work are extensive. One is forced to assume that, for it work in a biological context it must be simplistic in its base form and achieve complexity in a relational way, say hierarchically.

So that is what i’m going with, at least for the moment. And, as any rational researcher would do, instead of building spatial-temporal pattern recognition and classification, relational memory, and motor action optimization systems, i’m going to assume they all exist in a sufficient way such that anticipation can work.

Multidimensional Lotka-Volterra models

December 29th, 2009

I think it was grade 11 math when i first saw the predator-prey model. I recall that the teacher had called it the “Richardson” equation, which i had associated at the time with the last name of a friend. But when i look it up now, Lord Google insists that it is in fact called the Lotka-Volterra equation, and i’m inclined to concede.

I’ve always had a particular fascination with systems of non-linear equations. These are particularly useful for modeling in Artificial Life projects. But since they are not very practical in the development of AGI, i have to restrain myself from toying with them too much.

About a decade ago, though, i indulged. I remembered that math class, but not the details of the equations. Back then search engines did not so effortless correct my mistakes as they do now, and so my searches for “Richardson” kept coming up dry. Overall, it didn’t bother me too much to try and recreate the concepts on my own; i have a long history of working out mathematics from first principles rather than memorize equations, even during university exams. And it gave me the opportunity to expand the original ideas a bit: instead of just predator-prey, i used predator-prey-plant. Plants would grow at some exponential rate, prey would eat the plants and reproduce, and predators would eat the prey. As in the original, expansion of the “eaters” is constrained by the availability of food, so a cyclical relationship between the species would emerge.

That was the thinking anyway. Something was wrong with my version. I no longer have the original work, but i remember doing it all pretty much in a spreadsheet. The population of each species was simply represented by a number, and the numbers were repeatedly plugged into the equations. In my version no balance was ever achieved, even though i tweaked the constants and coefficients endlessly. Sometimes the numbers would fly off to infinity, sometimes they would dwindle to zero, and other times they would become cyclic but only by regularly dipping into negative values, which was unsightly.

I played with it for an hour or so, and never did go back and correct it. Instead, i got caught up in an idea. What if the problem was not necessarily just the equations? Put another way, could the equations be made to work in a different environment?

Up until that point the equations were effectively zero-dimensional: there was a single integer that represented each species. I wondered what would happen if i expanded the environment to be two-dimensional. The plants would still grow according to the x(a – by) equation, but i would also introduce a process by which some of the growth within a cell would diffuse to neighbouring cells. The predators and prey would similarly “roam” the flat world. (The “world” was represented by a three-dimensional array: two dimensions were the spatial coordinates, and the third was the populations of the species at that cell. A continuous-space model was not attempted.)

Spreadsheets would no longer cut it, especially due to the complexity of the diffusion. Also, i couldn’t visualize the results that way. So i ended up creating a little Java program to experiment with, recreated here as an Applet. The plants are represented as the colour green, prey as blue, and predators as red. Remember that this code uses only a spatial variant of equations that failed utterly in a non-dimensional setting. Now, a distinct and interesting pattern emerges that quickly becomes stable.

I remember this little experiment when i do tests of AGI concepts. The human brain is complex at a galactic level, and so it is necessary to simplify concepts and test them in a reductionist setting. For years and years these tests have succeeded in the limited setting, but have quickly and absolutely failed when tried in any more interesting environment. The point is that we don’t always need to throw the baby out with the bath water. The idea and the approach may not be wrong.

This isn’t to say that Deep Blue would make a good AGI model if only it were refactored into a two-dimensional environment. It wouldn’t. But there are likely a lot of decent AGI approaches that would benefit hugely from the introduction of space and time into their models. Otherwise, we will end up with the problem that i had, but in reverse. We’ll imagine a world in which predators, prey, and plants are wandering Flatland, but then in an effort to simplify we’ll reduce it to zero-dimensions and watch it fail.