Tuesday, December 20, 2011

More eNa and Mechatron Threat Modeling

So we take SARA and put a handful of different kinds of sensors on her.  Get all of that data streaming successfully back to a mega-database and get her ready to fly.  I can now use the manual control system and fly her around our test ground (the laboratory parking lot at night) and 'instinct imprint' a memory of a successful flight (not crashing).  Please note: this imprint is NOT the teaching phase that momma bear will be doing (I guess that I am momma bear).  This InsImp is simply an eNa 'chain' in the MT and with a similar airframe, the InsImp can be reused.  Next we fly SARA again but we knock it out of the air with something like a frisbee.  Using analytical computation we can '3dimensionalize' the frisbee and make it a little larger, like the size of an attacking bird or we can make it smaller, like the size of a bullet.  We can create multiple InsImp models and fill our object database.

Now that we have some instinct in our MT eNa chain and a few models of objects, how do we 'teach' it something?  In what way can we get our bear cub to explore a bit?  Let's define exploring as an act of data collection until pain is received, when pain is removed exploration can continue.  This is a very basic breakdown of a complicated system that happens throughout the natural world.  Does a human baby have curiosity as an instinct?  Putting things in it's mouth, staring intently at interesting objects or people making faces, interacting with it's environment.  If it is not in pain (physical, hunger, emotional) then it is exploring, having fun.  It is exploring because it CAN.  So we can say that a child has a natural instinct to explore, in general and throughout human existence this is a fact.

The child does not know that the Golden Eagle is hunting it, but the momma bear knows.  Does the bear cub need to be attacked to know that it is in danger?  Learning or being taught about danger or pain is a large part of a child's growth.  We teach children to protect themselves if we cannot.  We teach children that the stove will burn their hand, we do not place the hand on the stove to demonstrate.  In the case of the MT, 'parents' have an advantage.  We have the opportunity to transfer data to SARA and basically 'teach' her what things are painful and that they should be avoided, if possible.  Creating a concise 'Dangerous Situation Table' is required.  Granted all terrible situations cannot be programmed, that is a variable.  However, with enough DST data and fast enough processing, SARA should be able to look at the DST information and formulate a percentage based answer to the question "will this activity threaten me?".

With a threat model running on SARA's processor, data streaming to her in the form of DST information, model object availability and many sensors watching her surroundings, can we now place an InsImp in her chain that simply says to avoid death and collect sensor data?  Combine that with a chain that allows her to boost or diminish her flight speed and also her distance to stationary or moving objects.

The real leap will be when she flies as fast and as close to danger as SHE sees fit or the way she will fly just as slowly as she can, because her cameras are pointed at that perfect burning sunset and she can feel it's rays charging her batteries through the solar array that is part of her airframe's skin.

http://phys.org/news/2016-04-humans-supercomputer.html

eNa

When you play Need For Speed on Playstation, there exists a mode of play in the game in which you, the player, chase a 'ghost car' around the track.  The ghost car is driving an optimal path around the circuit.  Your objective is to mirror the ghost car and learn the best 'line' through that level.  Let me draw a comparison to a momma bear and a cub and tie it all into Mechatron AI.

'Teaching' a mechanical being is the stuff of science fiction, right?  What is teaching, in the context of a mess of sensors, wires, microcontrollers running programs?  In the same vein, what is learning?  I have observed in the world of Artificial Intelligence a trend.  The trend being numerous attempts to 'create' an AI personality.  If we've learned our lessons from Wargames, then we know this being must be taught, it is only a child to the world.

A momma bear must teach her cub how to hunt, defend herself, how to avoid dangers of life in a forest, etc.  Building the bear cub's mind within a digital world is our first step into Mechatron AI.  What we need to develop is a blank slate that is capable of learning, but the lessons need to be taught or programmed.  I hate to use the word programmed though.  I feel it takes the life out of the experiment.  Let's coin a phrase.  What would be the best description to describe an MT receiving a set of instructions, in which it gets to decide the 'best' course of action, as IT sees fit?  Free Will Code....  Will Free Code....  Will Code For Food...wait....

eNa

YES.  Electronic DNA.

So what is eNa?  You tell me.  Ok, eNa is the 'helper' code that is 'soul transferred' to the MT.  No more Uploads or Downloads, those are for inanimate objects!  More soon.

Tuesday, December 13, 2011

Crazy frickin day

I met a great guy today. Professor of Operations Research, Dimitris Bertsimas at MIT.  At lunch he had some advice relating to a few projects that we are working on.  Hopefully he will be able to analyze a ton of data that we present to him and see things in new and exciting ways.  A few of his papers are very relevant to our work, especially this one:

Computational Approaches to Stochastic Vehicle Routing Problems
Dimitris Bertsimas
Philippe Chervit
Michael Peterson
April 18, 1991

Tons of information and useful equations that I can use for Mechatron interactions with each other.

Then, in the afternoon, I was paid a visit by this maniac - Dewayne Hendricks.  He's in the Detroit area after being out west for years.  We talked some shop, I showed off Makerbot #3630 and a few things that are in the pipeline.  He showed me something called the 4 quadrant model.



