[ Home ]

Copyright 2008, Harold L. Reed
[top][Feet][Knees][Hips][Torso][Shoulders]
[Elbows][Wrist][Fingers][Neck][Head][Balance][Ears]
  [Eyes][Emotions][Bottom]


Animachines go across disciplines, so here I will make a general purpose, human sized animachine that we can all study and add to.

The purpose here is to build the equations for a man sized model animachine. I will follow the structure of a human being, but will simplify when possible. Where humans may have millions of sensors, I can get by with one or two. Our replica will be crude and lumpy, but it should function like the original as a good model should.

For power, I will assume a fuel cell. The animachine should drink gasoline, LPG, or alcohol. That means it must breathe, exhale, drink and pee.

There will be many variables, so I need some order here. The big body parts provide a division. I need a fixed viewpoint for left and right and front and back, since we are somewhat symmetrical. Our viewpoint is from the animachine’s perspective. Looking over the animachine head, in the direction of the eyes, Left is left, front is front.

The main objects and actions are:

Key Objects        Actions ______

He Head            Holds eyes, ears, nose, mouth and brain
er Ears (LR)       Sound levels, frequency
ey eyes(LR)        light levels, objects
no nose            inhales, exhales
mo mouth           exhales, makes sound, drinks
Ne Neck            turns head
Sh Shoulders(LR)   holds neck and arms
Ar Arms(LR)        hinges at shoulder
el elbows(LR)      bend
wr wrists(LR)      bend
ha hands(LR)       clasp
fi fingers(5 LR)   bend
To Torso           holds shoulders, hips and power
hi hips(LR)        hold legs
le legs(LR)        hinges at hip
kn knees(LR)       bend
an ankles(LR)      bend
fe feet(LR)        support

Variables will be prefixed with the symbol for the structure. If I make other structures inside, I will use the structure prefix and a minor structure prefix. L or R indicating left or right will follow that. F and B will represent front and back.

Types of physical sensors are:

Symbol   Sensor type
L        Light (Light intensity)
S        Sound (In air)
P        Pressure (sound in other media)
T        Temperature

Types of physical motors are:

Symbol   Motor type
R        Motor producing rotating motion
B        Motor producing bending motion
S        Motor producing sound
P        Pumps
V        Valves

For intermediate data streams, I will use the symbol M with a column, row suffix.

These equations are written in sequence, but I say again, to remember that all these equations are active all the time, so the order in which they are written is meaningless. And remember that these equations represent hardware. The variables are cables and the operators are HalNodes.

Since there is a lot of comment here along with the actual animachine equations, the equations alone will be in bold text.

I start at the bottom, doing the easy parts first. The first thing to do is to set up the motors. Then I go back and set up all the sensors. Then I add brain and improvements. I must learn for our animachine, but that I can do easily. It can't reproduce either, but I can build it. Animachine design is an iterative process that is very much like designing a computer program but much easier. There is no sequence to worry about. Every function can be worked on by a separate crew. The equations will outlive the animachine and go toward making the next. Evolution here works by standardization and communication. (Mistakes that work will change the code for the next animachine.)

Like a computer program, I write the code, which relates the variables to the actions, and then I assemble the HalNodes and cables to build the animachine. Assembly is done in several steps and can be done for each function/motor separately.

1. Gather the HalNodes and place them in the animachine or layout.

2. Count the plugs for each cable variable.

3. Assemble the cables by placing the plugs on them to match HalNode sockets for each function. Provide an extra plug for power on each motor variable.

Since BigAl is a large project, tree notation is used, so intermediate variables are not always shown.

Feet


(Left and right feet are mirror images. I do the left one and copy for the right one.)

Foot is hinged at the ankle. The normal angle is about 90 degrees and the travel is about 10 degrees plus or minus. The rotation is counter clockwise looking from the right side. The instruction to bend comes from down the leg and from the foot. It hurts to bend too far. The motor that produces the ankle bend can be some kind of servo, where the bend data stream produces an angle change. It is in the actual process of building this animachine that such things need to be considered. The brain design indicates what is needed. Engineering provides the how to do it. In a few years we can just go buy these parts and throw them together with our own brain.

I need some sensors in the foot. Lets put a couple of pressure sensors fore and aft on the bottom.

