Switchboard

I gave the A.I. a new language. It’s designed as a switchboard/routing system allowing for an unlimited number of additional components to be added to the mind commune:

• Processes: these comprise the I/O subsystems (vision, audition, the spider below, etc.)
• Minds are the A.I.s. They receive, compare and interconnect input, they send actions to processes, and occasionally info to other connected minds
• Displays: offer a library of universal components through which attached minds and processes can display relevant info and output.  For example, the UI that I’ve used below is an example of one such generic display.
Praxis functions as the switchboard for all connected components.  It determines which packets are to be routed where, for whom, and in what order.


The praxis is in the middle. It acts as pipeline control, and is currently serial, though it could easily be threaded.

Each element is identified by a permanent, unique code number (think Semantic Web).  This will allow minds to remember prior relationships, intercorrelated values, and even replace and upgrade one process with another of the same valence (that’s right, the valence of the target in relation to the given mind is built into the interfacing of mind with praxis, and would be defined by the mind during a request).

Robot spider legs, DIY

I was getting exhausted calculating dynamics and statics on the digital spider, and I took a breather this morning to make a spider’s leg (four of these together = spider).  The Box2D spider is coming along, but not fast, so to fill my time I’m .

Siders have the simplest biophysics, so we tend to favor spider models for platform testbeds.


Edit: It’s been three months since my last update, but since Meccano doesn’t do replacement parts, I’ve been stymied – and this is why Meccano will never successfully compete with Lego.  As for the part itself, I need this:

Part A212 connector

I need 30 of these, they cost 40 cents.  I found three retailers who failed to satisfy my Meccano needs.

Why can’t blindfolded people walk in a straight line? Turns out, math.

I found a study from about 2 years ago, and it addressed a question that perplexed scientists since about the 1920s. Q.I. recently revived the study and brought it to my attention. It addressed the following question: When blindfolded, it seems people can’t walk in a straight line for any considerable distance. Why does this happen?  I have my answer, it’s simple, and a simulation below will illustrate its mathematical soundness.

When someone is told to walk blindfolded in a straight line, they will try their best to stay on course. But as your subject takes his next step, there will be minor errors/deviations, caused by the unevenness of terrain, random muscle fluctuations, nervousness at walking blindfolded, etc.  Hence at any given time, the range of possible next steps is represented by a wedge:

It is important to note here that any minor rotation will be cumulative (i.e. if he rotates even 1 degree to the right, 1 degree to the right becomes his new ‘straight ahead’).  The assumption in such cases is that deviations to the left or right will tend to balance each other out.  Mathematically, however, that scenario would be highly improbable.

There are a range of possible outcome paths, from walking in a circle to the extreme left, to walking in a similar circle on the extreme right.  (These cases would result if you always keep to the left or the right, respectively, of the above wedge):

 

The line in the middle indicates the intended straight line.  However, when you consider this straight line as a proportion of all possible random paths (as represented by the yellow arc), it’s a very small proportion, and hence its probability is also very small.  Even with very small errors/deviations, their cumulative effect would, over a distance, be substantial.

I made a Java simulation with the variables “maximum angle of variation”, and “number of steps taken”, which, when run many times, demonstrates the same behavior exhibited by the subjects in the study, without the need to consider handedness, evolution, or other psychological factors.  Here are a few samples of output.  Compare them to the blue and black paths in the original study (the yellow and red are not blindfolded).

Note the similarity of the paths. At any given point in the walk, the probability that your subsequent journey will average out to a straight line is small, and gets smaller the longer you walk.  Without correcting yourself from time to time, the vestibular (balance) sense is not accurate enough to tell you that you are rotating, and so you are lead in circles, not by physiology, but by chance.

Cross-sensory adaptation

For about three years now I’d had been dedicated to a private project (codenamed project Blindsight).  It’s purpose was to use electronics to help blind people to see in 3D.  So I recently got in contact with the CNIB; I mean, if anyone would be interested in funding the project, it would be them.  They asked me to submit an abstract. This is what I wrote up:


3D navigation using CCD cameras and mini solenoids

Navigating through one’s environment is a crucial function of vision and its loss is a significant impairment.  Much of the resources spent to aid those with vision loss are directed towards compensating for this difficulty; for instance, the use of white canes or guide dogs.  The solution I propose, employing the use of CCD cameras, would significantly reduce costs, increase navigational efficiency, and overcome many of the shortcomings of contemporary solutions.