It's useful, but I like to let the business people do the business stuff and I like to do the technical nerd stuff.  Which leads to my first episode of NextMechTechTalk!  My first real broadcast and I will be talking about a concept we'll call 'Mechatron soul mapping'.  WHAT?  Tune in soon, all episodes will be posted to the YouTube site if you miss them or are not in the Eastern time zone.  Tootaloo.  

Yeah, I just said that.

Saturday, December 10, 2011

(My) Scientific Method

Dr Rachel Armstrong posed a question recently on her facebook and asked scientists to describe their 'Scientific Method'.  Before I begin with my description of the process, I have to provide a history of experiences that shape my method.  In no particular order, these are the memories of my life that somehow contribute to the way I research a problem:

Laughing my head off as my mother makes popcorn in the kitchen with no lid on the pot with popcorn flying all over the place.

The smell of electric motors from a slot car track.

Building a pond in the basement of my parents house when I am in grade school, so I can test my toy boats, only to have it spring a leak from a misplaced propeller and flood the basement and I mean FLOOD!

Trying to pet the fish in my aquarium.

Throwing rocks at the neighbors bee hive, riling them up and getting said neighbor stung.

Sitting in the neighbors cherry tree every summer and enjoying fresh fruit.

Catching baby crayfish from the pond by the handful with Regina Williams.

Catching tadpoles from the pond by the handful with Regina Williams.

Finding 100 dead tadpoles in the bucket the next day and 1 very alive Dragonfly Nymph.

Building something made of legos, turning around and finding my center desk drawer on fire.

Making 'potions' with poisonous berries.

Cutting open a cocoon, taping it back together with cellophane and finding a massively deformed giant winged dead moth in the jar a few days later.

Stringing up a shortwave radio antennae in the attic and sweating instantly from the summer heat that accumulated there.

Listening to my shortwave radio while I take my toys apart, Radio Moscow - Science Hour - 1984.

Building and launching model rockets, then in years later seeing my daughters face when hers first flew and seeing the amazement from another point of view.

Eating my farmer neighbors peppermint leaves all summer.

Watching 4 cats chase each other, in comical and cartoon style order.

Knowing exactly when and where I was when I held my first solar panel.

Sleeping on my Irish Setter, Rusty, in the summer sun, dreaming about what it's like to be a bird.

Falling down the basement stairs with an armful of nuts and bolts.

Smelling each and every circuit board that I have ever taken out of a piece of equipment.

Remembering the day Columbia exploded.  I was eating mac and cheese and like most other launches, I was 'too sick for school', so that I could stay home and watch the launch.

All of these experiences and many more that I cannot forget contribute to my work.  When I look back on a life of curiosity and discovery, I smile.  My heart is still that little boy, taking apart everything in the house and putting it back together before my parents realize that I was toying with it.

For me, personally, Scientific Method is a romantic process.  I say this because most projects that I work on are first only ideas, they exist in the ether of my or another beings mind.  From the imagination they are transported to notebook, excel chart, whiteboard or an email thread.  Participating in the project from conception to production of a tangible device is a gift.

Up until one year ago, a large part of my life (+10 years) has been spent building computer communication networks.  Theses strange worlds exist through the power of electricity and miles of cable.  Even now, as you read this message, electrons are moving across thousands of miles in an instant, delivering it to you.  Amazing.  Fantastic even.  To describe the manner that this technology works in 15th century Europe would have had a man branded insane.  As amazing as this invisible world is, I needed to get back to my experimentation roots, the hands-on life that most of us have as a child. For the past year and a half I have had the opportunity of doing just that.  I found the freedom to work on any project that I chose to become a part of.  I chose a path that would combine network systems, circuit board design, analytical thinking, hands-on play and finally troubleshooting of the solution.

With that project nearing completion, my time is focused on what I know will become my life's work:  Love and Sacrifice equations for mechatronic beings.  Holy Hannah, how do I apply Scientific Method to this weirdness?  Personally, I see at least two parts to the method.

One side has the following standard points:

Define a question

Gather information and resources (observe)

Form an explanatory hypothesis

Test the hypothesis by performing an experiment and collecting data in a reproducible manner

Analyze the data

Interpret the data and draw conclusions that serve as a starting point for new hypothesis

Publish results

Retest

The other side has emotional points:

How will my findings effect this generation?

How will my findings effect the next generation?

Will my research be used to help or hurt our existence?

Is this the best use of my time?

How much of this is art and if any of it is, what places does my psyche need to visit in order to tap into the universal energy that is guiding my path of learning and knowledge?

Seeing science, technology and art coincide and being at the center of it, do I acknowledge the possibility that a (god) single 'creator' or group of 'creators' exist, if yes, how do I honor her, him, it, them, when I find success in life as I define it?

Will I find a lover who realizes on one hand the time and energy that must be dedicated to my pursuit, on the other hand how very important her partnership means to me?

Finally, out of the myriad of theories and ideas floating around the world, can mine traverse secular ground and find it's way out of the mundane commercial environment and live in a place of respect within the scientific community?

Thats all for now, thank you Rachel for tossing that question to the world.  Anyone seriously answering will have a nice chance for introspection.  Cheers!