fePLF and fePLB are the pressure data streams going up the leg.

feBendL is the data stream coming down the leg.
fePT is the pain threshold, coming down the leg.
fePainL is the pain data stream going up the leg.

feBendingL = feDoBendL – feNoBendL
feDoBendL = stepR o fePainlL o fePLF
feNoBendL = stepL o fePainhL o fePLB
; pain collection
fePainhL = feBendingL if isgt(feLimith
)
fePainlL = feBendingL if islt(feLimitl)
feLdone = done(feBendingL)
wasbendingfeL = was(feBendingL)

feet and ankle have 3 sensors and 1 motor.

For the right foot and ankle do the same but rename the variables.

feBendingR = feDoBendR - feNoBendR
feDoBendR = stepL o fePRF o fePainRl
feNoBendR = stepR o fePRB o fePainR
fePainhR = feBendingR if isgt(feLimith)
fePainlR = feBendingR if islt(feLimitl)
feRDone = done(feBendingR)
wasbendingfeR = was(feBendingR)

Figure 1 Ankle motor

Knees


Symbol kn.

Knees bend. Resting angle is about 0. Bend max is about -270 degrees. There are two knees, left and right and they are symmetrical. The rotation is clockwise from the right side.

Left knee:
knBendingL = knBend - knNoBendL
knBendL = d(hiBendingL) o Sit o knPainlL
knNoBendL = Stand o knPainhL
; pain collection tree
knPainhL = knBending if isgt(knLimith)
knPainlL = knBending if islt(knLimitl)
knLdone = done(knBendingL)
wasknbendingL = was(knBendingL)

Right knee:
knBendingR = knBendR - knNoBendR
knBendR = d(hiBendingR) o Sit o knPainlR
knNoBendR = Stand o knPainR o default
; Pain collection tree
knPainhR = knBendingR if isgt(knLimith)
knPainlR = knBendingR if islt(knLimitl)
knRdone = done(knBendingR)
wasknbendingR = was(knBendingR)

Hips

Symbol hi.

Two hips, left and right. Hinge angle is 0 degrees to 270. The rotation is counter clockwise looking from the right side.

Left hip:
hiBendingL = hiBendL - hiNobendL
hiBendL = stepL o Sit o hiPainlL
hiNobendL = stepR o Stand o hiPainL
hiPainhL = hiBendingL if isgt(hiLimith)
hiPainlL = hiBendingL if islt(hiLimitl)
hiLdone = done(hiBendingL)
washibendingL = was(hiBendingL)

Right hip:
hiBendingR = hiBendR - hinotbendR
hiBendR = stepR o Sit o hiPainlR
hinotbendR = stepL o Stand o hiPainR
hiPainhR = hiBendingR if isgt(PainThresholdh)
hiPainlR = hiBendingR if islt(PainThresholdl)
hiRdone = done(hiBendingR)
washibendingR = was(hiBendingR)

I am attaching some pressure or touch sensors to each hip back so Big Al can tell when it is sitting.

hiPL and hiPR
dhiP = hiPL – hiPR
; difference in pressure
hiP = hiPL + hiPR

Sitting and Standing

sitting = sit – nosit
sit = IsStanding
;{have place to sit}
nosit = hiPain
sat = done(sitting) o was(sitting)
IsSitting = hiP

Sit and stand are opposites. When sitting knees are bent, hips are bent, ankles are straight. To sit, both knees bend and both hips bend. To stand, both knees unbend and both hips unbend. Ankles keep flat. Of course you cannot sit unless you are standing and you cannot stand unless you are sitting.

standing = stand – nostand
stand = IsSitting
;{all the things needing standing}
nostand = knPain
stood = done(standing) o was(standing)

Walking

walking = walk – nowalk ; When to walk
walk = stood + {All the things causing walk}
nowalk = Peeing o Drinking o AnyPain
walked = done(walking) o was(walking)

step left

L R
1.hip bends, 1.ankle bends
2.knee bends, 2.hip unbends
3.ankle unbends 3.knee unbends
4.knee unbends
Step functions

stepL = walking if done(IsSteppingR) - dir
stepR = walking if done(IsSteppingL) + dir