Two small cameras placed on the frame of a pair of glasses, combined with a fisheye lens, would gather images of the surrounding world, and, through a sophisticated hue and tone comparison algorithm, form a three-dimensional protrusion image of the objects immediately in front of the user.  This protrusion map would provide a representation of the distances to these objects.  The information would then be conveyed to a 2D array of mini actuators placed on the user’s back, the closer points in the visual field being denoted by stronger pressure.

Individuals using these glasses would quickly adapt to use this information for navigation.  The neuroplasticity of human perception would enable this information to be ultimately integrated into day-to-day navigation around obstacles, in both open and enclosed spaces.


Edit: so it turns out a company called Tyflos has been working on something similar.  Their’s is not yet complete, but to be honest, I have no chance of competing with their million dollar budget. Oh, well.  It’s a shame really, I spent a lot of time working on software to turn stereo vision into 3D.

Arachnophobia (part2)

The simulation seems to be going OK, I guess, except that every so often the spider gets catapulted into the air. 


Edit: Solving a four-chain Inverse Kinematics (IK) problem is proving tricky, so I turned to Box2D, an open source 2D physics simulation library. It can’t do IK, but I don’t need it to. On the plus side, it’s allowed me to add rocks and other physics obstacles.

They were bound to take over sooner or later

I figured I had some time while the spider was training, so I put together this robotic arm.  The actuators are actually repurposed bicycle wires, and the rest is Meccano (trademark).  Sometimes I think it’s going to try to kill me in the middle of the night.

Close up of the hand

Arachnophobia

I’m developing a new simulation framework in order to create a simplistic spider-like creature (I started off calling it a ‘virus’ since the original design of the creature reminded me of the spindly legs on an RNA virus). 
This program generates a randomized terrain with dynamic rocks strewn along its surface, along which the spider can walk. 
It then took a foray through some obscure trigonometry trying to get the physics of the whole system to work.  The A.I. itself gets plugged into the backend input/output of the spider’s processor, and the switchboard class cordinates the A.I. with the needs of the spider creature.  Finally, all that’s needed now is to apply a simple spur to “motivate” it to scootch on over to the right, and through unsupervised conditioning it learns to take its first steps.

Symbols in the picture: The red/blue squares on the left hand side are how the spider sees the terrain around him (at two different degrees of resolution).  This is in fact the only way the spider can see.  It can feel the position of its limbs (proprioception), contact of its feet and limbs, and stress if its been putting too much effort (seen in the blue guage on the left). In all ways that it can be constrained, kinematically and dynamically, it has been: it can’t cross the ground, falls when unsupported and has restrictions on its own motion. 

So wsh him all the best, he’s going to need to to get across the terrain.

(If this works, it’s spider-fighting time)

Consciousness as a computer simulation

While listening to a favorite podcast recently, I heard an esoteric thought experiment vis intelligent design.  It seemed interesting at the time. The man said that if we were all part of a giant computer simulation, then our reality and all that we know could be called “intelligently designed”

It also quickly occurred to me that it was not quite right – I couldn’t assent that the two things were connected.  Accepting, for a second, his futuristic hypothetical, (i.e. that we were living our lives entirely within a simulation), I still couldn’t say that our reality was any more “designed” than normal.  Here’s why:

Read more…

Computer vision

Visual attention is more involved than one might think.  Some stimuli capture our interest, for tangled reasons, and others crawl under the line.  I tried to capture this tug of war in algorithms that were aimed at processing visual images (from a Webcam, as shown in the bottom frame in the screencap).

A few restarts later:

The mask was from a Halloween costume I made a few years ago.

Brightness and contrast (the typical troops in the computer vision engineer’s arsenal), and color saturation just didn’t cut it. It took me a few tries to get to where it recognized the mask and erased the background.  My last algorithm, which combined all together with a magic ingredient (change) seemed an improvement.  (The blue dot in the upper right frame indicates the center of focus).

Given any array of colored pixels as input, the algorithm would work.  Hopefully the robot (in the background) will one day be able to see through the same capacity that is perceiving it now.

Self-calibration

The A.I. is a well balanced machine. Inside there are many moving “parts”, and some of these are linked to arbitrarily set values and thresholds (i.e. how long before one input turns should the arrival of another one be deemed ‘coincident’, or how many inputs is the maximum, thus defining the cutoff threshold strength at any given time). Unfortunately, there are 16 such state variables

This is where feedback and control theory arrive to save the day. I created a Java class that puts a series of test cases and then guesses at the possible values of the state variables. There are then a set of benchmark outputs that it evaluates (the coloured lines on the graphs). Failure in these benchmarks is just an absolute numerical difference between the expected arrival time and the actual arrival time, over many samples. This is what the graph shows, (and this is why the axes aren’t really labeled).