Wednesday, December 7, 2011

The other day, THIS arrived! HC-SR04 Ultrasonic Sensors

Ordered 5 of these a while back.  Bingo.  16.4' range, ultrasonic distance.  I need one more I think, for above SARA, it's fine.  One in each direction for now, N-S-E-W,  one pointing down.  Mixed with altitude from GPS and Barometric Pressure Sensor.  Good enough for now.  She's getting there...

AND Barometric Pressure

Yeah, barometric pressure arrived today as well :)

SiRFstar IIIx - In the hizzy

How much do I love Hong Kong?  Lots.  Received the SiRFstar IIIx GPS unit.

9600bps TTL Data Level Out

Cool specs:

Receiver type L1 frequency , C/A Code, 12-Channel

Max up-date rate 1Hz

Accuraccy(SA off) Position < 10M 2DRMS

Sensitivity -153dBm(using SiRFXtrac)

Operational Limits Altitude < 18,000m(60,000ft) - velocity < 515m/s(1,000knots)

Time To First Fix(TTFF)

a) Cold start 60sec(typical)

In Cold start scenario, the receiver has no knowledge on last position, approximate time or satellite constellation. The receiver starts to search for signals blindly. Cold start time is the longest startup time for NSA-C3M-NV.

b) Warm start 38sec(typical)

In Warm Start scenario, the receiver knows(due to a backup battery) his last position, approximate time and almanac. Thanks to this it can quickly acquire satellites and get a position fix faster than in cold start mode.

c) Hot Start < 8sec(typical)

In Hot Start scenario, the receiver was off for less than 2 hours. It uses its last Ephemeris data to calculate a position fix.

Re-acquisition Time 3sec. typical (within 5sec. Block out) 8sec. typical (within 120sec. Block out)

Protocol NMEA 0183 (Default) activated message : GLL, GGA, RMC, VTG, GSV, GSA
all with checksum enabled

SiRF Binary

Size 35.8mm(±0.2mm) x 35.8mm(±0.2mm) x 7.7mm(±0.2mm) - Except for Projection of GPS Patch Antenna(Max 0.8mm)

Weight 20g(±1g)

Sunday, December 4, 2011

A Tear In My Eye

I heard a voice in my head describing the way that sugar would be used to grow buildings across an empty landscape in the future.  I saw the white substance grow from nothing on a meadow into a blob into a building.  I stared at the structure, one of it's rising walls ending on the ground a few feet from the edge of a cliff.  Suddenly I was hanging from that cliff and behind me, below me, was 1000 feet of nothing to the ground.  I looked back over my shoulder and then back to the meadow, the building was gone and I was hanging over the cliff still.  Far ahead of me across this green meadow is a mansion that needs repair.  I am climbing slowly up and over the edge of the cliff, toward the mansion, thinking that rock climbing is easy, once you trust yourself.  I look to my right and see what looks like the bars of a zoo.  Behind the bars, a lion with green fur and a saddle, chasing a bird around it's pen.  A tiger with lizard skin is chasing them both.  I climb over the edge of the cliff and walk toward the mansion.  When I set foot into the meadow it is abuzz with honey bees and I am most certainly not welcome.  I can feel them bouncing off my back, close to my shoulders.  I run toward the mansion now, aiming for a set of double glass doors.  I zig zag a bit and try to throw them off.  After running through and slamming the doors, they are gone from behind me.

 I take another step into a giant room, it's floor covered in the same meadow, it's meadow covered with the same honey bees.  They fly toward and consume me.  I can feel their sting as I tumble forward into black.

When I open my eyes I am only an observer now.  I am watching two sides of a trailer park arguing over something.  The hate in the faces of each side is very apparent.  The time period looks to be the 1950's, but everything is in color, not black and white.  A young woman is among one side of people, she seems to be neutral, a daughter of an arguing man.  He has a beard like a viking and a flannel shirt.  She turns and walks away from the crowd, walking down a street away from the neighborhood.  I can hear the arguing voices like a rumbling sound, no specific words, only that sound.  It is broken by the noise of screeching tires and a scream.  The voices cease.  Now I see flashes in the dark of mens faces.  Grimy with sweat and dirt, their eyes wide open in terror.  Things go black.

I open my eyes again and it is dawn.  A light fog is in the air.  It probably smells like autumn.  I am standing in a muddy field, my feet feel heavy.  In front of me is a semi-truck, I can see the back of it and most of it's left hand side, it is facing away from me.  To my left is a woman with a rifle and a shooting cap.  To my right a number of men with orange hunting caps and camo jackets with jeans.  They are carrying shotguns, broken on their arms for safety.  I realize this is not a posse', it is a funeral procession.  In front of the semi on the ground I can see a person laying there, only their jeans and shoes are visible, the rest of the body is under the front of the semi.  There is an Irish Setter next to a man with a shotgun, the girl's father that I saw at the trailer park.  Her legs are twitching.  With a tear in his eye he flips the butt of the gun upward to snap the barrel shut, points the gun down to where I cannot see it and he pulls the trigger.  The sound of the shotgun wakes me from sleep. It was only a dream, I wipe the tear from my eye.

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.