Change +,- dir to change direction to suite. + is to the right here and – is to the left.

Torso

Torso is the structure that holds the hips and shoulders. In our model, it will contain the fuel cell. It will need to contain fuel, methane or whatever, and water. It will need to input and hold air for the oxygen.

(Fuel cell is: 2e = 2H + O; Strip the electron off two hydrogen atoms, introduce an oxygen molecule and you produce water and have two electrons for the electricity.)

It will need a bladder of some sort to hold the water. It may need a pump from the fuel cell. I doubt that it can work under pressure. It will need a tube from the water bladder to empty it occasionally. It will need a valve on that tube. It will need a pressure sensor to indicate how the fullness of the bladder. Since these functions are singular, I can leave off prefix names. I do have two bladders, water and fuel.

Water pressure sensor is WaterPressure

Peeing = WaterPressure > Don’tPee ; Valve is on or off.
Don'tPee = fePainL o fePainR o Drinking o walk; Add other inhibitors as needed.

Don’tPee is the tree of all inhibitors. I can define these later and add or take away functions at will. The point is that I can establish a goal and an anti goal without knowing at this time what they are. I have also used functions that will be defined later in this program.

The fuel bladder is almost the opposite of the water bladder.  Now I have a tube/funnel input mechanism so the animachine can drink. Again, I measure pressure on the bladder.  The need for fuel is felt by low pressure in the fuel bladder.

The motor here is a valve and pump. The goal is to drink.

Drinking = drink - FuelPressure ; Drink until full. It can drink whenever it has something to drink.

The fuel is fed to a preprocessor that strips off the hydrogen, leaving us with carbon dioxide and other junk.

I need a pump to exhaust this into the air. This is part of breathing, but I will not control it now. I will simply pump it out all the time. Our animachine may have bad breath.

I need a pump to put air into another bladder, toA .

Breathing = breathe - toAP ; breathe until full.                                
; breathe could be constant

Now I have power for everything. Remember that data stream cables also carry the power for the HalNodes, motors and sensors.

Shoulders

Shoulders carry the neck and the arms. I am back to left and right. Neck is at the center and arms are at the left and right edges. Arms are attached to the shoulder with both hinges and rotary connections. Arms can rotate on the shoulder and they are hinged to swing outward from the shoulder. I can use a screw device to lever the arm(s) outward. That motor, in turn revolves around a shaft that rotates in a bearing in the shoulder. The arm is attached to the shaft. The shaft rotates the arm and the hinge.

The shaft motor is arR left or right. The hinge motor is arH left or right. There are touch sensors under each arm. arPL and arPR.

Left arm:
arRotatingL = arRotateL - arNotRotateL
arRotateL = walking o FATilting o arPainlL
arNotRotateL = arRotPainhL + default
arRotPainhL = arRotatingL if isgt(arRotLimith)
arRotPainlL = arRotatingL if islt(arRotLimitl)
donerotL = done(arRotatingL)
wasarRotL = was(arRotatingL)
; Lifting
arLiftingL = arLiftL - arNotLiftL
arLiftL = LRTilting
arNotLiftL = arLiftPainhL + default + arPL
arLiftPAinhL = arLifting if isgt(arLiftLimith)
arliftLdone = done(arLiftingL)
wasarliftL = was(arLiftingL)
Right arm:
;Rotating
arRotatingR = arRotateR - arNotRotateR
arRotateR = walking o FATilting o arRotPainlR
arNotRotateR = arRotPainhR + default
arRotPainhR = arRotatingR if isgt(arRotLimith)
arRotPainlR = arRotatingR if islt(arRotLimitl)
arrotRdone = done(arRotatingR)
wasarRotr = was(arRotatingR)
; Lifting
arLiftingR = arLiftR - arNotLiftR
arLiftR = n(LRTilting)
; change these if reversed
arNotLiftR = arLiftPainhR + default + arPR
arLiftPainhR = arLiftingR if isgt(arLiftLimith)
arliftRdone = done(arLiftingR)
wasarliftR = was(arLiftingR)
I have motors to lift and swing the arms. Four motors total.

Elbows

The elbow is a simple hinge. It is straight at 0 degrees and bends forward as much as it can.

Left:
;Left:

