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.

Leave a Reply