Thursday, December 1, 2011

Thanksgiving Delay - Deactivated!

Ok, turkey time is over.  Back to (work) fun.  So much news that it's ridiculous!  On Thanksgiving morning I rose at the crack of dawn, 5:30am and put on my turkey costume (pictures on the way), jumped in the car with my friend Mattie Taylor and her uncle and cousin and headed to downtown Detroit.  My first Turkey Trot, costume and all!  It was PACKED with people!  40,000 was the estimation, mostly smiling faces.  I ran the 5K and had a blast.  I am thoroughly hooked on runs like this.  I would guess that most participants were costumed up in some way, more than not, anyways.

The IMU (inertial measurement unit) and magnetometer (fancy word for compass) showed up the other day.  Holy smokes I cannot wait to use this thing, I will pop it onto the SARA testbed and see how she responds. This is the one that I ended up deciding on - IMU -  very small footprint, microcontroller support ready and good documentation, the guys at Jaycon even want a picture when it's done! Score!  Also, ordered 20 ultrasonic send and receive units to build a sense bubble around the quadcopter for object avoidance.  I need to mix this with the Robotic Vision idea from a previous blog.

I was thinking about  approaches to object avoidance, which led me to trying to determine a formula for said avoidance, when a machine learning idea sprang up.  If you've ever played a video game with a 'ghost car' that you chase in your car and the 'ghost car' is the best path, so far, around a race track, you can understand this.  Also, it is very much related to how an adult animal or human, teaches a newborn, which is what we will start to consider our mechatron as.  (No more use of the word robot here.)  So as a parent I would like to instill into my child a way of acting which would prolong it's life.

In the animal kingdom, this is apparent through basic things like instinct and also observation of the parent.  How do we give a mechatron an 'instinct'?  Moreover how do we give a mechatron free will?  The first question is much easier, the second tangents quickly into the philosophical/psuedoscience/random action direction.  Without exhaustive descriptions here, 'instinct' can be defined as any behavior that is performed without being based upon prior experience, that is, in the absence of learning.

Sea turtles, newly hatched on a beach, will automatically move toward the ocean. A joey climbs into its mother's pouch upon being born.  Honeybees communicate by dancing in the direction of a food source without formal instruction. Other examples include animal fighting, animal courtship behavior, internal escape functions, and building of nests.

Here is a weird one.  In the 6th edition of Campbell and Reece (Biology study guide), a baby bird is kept from flying and receives no "training" as to flight.  When it reaches the maturation age where flight would begin, based on it's natural environment, the bird was released from it's bonds and flew immediately.  How can this be replicated?

I am staring out of the window of my office and hoping to one day see my child mechatron (MT) flying all day long, observing it's world, measuring it's world and resting to recharge it's power source.  Imagination leads me to the conclusion that instinct for an MT would be a combination of things.  If that little bird knew somehow that it's wings could carry it to far off places, does that lead me to write a bit of code for SARA so that she knows simply HOW to fly, not where I want her to fly TO.  Moreover, if that bird doesn't go crashing into everything in sight, does that lead me to write another bit of code that would NOT tell her to stay away from objects, but for her to KNOW that careening into something might 'hurt' her.  What is hurt to an MT?  Is battery acid or hydraulic fluid it's blood?  Can we make those comparisons?  Is it time to?

This all leads to one conclusion.  MT's must have instinct programmed into them, but that parts of that instinctual formula can be 'peppered' with variables.  For example, I write code for SARA that says something like:

if (ultrasonicsensor) 1 to 20 = less than 1 foot from (object)
        then move 1 foot from (object)
else continueprogram

Now, what if SARA had to break through a glass wall and sacrifice her life for another MT?  How do we write the code to help another being?  Let friend be another MT, let captured be a definition of immobile, let self be SARA, let self power be SARA's amount of power to operate (whatever source that is - nuclear, electric, fossil fuel), let friend power be the same source type as SARA, or one that SARA is aware of.  Consider a percentage based system of decision.  Also, each MT can connect to the other and share power /transfer power from one to the other.  Each MT can also carry the other as long as it has more than 50% power, in the event of one being damaged.  An example of such a formula to determine probability of rescue:

friend = fr (can be 0 or 100)
enemy = ey (can be 0 or 100)
captured = c (can be 0 or 100)
SARA = s (can be 0 or 100)
enemy power = eyp (can be 1 to 100)
SARA power = sp (can be 1 to 100)
friend power = fp (can be 1 to 100)
time to live = ttl (can be 1 to s or fr max flight time) for this formula, assume 100% is one hour.
risk to SARA = rts (can be 1 to 100)
risk to friend = rtf (can be 1 to 100)
1 - 33 each could escape
34 to 65 each could escape but will suffer damage
66 to 100 fr will escape and fr could help s if fr has fp > sp and  flfs > 0 (cause any love is worth fighting for)
SARA love for friend = slff
friend love for SARA = flfs
chance of rescuing friend = corf
chance of rescuing SARA = cors
ehff = enemies hate for friend (0 to 100)
ehfs = enemies hate for SARA (0 to 100)
w = SARA good luck bonus (0 to 100)
x = SARA bad luck bonus (0 to 100)
y = enemy good luck bonus (0 to 100)
z = enemy bad luck bonus (0 to 100)

if fr > 0 and c > 0 and sp > ttl and slff > 0
   then (attemptrescue)
else (recharge) and (attemptrescue)
endif

rts = ((w + sp + frp + slff + flfs) - x) - ((eyp + ehff + ehfs + y) - z)

I can see how long this equation is going to be.  We can estimate this is 1% of the information needed to make a decision, probably much less....

Now, if we can use a sensor on board the MT to detect a mechanical failure, let's pretend it's one of the airframes engines operating at a lower percentage, because of an enemies attack.  This sensor would send back to the brain a signal.  We could apply another bit of code, if I was alone and did not have to rescue a friend, SARA would interpret this signal as fear and preserve her life, if she was on a rescue mission, then she would interpret the signal as an attack and could speed up the rescue, as well as suppress her self preservation 'instinct' because another MT's life was at stake.

How oh how will I teach the MT's to love and sacrifice?  AI programmers must all be madmen...

We also need to contact Dr Rachel Armstrong in the UK.  Absolutely brilliant protocell research.  She is programming cells to perform functions that are almost Sci-Fi.  What if we had a sensor that could read the protocells 'state', then feed it some 'data' in the form of a chemical and change it's state?  Biological computer?  If the cell had multiple states, we now have an analog piece of 'living circuitry' that we can assign multiple states to.  Chemical memory?  Protocell memory 'chip' (dish)?  I am convinced that the protocell research that she is leading, can be used to create the 'brain' that an MT will need to become a 'being', no matter how basic that being is.

No comments:

Post a Comment