elBendingL = elBendL - elDon'tBendL
elBendL = elPainlL
elDon'tBendL = elPainhL + default
elPainhL = elBendingL if isgt(elLimith)
elPainlL = elBendingL if islt(elLimitl)
elLdone = done(elBendingL)
waselBendingL = was(elBendingL)

Right:
elBendingR = elBendR - elDon'tBendR
elBendR = elPainlR
elDon'tBendR = elPainhR + default
elPainhR = elBendingR if isgt(elLimith)
elPainlR = elBendingR if islt(elLimitl)
elRdone = done(elBendingR)
waselBendingR = was(elBendingR)
Two motors.

Wrist

The wrist flops back and forth.

Left:
wrBendingL = wrBendL - wrDon'tBendL
wrBendL = wrPainlL
wrDon'tBendL = wrPainhL + default
wrPainhL = wrBendingL if isgt(wrLimith)
wrPainlL = wrBendingL if islt(wrLimitl)
wrLdone = done(wrBendingL)
waswrBendingL = was(wrBendingL)
Right:
wrBendingR = wrBendR - wrDon'tBendR
wrBendR = wrPainlR
wrDon'tBendR = wrPainhR + default
wrPainhR = wrBending if isgt(wrLimith)
wrPainlR = wrBending if islt(wrLimitl)
wrRdone = done(wrBendingR)
waswrBendingR = was(wrBendingR)
Two motors

Fingers

There are 4 fingers and a thumb on each hand. (I just counted them.)
From the thumb th, number them: in is index, mi is middle, ri is ring and li is little. Each finger has 3 hinges. Number them from the hand, h1, h2, h3.

Each finger has two motors, one motor on hinge h1 and one motor on hinge h2. The motor on hinge h2 also bends the hinge h3. I cannot bend hinge h3 by itself unless I physically suppress the bending of hinge h2. (I am the only example of a human being around as I write this.)

The thumb has two hinges and two motors. There is another hinge and motor that rotates the thumb under the hand.

mf1h1 is the motor on the first hinge of the first finger.

The major operation of the hand is to clasp something. It also touches things. The haClaspL and haDon’tClaspL data stream comes down the arm. Also hand clasping is inhibited on each finger by touch.

haToClaspingL = haClaspL – haNotClaspL
haClaspL = {}
haNotClaspL = default
inh1BendingL = haToClaspingL - inPL
inh2BendingL = haToClaspingL - inPL
inh3BendingL = inh2BendingL
mih1BendingL = haToClaspingL - miPL
mih2BendingL = haToClaspingL - miPL
mih3BendingL = mih2BendingL
rih1BendingL = haToClaspingL - riPL
rih2BendingL = haToClaspingL - riPL
rih3BendingL = rih2BendingL
lih1BendingL = haToClaspingL - liPL
lih2BendingL = haToClaspingL - liPL
lih3BendingL = lih2BendingL

Now the thumb. For now, leave out the rotation.

th2BendingL = haToClaspingL - thPL
th3BendingL = haToClaspingL - thPL

This is a good example of how a master command or goal gets split into sub goals and tasks.

Now lets repeat this for the right hand.

haToClaspingR = haClaspR – haNotClaspR
haClaspR = {}
haNotClaspR = default
inh1BendingR = haToClaspingR - inPR
inh2BendingR = haToClaspingR - inPR
inh3BendingR = inh2BendingR
mih1BendingR = haToClaspingR - miPR
mih2BendingR = haToClaspingR - miPR
mih3BendingR = mih2BendingR
rih1BendingR = haToClaspingR - riPR
rih2BendingR = haToClaspingR - riPR
rih3BendingR = rih2BendingR
lih1BendingR = haToClaspingR - liPR
lih2BendingR = haToClaspingR - liPR
lih3BendingR = lih2BendingR

Now the right thumb.

th2BendingR = haToClaspingR - thPR
th3BendingR = haToClaspingR – thPR

28 motors total.
; Collect left hand touches
;
dliriL = liPL – riPL ; little - ring
dmiinL = miPL – riPL ; middle - ring
dinmiL = inPL – miPL ; index - middle