This graph represents a sweep for one variable (Scatter), from values 10 -> 100.

Now the change in one state variable is correlated with each of the output metrics. Where a certain numerical value for a variable seems to consistently correlate with a failure of one of the outputs, a simple equation disincentivizes that value. The brightness of the green lines (below) shows the weighted overall preferred value for that variable. The red line shows the current best value, and the blue shows the sweep: all other variables are held constant at the red and one variable is swept.

Each of the red entries represents a state variable. There are additional variables that also need to be calibrated, but they are not arbitrary, but connected to the red ones. In this screenshot, "Ext Duration variation" is being swept.

(Also, the calibration is always weighted to get the failing ones up, also known as “the squeeky wheel gets the grease”).

Walking on electrons

I finally hooked up the leg to the servos I just bought, but the power source is a little meager.  To be fair, these servos are monsters (S777 at the bottom left of the picture has 42 kg-cm of torque).  This current source just sputtered. But that’s easily fixed once I get back to the charlatans at Active Surplus.

The legs always need the strongest servos in order to carry the weight of the robot. Just compare the muscles in your own leg to those in your arms.

Andy so far

This is Andy in his incomplete state.  So far it has taken a lot of effort to get it here; and I hope I’ll be putting that work up on mycardboarddreams soon.

Andy

This is Andy in a semi complete state (less one ear)

A Retrospective

This is a collection of all the videos I captured while making Andy.

Cardboard has been a perfect building material: it’s cheap, freely available, durable, lightweight, and easily reshaped and joined.

Robot shop CS

So…  my servos won’t be coming in for another few weeks. The first order didn’t go through, but no one bothered to email me for a month.

I’m not bitter, why would you say that?

Dissassemble/reassemble

It’s kinda sad to see him in peaces like this.

(hmm…’he’. Robo-gender is a confusing topic.)

So I’ve been programming the last three weeks, trying to get the A.I. control up to snuff.  It’s taken all my time, and I haven’t been able to work on the robot itself.  Which is a shame, cause that’s the part I enjoy the most.

An interface for a burgeoning brain

I finally programmed a UI (interface) for the A.I.  It’s general enough to allow for easy plugging in of any compatible input-output source.  It also has a flexible-purpose display (you can see it below). The first project I’m going to undertake is going to be machine vision.

The red dot in the centre is the "point of highest contrast", the natural focal point, similar to what our eyes use.

Vision

Vision is a slippery thing. We take a lot of it for granted, but the reality your brain represents diverges drastically from the reality a camera or a computer takes in.  Translating from the one to the other depended on some amount of intuition, figuring out how I “see” the world as opposed to what “it” really is.  The first few tries (see Back Issues #1 below) were primarily occupied with getting primary colors out of the scene, and adjusting for a color-biased image.  This is the standard starting point normally used for visual interpretation.

Turns out that didn’t really work.  I found it was best to keep colors as strong as they initially are, but use a more intuitive selection procedure, one which only selects the most interesting aspects of the world, and adjust around those.  This plus some color-correction feedback loops leads to the much-needed triage needed for a resource-limited A.I.

Ghoster coaster (well, kinda)

This is video of a small track+pulley+gears that I made for a friend’s class, which she asked to inspire the kids to make their own machines for the science fair.

I had to do it over a few days, so I didn’t have time to work out all the kinks, but it got the kids fired up which the original point.

Warhol’s “random internet man”

Our ability to see is probably the most important sense we have for formulating an idea of the world around us, so a large part of getting an A.I. to work is enabling it to analyze visual information for color, shape and ultimately meaning.  I was working on a program in Java to do it, and, boy, did it take some rewrites.  Here’s about one third of the test trials:

Parsing an image for primary and secondary colors, and contrast. The man in the picture is not me.

Ultimately, the Java code will be translated into C, and run on an embedded system.

Vitruvian Bot

The blueprints.  I think these are self explanatory.

All measurements in metric. Final weight: 2kg (but without servos). Not bad for a 2+ meter behemoth.

Gorillas walk amoung us

This is active surplus.  It is as close to “one man’s junk, another man’s treasure” as Toronto gets.  I head there this morning to find parts.

Active Surplus

Doesn’t look like much from the outside

… The guy “accidentally” shortchanged me.  I wouldn’t normally mind, if it wasn’t for the fact that I can remember him “accidentally” shortchanging me the last time I was there. Well, that’s what you get with a monopoly. Nice selection though :)

Inside AS

Five rows of this


Edit: My gf verified that, yes, the last time they had “accidentally” shortchanged me, it wasn’t a fabricated memory.