;
slL = drimiL + dliriL ;
sum left side
srL = dmiinL + drimiL
; sum right side
sL = srL + slL
; sum all
;
TouchingriliL = 1 if z(dliriL)
;ring + little
TouchinglimiinL = 2 if z(srL)
;little + middle + index
TouchingAllL = 5 if z(sl)
;all
TouchingrimiL = 3 if z(dinmiL);
index + middle
TouchingrimiinL = 4 if z(slL)
;index + Middle + ring
;
O1or2L = TouchingriliL o TouchingmiriliL
O1or20r5L = O1or2L o touchingAllL
O3or4L = TouchinginmiL o TouchinginmiriL
OAllL = O1or2or5L o O3or4L

; Collect right hand touches
;
driliR = riPR – liPR ; ring - little
dmiriR = liPR – riPR ; middle - ring
dinmiR = inPR – miPR ; index - middle

;
srR = driliR + dmiriR
; sum of differences
slR = dinmiR + dmiriR
sR = slR + srR
;sum of sum
;
TouchingriliR = 1 if z(driliR)
;ring = little
TouchingmiriliR = 2 if z(srR)
;middle = ring = little
TouchingAllR = 5 if z(sR) ;
all fingers
TouchinginmiR = 3 if z(dinmiR);
index = middle
TouchinginmiriR = 4 if z(slR)
;index = middle = ring
;
O1or2R = TouchingriliR o TouchingmiriliR
O1or20r5R = O1or2R o touchingAllR
O3or4R = TouchinginmiR o TouchinginmiriR
OAllR = O1or2or5R o O3or4R
haTouching = OAllR o OAllL
haTouched = Touching z hatouchedcode

Figure 2 Hand Clasping

 

Neck

Neck connects the shoulder to the head and controls head motion. The head can turn, nod back and forth and rock right and left. Fortunately, the motors for the neck can go in the shoulder space. I can establish the motors quickly. Now that I am getting close to the head, I can leave off prefixes.

HeadNodding = Nod – Don't nod
Nod = FATilting
Don’t nod = default

HeadRocking = Rock – Don't Rock
Rock = LRTilting
Don’t Rock = default

Two motors.

HeadRotate = RotL – RotR ;RotL > RotR Rotate left
RotL = IntensityL + LoudnessL + RotPainR
RotR = IntensityR + LoudnessR + RotPainL
RotPainL = HeadRotate if isgt(HRLimitL)
RotPAinR = HeadRotate if islt(HRLimitR)

; Add the ears, look at light or sound.
Dir = HeadRotate ; follow the eyes.

One motor.

Head

The head holds the minor motors for eye movement and sound but it is mostly full of sensors. Eyes, ears and balance are the main ones. I simplify like crazy here.

Speaking = Speak – Don't Speak
Speak = {Pain}
Don’t Speak = drinking o default
Smiling = smile – frown
smile = default + Goodness
frown = anyPain

I now have all the motors of the animachine established. Other than a few sensors in the foot, I have no sensors yet. If I power up the animachine now, it will flop around "like a chicken with its head cut off." (The latches in my HalNodes are CMOS and tend to emit random integers when they have no input.) Sensors and brain HalNodes complete the loop and I am at that point now. Every undefined cable must be connected to something.

Balance

The first sensors in the head are for balance. I need a sensor that provides an integer for fore and aft and right and left tilt. Let positive numbers indicate forward and right tilt and negative numbers indicate backward and left tilt. Of course, zero is no tilt. Sensor names are:
FATilt and RLTilt for fore and aft and right and left respectively. Animals have two of each. So can I:
FATiltL and FATiltR for fore and aft and LRTiltL and LRTiltR.
Now, as nature does, I can eliminate absolutes, knock out differences and clean up our inputs.

FATilting = FATiltF - FATiltA ; the differences
LRTilting = LRTiltL - LRTiltR ;

The balance goal is to keep FATilting and LRTilting close to zero.

Since this is our mechanical man we can equip it with any instruments we want. It could have a radio link. It could have a GPS system for global position reference. Animachine evolution can be much faster than our biological evolution. When we learn how language works and how to read, so can they. So, how do we keep animachines from building animachines. They can read the instructions, too. We need to think about that now. The real problem is power for the animachine. Big Al has a fuel cell but that is fiction. There is no battery or other power that really works long enough.

Ears

Buy two Ear1.ani from Hal Brain Design. Call them EarR and EarL

Loudness = LoudnessL o LoudnessR
dLoudness = LoudnessL – LoundnessR
; sound direction
dLoud = dLoudL o dLoudR
Sound = Loudness + dLoud
IsSound = Sound
WasSound = done(Sound) o was(Sound)

Eyes

I will use the eyes developed in the vision chapter. They will be EyeL and EyeR. From them will come:

LengthL and LengthR, HeightL and HeightR, ColorsL and ColorsR for each object detected. We derive:

Length = LengthL o LengthR
Height = HeightL o HeightR
Shape = Length – Height
; Shape code
Size = Length + Height ; size code
;and
dShape = ShapeL – ShapeR
;3d shape code
dSize = SizeL – SizeR
Object = Shape + Size
ObjectSeeing = Object + Color + Sound + haTouch
ObjectSeen = ObjectSeeing z ObjectSeenCode
Color = ColorL o ColorR

Constants

Legs
feLimith = 100
feLimitl = -10
knLimith = 200
knLimitL = -1
hiLimith = 200
hiLimitl = -2

Arms

arRotLimith = 200
arRotLimitl = -200
arLiftLimith = 200
wrLimith = 100
wrLimitl = -100

Head

HRLimitL = 100
HRLimitR = -100

Global

default = 10

Codes

smilecode = 10
walkedcode = 11
peedcode = 12
stoodcode = 13
satcode = 14
WasSoundCode = 15
ObjectSeenCode = 16
wasobject = 17
hatouchedcode = 18

Emotions

Now I must pay attention to the internal state and to the goals of this animachine. I would like to see how it feels, so I can make motors to show emotion.

Goodness = Good – Bad
Good = WhatDone
Bad = anyPain ; start the good – bad trees.


anyPain = PainL o PainR
fePain = fePainhL o fePainhR o fePainlL o fePainlR
knPain = knPainhL o knPainhR o knPainlL o knPainlR
hiPain = hiPainhL o hiPainhR o hiPainlL o hiPainlR
elPain = elPainhL o elPainhR o elPainlL o elPainlR
arPain = arPainL o arPainR
;
PainL = fePainL o knPainL o hiPainL o elPainL o arPainL
PainR = fePainR o knPainR o hiPainR o elPainR o arPainR

This is how you collect a large network of similar data. You can use it in its parts or whole.

I reach a means of goal setting now. I want to increase Goodness which means adding to Good or taking away Bad. I am now in the inner layer of the brain where sensor data streams are combined into object concepts.

First, I detect objects. From vision, I define an object as anything that covers two sensors or has equal inputs at the same time to two separated sensors.

While detecting an object, I am collecting attributes of the object. Concepts are a PNode property tree of attributes, and will generally be a numeric code that is related to the sum of its attributes.

(In English grammar, objects are nouns and attributes are adjectives. The arithmetic is like:

ThisNoun = SomeQualifier + SomeSmallerNoun
Man = rational + animal

We can establish consciousness by providing data streams that collect "what I am doing" objects. Tree notation can be used here to for illustration. They can be expanded for construction. (See Tree Systems)

LegStatusL = hiBendingL o knBendingL o feBendingL
LegStatusR = hiBendingR o knBendingR o feBendingR)
ArmStatusL = arRotatingL o arLiftingL o arPainL
ArmStatusR = arRotatingR o arLiftingR o arPAinR

WhatDoing = walking o sitting o standing o peeing o
drinking o speaking o hearing o seeing o hatouching

WhatDone = walked o sat o stood o peed o drunk o
seen o hatouched o {leg and arm movement}

Seeing and seen should be collected from vision objects.

Hearing and heard should be collected from hearing objects.
All this is collected into now and just past. Note that now flows into just past which flows into past just like a single data stream.

This is the first level of code for Big Al. The second level will provide trees for goals we already have. Walk, stand and sit are all open and ready for does and don’ts. This level will start providing personality. How many levels of code are there? Until 1994 we could not write the first level. Who thinks they know how to write the second level, leaving sockets for the third level?

[[To be continued]]

[To Top]

 [Back to home]

[Bottom]

 Hit Counter

08/06/08