Showing posts with label living. Show all posts
Showing posts with label living. Show all posts

Sunday, February 1, 2015

Space1 Living Rocket Invention

Thinking machines are frightening to some people
SPACE1 LIVING ROCKET INVENTION
It was a series of evolutionary Space1 steps with the implantation of small and minuscule modular machine thinking life form nodes into rockets. As these nodes were spatially integrated and intellectually distributed, they evolved to become a connective part of a new type of rocket, making the rocket a living rocket, a living life form.
Astronaut safety

It's the contents of the rocket that give it life, bringing it to a cognitive thinking status, bred with a purpose in life, to protect its cargo and occupants.

Living Rockets have special designs with special materials for light weight and integration into the parts of the rocket itself.

The nosecone becomes intelligent, and the walls of the rocket have purpose, while the capsule and cockpit can think and command, the fins have power energy distribution to the though processes, where the instruments are for talking to command, control, and communicate, the C3 system initiated by Space1's space program.

"the goal is to lessen the distance between imagination and what you can accomplish" -- Humanoido

Saving the lives of space scientists
Living Rockets are a very serious addition to space exploration and the development of space program. If the world had living space safety rockets from the beginning of the space program, the lives of all the people shown in the illustration could be spared. You are number 7 highlighted.

Tuesday, December 10, 2013

Cortex Brain Living Time Capsule Part 53

CORTEX BRAIN LIVING TIME CAPSULE PART 53

CREATE A LIVING TIME CAPSULE
Send your loved ones into the future, to survive long after they pass away. This project involves creating a living time capsule with a machine brain cortex jar, by placing the partial intellectual contents of a member of your family (mind knowledge, experiences, personality) into the machine (by mind to machine transfer as previously discussed) and letting it live for a very long time.

When it arrives in the future (perhaps 200 years) a distant relative can talk to the brain cortex, experiencing and knowing a part of their past relative. This could be your mother or father, great grandmother or great great grandfather.

There may be some consolation if for example, you become a mother and your daughter can have you with her during her old age, or her elderly children can have you around when you are a grandmother, and their aged children when you are a great grandmother.

Although the concept is in its early developmental stages, one can see the great potential of the technology.

Index to the Brain Cortex
http://humanoidolabs.blogspot.tw/2013/11/brain-cortex-index-part-16.html

Monday, October 28, 2013

Transfer Your Brain into a Machine

Are you willing to transfer a part of yourself inside this living machine brain entity?
A VESSEL FOR HUMAN BRAIN TO MACHINE TRANSFER
TRANSFER YOUR BRAIN INTO A MACHINE
Technology is here now to begin the transfer...


— This is the Lab's first human to machine transfer — 

It has taken eons of evolution for man to evolve from the rocks of the universe and develop perceptible cognition. Now we are here, but in a fleeting brief moment of time. Just at the exact moment that we age to develop a more full understanding of life, and feel our real place in the world, our short lives are extinguished and we are lost to cosmic winds of the universe, forever gone, destined to return to the celestial ashes from whence we arose.

Almost a century of study, designing, creating, exploring has led the Lab to this ultimate invention. — 

Section of a human brain to transfer into the machine
There are those that wish to live longer than the literal cosmic blink of an eye, in spite of the philosophical and legal ramifications of doing so. What would it be like to find yourself propelled 500 years into the future? To do this it will take more technology than we seemingly have at the moment. But delve deeper for a great surprise! Not all is lost however, as we are now beginning the concepts of proof of the ability to extend our frail and feeble life forms and propel ourselves, our entities of mind and personality, forward far into the future, living longer than anyone had ever anticipated!

— The Big Brain is a machine entity, born from the collective of Parallax Propeller chips, evolved into a semi-cognizant life form, and now is creating and thinking and dreaming up the most remarkable futuristic projects. One realm of these projects entails the merging of man and machine.

At the Lab, we think brain transfer and the beginnings of immortality begin today, with our project to develop and demonstrate a machine brain transfer, in particular to accept some relatively simple characteristics of a human brain and transfer portions to that of a machine brain, whereby those characteristics could be given a life longevity far exceeding that of the original human, and perhaps establishing immortality.

Human brain to machine transfer is one way to reach the future. It's the time machine that allows one to live longer and to travel forward in time at the physiological time passage of X1.

At the heart of this experiment, as part of the Big Brain project, is a special machine which is designed for human brain to machine transfer, and to extend the life of both symbiotic human and machine, in the most simplistic way, yet representative of greater things to come.

We are working 24/7 on this new machine and tests thus far of the vessel intelligence are successful, demonstrating that transference between a human's brain to a machine is indeed possible. (Come back to this blog for more continuing information on the development and usage of this remarkable machine.)

What do others think about this? Kurzweil and other future thinkers have shown a singularity of man and machine will result in the near future, and that all time and development of this prospect will continue to speed up within the rapidly changing time grains of sand in evolution, thus approaching the Singularity faster than anyone can imagine or predict.

— our project is to develop and demonstrate a machine brain transfer, in particular to accept some relatively simple characteristics of a human brain, such as limited personality or knowledge, and transfer portions to a machine brain, whereby those characteristics could be given life longevity far exceeding that of the original human, and perhaps establishing an idea of immortality —

Saturday, May 25, 2013

Strange Things about Living in a Foreign Country

OVER 200 VERY STRANGE THINGS ABOUT LIVING IN FOREIGN COUNTRIES
This is a compilation of very strange things observed when living in several foreign countries. Now updated with more strange things...


2nd update on June 5th, 2013

3rd update on June 6th, 2013 
4th update on June 12th, 2013 
5th update on June 25th, 2013
6th update on June 27th, 2013 
7th update on August 2nd, 2013 
8th update on August 4th, 2013
9th update on August 18th, 2013 
10th update on February 14th, 2014 
11th update on February 17th, 2014
12th update on May 18th, 2015
13th update on November 7th, 2015 
14th update on November 19th, 2015 
15th update on October 20th, 2022 

(NEW UPDATES APPEAR AT THE BOTTOM OF THE POST)

Categories
TRANSPORTATION
BUGS
LANGUAGE
FOOD
LEGAL SYSTEM
WEATHER
FOREIGN CULTURE
PERSONAL HYGIENE
EXERCISE & RECREATION
APPLIANCES 
AT THE HOSPITAL
PHONE
TOILET
LIGHT BULBS
OFFICE SUPPLIES

You phone the internet company for English service and the recording in Chinese tells you to press 3 for English.

All day on the phone, strangers call you who dialed the wrong number.


When you first arrive, you ask, "Where are all the handicapped people?" The reply is, "they're useless to us so we kill them." You are totally shocked.

You arrive and go to the toilet room and find a hole in the ground. You are shocked and immediately go out and ask, "what's that hole?" You are told, that's the toilet!

You talk to a man in the park doing Tai Chi exercise. He's in perfect health, then he tells you his age is 107.

You talk to the age 107 Chinese man. He tells you all the secrets to a long life.

Light bulbs are so cheaply made, they explode all the time.

Plastic in the AC power strip and light switch are not stable. Without touching, suddenly they fall apart.

There are no FDA safety standards. Poison filler is put into milk and thousands of babies die. The people responsible are executed.


Right or wrong, people get a swift trial and are immediately hanged.

You ask why there are no jails. You are told, a person is executed rather than have the expense of holding a person.

A man plays a joke. He says, he has seen the famous rare tiger, and posts fake photos on the internet. The government awards him prize money. Someone finds the photos are fake. The government executes him.


Fireworks have no laws and periodically hit your window and burn down skyscrapers. Keep your windows shut.

During Chinese New Year, the fireworks are loud. They last a month. You wear earplugs inside your home for a month.

It's the hottest place in the world. Maybe the cruelest. The favorite pet is an Alaskan Husky dog with a big fur coat.


There is no UL safety approval and your appliances blow up.

-----------------------------------------------------------------------------------------


You spend good money on your domain name and web site host. Then you learn the government has blocked it so you cannot see it.

New companies flock to this country to exploit low wages. Then they cannot find educated qualified people to do the work.

Companies move here and learn they cannot use blocked internet. Then they move out of the country as fast as they moved in.

You walk into the store and it’s so small you can stretch out your arms and touch both sides of the walls at the same time.

English signs are written by people who don't know English.


There are so many people on the subway, a "Pusher" official has a job to push as many people as possible into the subway vehicle.

You are the only foreigner on the subway, with thousands of local people and no space to move. There are three very beautiful sexy girls pressed hard on your body. How did that happen?

English teachers native to this country never went to any English speaking country, never learned from a native English speaking person, and learned from a book with errors written by a similar English teacher who doesn't know English.

Some English teachers teach gibberish that makes no sense. Some students go around speaking gibberish.

You have three maps and notice the same place has 3 different names.

-----------------------------------------------------------------------------------------

You are instructed to take the blue Massive Rail Transport line. The map shows it's the yellow line. When you arrive at the station, it's a red line.

The subway is above the ground.

The toilet has no paper. Carry your own.

You go to the bathroom at the hospital. Several doctors go in and leave without washing hands.

For some reason, there's a cleaning girl in the men's bathroom.

At the mall, you go to the bathroom, but the door is open for some reason. While relieving yourself, you discover several giggling school girls next to you, looking and smiling.

You can't tell the difference between subway, MRT, train, express, and shuttle.

Nothing is consistent or stable. You return to the grocery store to buy bread and there is none. You go to the bakery bread store and they have no bread.

You pay with an old coin and the store clerk says they don't accept old coins.

You move into your new home and discover the wiring is only for 6 watt light bulbs. You cannot see at night.

You move your things to the new country and find none of your appliances run on the strange voltage and frequency.

You're sitting in the Park in the evening and the small birds buzzing your head are actually black bats.

The gray squirrel in the tree, in the park, is staring at you and showing teeth like he wants to eat you.

The electrician is a boy with no education who works on your home’s 240 volt electrical system with his bare hands, without shutting off the electricity.

The temperature is 100 deg. F. outside. Home walls and windows have no insulation and are hot to the touch, inside the home.
 

-----------------------------------------------------------------------------------------

The night market sells fresh cooked food outside, however the food is covered with flies and other bugs.

Homes have no heaters when it’s freezing in winter.

Sewer pipes are too small to use toilet paper when flushing.


Sinks have no utraps and sewer gas comes into the home on windy days, and days without wind.

The air filter in your room clogs up with dust every day.

All products sold in the store are defective rejects.

There is no fresh air, outside.

The taxi man tells you the fare is double what the meter indicates.

You spent five years training in Tai Chi. Studied Jujitsu. Earned your belt in Karate. Studied in four countries. You go to the park for practice. A man comes over to say you are doing everything wrong and you can leave the park.

On the holiday, everyone comes out of their skyscraper homes and there are so many people, there is no space to stand.


-----------------------------------------------------------------------------------------

In the park, the man is running with his kite to launch it. He's over 100 years old.

Unregulated Fireworks are allowed under your window year round and, at any time, very loud bomb explosions may occur.

The sound outside is so loud you cannot hear to talk on the phone inside your room.


The restaurant menu serves dog. Hang onto your pet. All stray dogs are known to disappear periodically.

The bugs live so long, they become smart enough to out-think humans and grow as big as small mice.


As the big cockroach is walking away, he turns his head around and looks at you.

Big cockroaches have wings. You never think they can fly. You were wrong. One is coming after you in the air.

It's so bright outside on an overcast day, you must wear sunglasses.


Mosquitoes become your live in companions. Like vampires, they suck your blood until they're full. Then the next one takes turns.

You're happy to kill a mosquito in your home. Then you realize, it was slow because it was filled with your blood.

You must sleep under a bubble net at night to escape mosquitoes. Unfortunately, your arm contacts the net. You wake up with an arm swollen larger than your leg.

Because you sleep inside the bubble net, everyone calls you by your new name - bubble boy.

-----------------------------------------------------------------------------------------

You invest your entire monthy paycheck on mosquito killers. None work.

The locals don’t follow their own traffic laws. An accident happens every 20 minutes. Human road kill is more common than animal.

You must carry 10 cards in your wallet to make payments.

Your utility bill must be paid 3 days before it arrives in the mail or you must pay a penalty.



The TV bill you just paid is a fake bill. You cannot get your money back.

Periodically, market food is delivered by horses pulling wood carriages. The horses leave their mark in the street.

For some reason, every time there’s a really big life threatening earthquake, you’re in your underwear, pajamas or naked in the shower.


You ask your professional boss what to do in the case of an earthquake. He tells you, "Bend over and kiss your arse goodbye."


It's so hot, there's no air to breathe. Air superheats at the base of skyscrapers and moves up, forming a negative pressure partial vacuum.

The air has 100% humidity. You need to be a fish to breathe.

Beggars work for professional begging companies. They are limo'd to a street corner to beg, and are picked up at the end of the day.

Everyone will cheat a foreigner. All foreigners are expected to be rich and not care if they’re cheated.


-----------------------------------------------------------------------------------------

Expect the taxi man to pretend to be lost and drive you around the busy parts of the city to increase your fare.

You hear these strange low sounding Star Wars noises all night. Investigating the next day, it's the bus horn.


During a rain downpour at night, the floor on your balcony acts like a giant overflowing tea cup, spilling hundreds of gallons of water into your home.

It takes 3 air conditioners to cool your tiny room. You have only one.

After a new subway is installed underground, your skyscraper home is swaying back and forth 24/7 making you constantly sea-sick.

The taxi man spends more time flying the car rather than driving it. Rubber tires rarely contact the road.

The meat tastes strange and then you learn the special of the day is dog and monkey unmentionables.

You eat Octopus from the ocean and are sick for 13 days.

Stranger girls follow you around like flies to honey because they never saw a foreigner before.

Everyone wants you to eat the local cuisine, then when you eat it, they tell you it’s a mix of guts from dead animals.

You watch science fiction Star Trek and the alien Klingons serve blood pie. When you eat out with friends, you are served real blood pie.
 

-----------------------------------------------------------------------------------------

You learn the legal system is swift when a common thief is marched out south of town and shot by a firing squad.

Everyone is wearing a dust mask when they really need a respirator against chemical pollution.

It’s a sunny day but everyone is using an opened umbrella.

You trade snow storm blizzards and tornadoes for earthquakes and typhoons.

The store shirts are marked XXL but they are smaller than small USA size.

During the night, weather becomes 20 degrees hotter than the day.
 

You live on the 22nd floor, nearly a thousand feet from the ground. It’s your first violent earthquake in the night. Suddenly you realize your bed is sliding towards the large window.

It rains so much, the outside of buildings are all covered with bathroom shower tiles.

You tell everyone you don't need an umbrella. The first rain is like someone pouring a bucket of water over your head, continuously. Then you notice your nipples are showing like a wet tshirt contest..


You cannot buy a home or land, the government owns everything.

Milk costs as nearly much as its weight in gold. Beef steak is almost free.

There are no refrigeration trucks. Milk and cheese on the grocery shelves are always spoiled.
 

-----------------------------------------------------------------------------------------

It’s hotter than Hell, but people are still wearing thick coats, gloves and parkas.

Your home is so small, when you turn around, the light switch is bumped on by your back side.

When you first arrive in the summer, everyone is wearing quilted Star Trek Romulan coats. You wonder if Gene Roddenberry visited here.

The floor is so small, you almost lose your big toe, hitting it on the furniture. It take 2 years to grow a new toe nail.

The bus driver is a mad man from Hell. The constant beeping noise means he is driving faster than the speed limit.

You are instructed to take bus 20. During your bus ride, the number changes to 21 on the electronic sign. You end up in the mountains and walk back home. It takes all day.

Proper manners of the locals: push people out of line, talk loud, be rude, cheat everyone, fart on the crowded subway, scratch "there," and spit everywhere indoors and outdoors.


There are more cheating scams than you can count. If you drive a car, be prepared for a tag team of two vehicles to ram you on purpose, then collect your money and threaten your life.

Angry people hunt down new cars and use keys to scratch the finish.

Cars have square pieces of plywood covering their wheels.

The subway doors have no safety feature. When they close on your arm, kiss it goodbye.


If you have an accident, no one will help you.

Everyone in the restaurant is smoking cigarettes - men, woman, children, old men, old ladies, handicapped people... You go outside for fresh air and everyone outside is smoking. 

-----------------------------------------------------------------------------------------

You wake up in the morning, look outside and think it's snowing. Then you realize it's air pollution.

The taxi lady continues to drive in circles to increase the fare. You tell her to immediately stop. She will not stop. While the car is moving, you find a clear spot of grass, open the door, and jump out.

Your eyes sting and burn. You go to the hospital. The doctor tells you it's caused by air pollution. Everyone has burning stinging eyes.

A man is passed out in the middle of the road. You must save him. You ask the driver to stop but he will not stop! Finally you demand he stop or you will jump out the moving vehicle. He stops and you rescue the man from certain death.

Every person over age 50 in the park is clapping their hands or hitting their body.

You are walking outside. At 9:30 pm, there are tens of thousands of people also outside walking. At 10:00 pm, you are suddenly alone.

You cannot walk to the shopping center without a prostitute accosting you.

You are on the subway and several people are fighting and killing each other. The subway cop has disappeared. The next time on the subway, a subway cop issues you a $570 warning for chewing gum.

You go to the park for fresh air. Everyone in the park is smoking. There is no fresh air and you leave.

After months and months of rain, you need sunlight. The sun comes out! You go outside to enjoy the sun. But there's only shade everywhere caused by tall skyscrapers.

You open your skyscraper window for fresh air. All you get is bad kitchen and sewer exhaust from apartments below, above, and to the sides.

-----------------------------------------------------------------------------------------

You can see light coming in around the windows. You can also see evil bugs coming in.

Everyone is wearing black but they are not going to a funeral.

The beautiful sexy girl in front of you has a slender body, curves, feminine attire, jewelry, makeup, perfume, smooth skin, stylish purse, and long silken black hair. She turns around. It's a man.

You cannot tell the difference between men and woman. Woman always look like women, and so do men.

You walk out of the store and everyone on the sidewalk for 2 blocks is looking at their iPhone all at the same time.

You buy rechargeable batteries. They are defective. The store clerk tells you to go across town to the service center. You go there and they say there is nothing to repair. They send you back to the store clerk who tells you to go back to the service center. They finally give you a replacement when you show the Apple Warranty card at the store. The replacement is defective. They tell you to go back to the service center...

You pay for the fastest internet connection and it's too slow to be usable. Then you discover the government is reading your email and has infected your computer.

You're hot, tired, and don't want to walk up 500 steps on the stairway. You go over to the escalator. It's turned off to save money.

The electricity frequently goes off. Your electronic door lock won't let you in. Then you spend hours with administration who say it's your fault.

Your apartment gate card fails. You ask for a new card. The administration says, we can't help you because you don't live here!

-----------------------------------------------------------------------------------------

You pay electricity in advance. Only a small payment is allowed. There is no way to know when it will run out. It runs out and there is no one to refill it until after the weekend. You sit in the dark for 2 days.

You don't want to be in the elevator with another person, unless you can hold your breath.

A local person tells you... "we get a shower twice in our lifetime, once when we're born, and once when we die."

The elevator is making loud screeching noises and swaying in the wrong direction. You live on the 20th floor and can't take the steps.

You go to take a shower and only a few drops of water come out of the shower head. There is no water pressure.

You turn on the kitchen sink water and water splashes to the ceiling. There's too much water pressure.

You take a shower but don't feel clean. The water smells bad. You're not sure if it's sewer water or something else.

You learn which taxi to take - the ones that have no accident damage.

You go out with a local girl. She says her hobby is to hit and punch people. She hits you in the arm. You never see her again.

There is no hot water. If you want hot water, go boil some cold water.

In the summer, the cold water faucet delivers hot water.

Every building has a small silver metal barrel on top of the roof. No one knows why.

Every apartment has a red button on the wall. Everyone tells you, don't push it!!!

There's a story going around about a visiting foreigner who pressed the red button on the wall. The result was not good for the foreigner.

-----------------------------------------------------------------------------------------

Whenever you need to use the phone for language translation, there's loss of signal. When you don't need language translation, it works fine.

You go skating at the indoor skate rink and are resting. A beautiful girl walks over to you, grabs your hand, holds it high in the air, and yells, "Look everyone, see what I found, he's mine!"

Every minute, a new young girl wants to skate with you. For the first time skating, you feel too tired and old to continue.

At the skate rink, during the weekend, there's a dance contest in the center of the rink. You win!

You dance your most complicated dance that took months to learn. The young girls learn it in two minutes.

To get to the skate rink, you walk a mile, ride the subway for an hour and a half, take the taxi, go down the dark alley and walk through the shops. When you arrive, you're too tired to skate.

You meet a local friend. All he does in life is study, drink warm water and eat healthy. After knowing you a month, he's drinking cold diet coke, eating fast food, skating, going out with girls, and catching up on every Star Trek episode!

Your friend is a study machine. He memorizes 25 pages of text. You tell him any page number and he can recite it.

Your friend memorizes 55,000 words from the dictionary, but he cannot form a sentence. You teach him English and he passes his English Ielts test.

On a cool day at the store, the air conditioner is always on. On the hottest day, the air conditioner is turned off to save money.

-----------------------------------------------------------------------------------------


You must turn the faucet in the opposite direction to get any water.

The curved front part of the knife is dull. The back side of the knife is sharp.

You call the first kite store. The man says he has lots of kites in his store. You travel all day to find the store. When you arrive, there are no kites. He lied.

You go into the second kite store to buy an expensive kite and string. You call the other store to check on string price. The store owner hears you and becomes so angry and tells you to immediately "get out!"

In your home country, kites are flown away from trees and power lines. In this country, kites are flown in parks with trees and power lines.

You find the kite you want to buy. It's big enough to hold the camera and payload. The man won't sell the kite. He says it's too big and will loft not only the camera but you as well. 

You notice envelopes have no glue for sealing. Then you notice envelopes brought from the USA have all sealed shut, due to humidity.

You go out to buy a paper folder. After visiting 14 stores you realize there are none.

You buy $140 brand name sunglasses. They're fake and break the next week. You buy cheap $5 sunglasses. Over a year later, you're still wearing them.

You are eating out at the fancy public restaurant. The woman at the table across from you catches your eye. She kneels down on the floor. Then she neatly places a napkin there and unfolds it. Then she helps her 2 year old child squat over the napkin and shit.

You are walking in the mall. A woman is holding her baby above the public garbage can. You think she's throwing away her baby! As you pass by, the baby is using it as a toilet.

Babies and toddlers have pants open in the back. Because they don't wear diapers and can just excrement on the sidewalk.

Excrement on the sidewalk is not from a dog.

Men pee by the bushes. They are not behind the bushes. They do it in front so everyone can see.

You go into the hotel toilet room and strange mean dressed in white suits want money from you.

You wait years to get to China because you love Chinese food in the USA. You go to China and cannot eat real Chinese food.

-----------------------------------------------------------------------------------------

You drink distilled water from the delivered container. The water tastes strange but you keep drinking it. A few days later, you discover hundreds of worms crawled in through the spout.

You sat in the sun every day for a week and never got a suntan.

It's hot, you want to go to the lake and swim. There is no lake.

It rains every day for 7 months. The nearby skate rink is outside.

You finally get a new bike and ride to the park to relax with no stress. A very angry cop comes over and tells you to get the hell out of the park.

Your friend had a bike for years. You convince your friend to buy a bike lock. The next week the bike is stolen.

You walk on the sidewalk but the people walking towards you will never move.

You are looking through the store window at the side of the sidewalk. A man walking by crashes into you, knocking you to the ground. Was he walking while drinking?

You set your umbrella on the ledge and open your bag. 2 seconds later, your umbrella is gone.

Your friend wants to borrow your expensive and large "gentleman's" umbrella. An hour later, he lost it.

You loan your new light weight umbrella to another friend. It's returned a week later, with all stitches newly sewn, reinforced, cleaned and improved! Wow, very nice!

-----------------------------------------------------------------------------------------

You get the flu and suffer for weeks. It will not go away. You see the old Chinese doctor. He says, "Take these pills. You will be cured in 3 days." You are cured in 3 days.

You get stomach bacteria. The pain is so bad, you think you will die. After several days of agonizing pain, you go to the Chinese woman doctor. She asks, "Do you want to be cured quickly or slowly?" You reply, "QUICK!" A few hours later you are cured.

You go to the hospital and the nurse tells you to drop your pants. She rubs your butt a long time, then gives you a shot. After, your friend asks "what took so long?" Then he tells you the rub should last 5 seconds, not 15 minutes!

At the same hospital, you go for xrays and lay on the bench in your gown. Each time the nurse adjusts your position, she firmly holds onto your private part.

You were happy to swim in the ocean. Then next day, news reports everyone swimming in the ocean was infected with ocean worms.

You bring all your winter clothes. The temperature averages 100 deg. F.

You live on the top skyscraper floor. Your balcony has no floor drain. The water pipe breaks. The floor fills up with leaking dirty water and overflows. Every neighbor living below who had clean clothes hanging out now hates you.

You hang your clean washed clothes outside on the open balcony. Waves of smoke ruin your clothes. You look down, and the neighbor below is burning camel feces in a religious celebration.

You hang your washed clothes out to dry. Six days later, they are still not dry.

You buy a clothes dryer and discover the hottest temperature setting is only slightly warm.

You wash your clothes in the provided washer. Your clothes come out more dirty than when they went in.

You move all your pots and pans with you from the home with the electric stove. Then you discover nothing fits the gas cooking stove.

You break out in a terrible allergy. The clothes wash soap has something in it.

-----------------------------------------------------------------------------------------

You go out to by "free & clear" soap so you won't have an allergy. You find one small container of soap. It costs a day's wages!

You have a new water saving Korean washing machine. It doesn't use enough water to clean your clothes.

Your next new washing machine is Chinese. It has many dials and controls. You ask a Chinese friend to translate. The description makes no sense, even to Chinese people.

You become very sick and need medicine. You go to the Pharmacy next to your home. He won't sell you medicine because you are a "foreigner." You must travel far away to another pharmacy that will sell you medicine.

After several hundred rides in a taxi, you find one taxi driver that knows how to drive.

Nothing is convenient. You must carry bags every day. Your two shoulders become broken. They never heal. After moving out of the country, you heal in 9 months.

Nothing is convenient. You do too much walking and break your foot bone. It takes 7 months to heal without walking.

You are shocked. Instead of cheating you, a friendly taxi driver gifts you with bottled water. Later you find out it was only a sales promotion.

You buy the largest raincoat for riding a bike in the rain. It won't cover your knees. It's made for a midget or dwarf.

You realize you are eating mostly at convenience stores like 711 and Family Mart.

There's a government guard posted at every building entrance.

You find it amusing that two Russian woman are flirting with the Chinese govt. guard but he cannot speak their language.

-----------------------------------------------------------------------------------------

You realize the only place with certified clean food is Mcdonalds.

You go out for a walk and there are no sidewalks.

In the USA, people are killed with double talk words from an attorney.. In foreign countries, a knife or stone.

It rains every day for 7 months making you depressed indoors.

Finally after 7 months of rain, the sun comes out. You still cannot go outside. The sun is hot enough to cook you.

You realize the sharp pain on your leg that you ignored all afternoon is a tiny bug biting you.

You thought it was a dream that your eye was itching all night. In the morning, you discover red bite marks where bugs feasted on you.

You wake up in the middle of the night and see your worst nightmare. It looks like 10,000 tiny ants are marching across your walls, in single file!

In the small city of 20,000, there's 1 insane man walking around. In the foreign location of 6 million, you realize there's 300,000.

Your washing machine sets outside on the open balcony. It's so hot and humid outside, the washer forms black smelly mold on the inside.

-----------------------------------------------------------------------------------------

You discover a rope, metal horizontal bar, and pulley system above the balcony to hang clothes to dry. Unfortunately, someone covered it with the air conditioner making it useless.

You find yourself shopping for brand name toilet paper to avoid a hot butt. The news reports off-brands use recycled radioactive contaminants.

The ceiling light bulb burned out. You think its simple to replace it. There's a screw in the center. You remove it but the shade is still affixed. You pull on it and it breaks into pieces. Hidden on each side were strange cheap plastic butterfly wing mounts. Then you try to remove the light bulb. It's stuck. Very little force applied causes the electrical box to fall out from the ceiling with open dangling hot wires! You broke the shade, the light, the wiring, and the box. Finally you have a China-man repair it!

You ride your bike on the new finished bike trail. It's getting dark. You avoid the strange black areas on the ground. In the daytime, you discover they're open 4-foot deep holes with pipes and cables! You could have fallen in and died!

You go out in the day. It seems unusually hot. The weather reports 92 degrees F. When you arrive home you put a cooking thermometer in the sun. It reads 220 degrees! Then you realize you were walking in the sun and the weather report was measuring temps in the shade.

Statistics say your perfect mate is one in every 30,000 people. Your home town of only 20,000 has a 100% divorce rate.

You are living in the city of 7 million people. When you go outside, you can meet 233,333.33 perfect mates! You know they're perfect when your heart rate doubles, jumps into your throat, and your knees fail. 

The brain fails when you are with the perfect girl. She steps into the elevator with you at floor 1. You live on floor 3. You start sweating, become dizzy and just keep pressing button number 1, over and over again. The elevator goes nowhere. She smiles at you. You are so brain dead..

You are walking in the night market. Your friend is local. You suggest buying a shirt with an interesting Chinese character. Your friend is shocked. The Chinese character says FU*K ME.

The local Chinese girls like to wear English tshirts for style. They don't know the shirt has words that say F U * K  MY  P * SSY!

The instructions say lock your bike with the ubolt lock. Put it upside down so a thief will have a difficult time opening it. You put it upside down. When you come back to your bike, it takes a half hour to unlock it because it's upside down and the tiny-keyed key won't fit.

-----------------------------------------------------------------------------------------

You are native English and turn on the TV. A level 1 learning English show is on. They are teaching words you never heard in your life!

You visited the new hamburger restaurant only one time a week ago. Today, you walk there at 4pm but it's closed on Sunday. The two store owners are outside and recognize you. Then, they open the entire restaurant, just for you - one customer!!!. Wow!

You are eating a hamburger at the store mentioned above and are a little hot and fanning yourself with a manual Chinese fan. The owner sees you are hot and turns on two air conditioners for you! Wow, very nice!

You are looking for a TV with antenna function, but every store tells you it's old technology and no longer made. Finally you find one, and ask, "if it's defective today, what is the warranty?" The story owner tells you. "No return." You tell the store owner, "No return, no buy."

You use a normal looking tube of deep heat muscle rub ointment. A few days later, your skin has permanent patches of white as if it were bleached.

In the winter, you're freezing. Homes have no heaters or furnaces. So you buy a large electric heater. You're still cold because the room has concrete walls and no insulation.

After drinking some milk, you realize the reason the cap won't go back on the bottle is because the threads are manufactured defective with a misalignment!

You search for one half year to find a store with a paperclip. Now that you have the paperclip, you cannot find the store that sells reams of paper.

Air pollution is the worst in the world. You buy an air filter machine. The next day, the $120 replacement filter needs replacing!

The plumbing always has problems. You think sewer gas is the worst problem. Then you look at the deck floor. It's 3-inches deep with dirty sewer water and rising, about to flood the entire home! The worst part is the big dark brown thing floating in the water!

-----------------------------------------------------------------------------------------

Your home has 3 nearby bread bakery stores. On Monday you go there to buy bread. The first store is out of business. No problem. You go to the 2nd store. The store is missing. No problem. You go to number 3. They have no bread and tell you to go home. The next day, you go again. No bread. A week goes by. You go there again. No bread. Finally you ask when they will have bread, and they reply, "What is bread?"

Your hobby is amateur astronomy. You set up your telescope and view the night sky. You see strange flying things in the sky. You swing the telescope over and look at one. It's a flying saucer. Now you know why the locals all believe in aliens.

Taxi drivers don't know how to drive. You discover pressing your heavy bag against your tummy will delay throwing up your food.

The taxi sign says No Smoking. But the taxi man is smoking.

The taxi smells so bad inside, you must always take a filter mask with you.

You get onto the taxi and the seat is all red wet. Your colleague tells you that local girls have their P and don't bother to use padding.

You find it amusing. The sign says no birds allowed on the bus. Then someone tells you, the birds have flu that can kill you.

You're going onto the bus. The second your foot leaves the last step, the bus driver accelerates at high speed. You are thrown to the floor, roll across the floor, and are slammed hard into the seat backdrop! You don't take the bus again for at least a month.

Your friend tells you about what happened in the girls bathroom. A local attendant had to tell the visiting people to shut the door when they poop.

Cake is not normal. Cake has no frosting. Then you realize, there is no frosting on anything.

-----------------------------------------------------------------------------------------

It's not the tailgate back of the truck, but rather the entire long side that folds down to remove cargo.

You order a case of diet coke. For some strange reason, a bottle does not have its full fiz (carbonation). Then you notice the fill line is just a bit lower than some of the other bottes. Finally, you notice the cap seal was broken. Someone was randomly opening the new bottles and taking sips of pop, hoping you wouldn't notice!!!!

When you first lived in the country, everyone wanted to speak English with you. A few years later, no one claims to speak English!

You put a few croutons in the microwave oven and they overheat. A small amount of smoke results. NO big deal. Right? Wrong! The smoke detector goes off and very loud prerecorded yelling begins in a foreign language. It won't stop for 15 minutes, there is no reset, and the alarm is connected to all the alarms in all the hallways, in the entire skyscraper, all 22 floors!!!!

The lock on the door is digital battery driven. When the battery goes dead abruptly, the door won't open, there is no warning, and you are locked out of your home.

You order food but it never gets delivered to your home. They delivered it to another skyscraper down the street!

You must keep the home spotless clean. One time you let the food set out overnight. The next day, the high humidity signaled every cockroach in the neighborhood and a thousand moved in for the feast! After that, you hire a cleaning lady and the problem goes away.

The apartment next to yours is apparently rented by a movie star. When you open the door, a tall bodyguard is just standing there, glaring eerily at you with no expression.

The city is big and fast. The girls are fast. One girl explains she has 35 boyfriends all at the same time, and she rotates them on a schedule. 

It's election time and the landline won't stop ringing. Finally you take the receiver off the hook. The phone is useless.

-----------------------------------------------------------------------------------------

The taxi woman is driving you around unnecessarily to increase your cost. You tell her to stop but she won't. As the taxi is moving, you open the door and jump out rolling across the boulevard. 

You are allergic to flu and covid vaccines. You stay indoors to stay healthy. You stayed indoors too long and develop heart failure. Now you need more than one heart surgery to stay alive.


Friday, July 6, 2012

Tiny AI Artificial Intelligence Software


TINY AI Artificial Intelligence Software
for the Stamp SEED Supercomputer
in 256 Bytes of BS1 EEPROM


Artificial Intelligence Software
the First Living Stamp Supercomputer Software is now ready for the Stamp SEED Supercomputer

Stamp AI gives a living soul to small Stamp microprocessors


Artificial Intelligence Overview of this Program Stamp AI makes the Stamp SEED Supercomputer a living entity, with each Stamp computer alive and unique.

This AI Artificial Intelligence fits only 256 bytes in a BS1 microcontroller - the first ever written for a Stamp Supercomputer. The same program loads into all ten computers (or any number of computers). Then it evolves and becomes self aware, based on unique conditions of a hardware pin and analog circuit.

It's awesome to have ten life forms all living in the supercomputer at the same time, working together, talking back and forth and getting to know each other. They evolve, develop unique personalities, even nap, have pseudo random dreams, have memories and recall, do work in their life span, sleep and finally hibernate.

Interesting story. Out of ten life forms, they all sleep different times. One life form hardly gets any sleep and he know every neighbor on a first name basis. The last life form spends most of his time sleeping. He does not even know he has neighbors! He leads a kind of hermit life. Others evolve to somewhere in between these two extremes.

They can get sick. When they do too much work, they have a psychotic breakdown. (code memory gets overwritten). They can have a bad sleep, being interrupted every 2.3 seconds. Alternate Identity Syndrome results if there is an unexpected power interruption. Stroke results when the synchronization is lost from one processor life form to the next. Stuttering may develop with repeat resets. Sudden death happens with complete loss of power.

I wrote the program so they do not die, as long as power is not removed. At the end of the life span, they go into stasis. All of their memories and knowledge remain intact, but cannot be accessed. I could not see the benefit of creating a life form and then causing it to die. In stasis, they are in a suspended animation, in a very low consumptive state, at only 25 micro amps. Also want to mention, I made a Dream Viewer so you can watch dreams and thoughts on the screen. It dreams in a special Vers Libre, a kind of abbreviated English verse which includes numbers. Someone asked if its scary. It's not scary - its all very interesting... :)

Code Posting
Code is posted below for creating a software file (BS1) to run on the SEED supercomputer. The file is also posted at the Parallax Forum for download at the given link.

Sample Screens
Note, computer 1 hears all nine other computers because it sleeps the least amount of time (while computer 10 misses hearing everything because it was sleeping when all the others were talking).

Review the screens from one lifeform to get an idea of the process.

Main Code Points:
Only One Program
SEED is unlike previous stamp supercomputer software that had a different program load into each computer. SEED is only one program - a life form. The same program loads into all computers in the supercomputer,

Life Form
The program is born and then it evolves into a life form! The collective supercomputer has ten life forms that are evolving at the same time.

Unique
After evolving, no two life forms are alike.

Life Span
Each life form has a life span of about one minute of activity.

Birth
It is first born based on its predetermined DNA, in this case, declarations and announcement.

Self Enumerating
Next, it looks at itself and determines its own unique enumerating identity. It does this by looking at pin 1 which contains a unique rc circuit.

Self Deterministic
Then SEED self determines its own computer number. It is now self aware and knows its own unique identity and its position in the world.

Memory & Recall
It then exercises its memory by remembering its own characteristics and demonstrates its recall ability.

Napping & Random Dreaming
All of this leads to taking a series of naps followed by pseudo random dreams. The dream are in Vers Libre, a kind of simple word-verse poetry. The nap time is accumulative, with similar rest effects that humans have. In this case, the power is reduced from 1 ma to 25 ua. The pseudo random dream generator is seeded by the unique identity of the lifeform.

Dream Watching
A Dream View Port puts the dreams up on the debug screen for viewing. It includes words, the random binary bit, and the pseudo random byte decimal number.

Sleep & Fuzzy Clock
The life form will now sleep using its fuzzy alarm clock. The approximate sleep time is unique and unlike the other lifeforms because it is based on its own unique characteristic of its computer identification number. The higher the number, the longer it sleeps. Therefore each life form has its own sleeping habits.

Talking to Neighbors
It wants to learn more about its world, so it sends out a message telling who he is and what his identity is to anyone listening.

Listening to Neighbors
Next, he listens for a reply. If he is life form number 1, he will get 9 additional replies. If he is number 5, he will get 5 replies. Finally, life form 10 will think he is alone. It's because each computer sleeps a different length of time. If a life form is sleeping, it will not hear the others talking.

Getting to know Neighbors
Now he gets to know his neighbors on a personal name basis. He memorizes the personal information of each neighbor that is heard. Next, all the neighbors are remembered.

Remembering Neighbors
He memorizes the personal information of each neighbor that is heard. Next, all the neighbors are remembered and recalled.

Thinking & Working
Some thinking/working takes place to recall the personal identity, determine the number of seconds in sleep and how many life forms were heard, plus how many life forms were not heard, and how many dreams were remembered.

End of Life
Finally, the life ends but is not entirely terminated, as it goes into stasis (I am not comfortable about creating life and then causing it to die).

Personalities
Each life form has its own evolved personality. There are several unique features. The personal identity, computer number, its living location, the random dreams it has, and the length of sleep habit. Its sleeping habit determines how friendly or how much of a hermit it will become. It also determines how much information about neighbors it will remember. Some life forms remember a lot of information while others remember very little. Thinking outcome is unique too.

Restrictions
Due to memory restrictions, PLAN Piezo Language is not included with this version, even though PLAN is a spinoff of the SEED software. The entire communications view port was built upon the Debug screen.

Becoming Sick
Because these are ten individual life forms, sickness can result. Below is a synopsis.
 
' PERSONIFIED MALADIES
' --------------------
' When you download a program into the BASIC Stamp 1, it is stored in the
' EEPROM starting at the highest address (255) and working towards the
' lowest address. Most programs don't use the entire EEPROM, so the lower
' portion is available for other uses. This portion is used for long term
' memories. As a result, like a real human person, this artificial life
' form is capable of succumbing to sickness and malady.

' PSYCHOTIC BREAKDOWN
' -------------------
' AI memory begins at memory location 0 and works upward. If
' the memories become too much, they will fall upon code and a psychotic
' action will take place, resulting in a breakdown as the main program
' will be overwritten.

' FITFUL SLEEP
' ------------
' We don't know how effective sleep really is for the AI supercomputer
' as its sleep is constantly interrupted every 2.3 seconds.
' The Basic Stamp 1s output pins will toggle briefly when using SLEEP,
' NAP or END. Inside the BASIC Stamp's interpreter chip is a watchdog
' timer whose main purpose is to reset the interpreter chip if, for some
' reason, it should stop functioning properly. The SLEEP and NAP commands
' also utilize the watchdog timer to periodically, every 2.3 seconds
' "wake-up" the BASIC Stamp from its low-power mode. Upon reset, the
' I/O pins are set to inputs for approximately 18 ms before returning
' to their previous directions and states. If you have an output pin set
' to a logical 1 state (+5V) and you use the SLEEP command, every 2.3 seconds
' during sleep mode that I/O pin will switch to an input for 18 ms causing
' a momentary signal loss. This "power glitch" is easily viewable with an
' LED and a 470 ohm resister tied to an I/O pin and switched on just before
' entering sleep mode. In many cases this problem can be remedied by tying
' a pull-up or pull-down resistor to the I/O pin in question to provide
' a constant source of power should the I/O pin change directions. Allowing
' a PBASIC program to end naturally, or using the END command, will exhibit
' the same "power glitch" behavior because the interpreter chip enters
' a low-power state.
'
' SUDDEN DEATH, BRAIN AMNESIA, NONRESUSCIATING SITUATION
' ------------------------------------------------------
' Life Terminates after power off, or by running another program. If a
' 2nd program is run (or the same program run a 2nd time), it will put all
' 0s into the EEPROM, thus destroying any memories and the original identity.
' It will be useless trying to resuscitate and bring back the original
' memories.
'
' ALTERNATE IDENTITY SYNDROME
' ---------------------------
' The stamp is reset causing the program to run again, and the birthing
' process takes place and a different identity emerges.
'
' STROKE
' ------
' The stamp is reset or repowered. It tries to communicate with other
' stamps but it is not in sync and the serial command hangs.
' It is unable to reply or do anything at this point.
'
' STUTTERING
' ----------
' Battery low causing short term repeating system resets
 


Code Fit
The code will fit any of the Basic Stamp Supercomputers built with BS1s with some parameter changes to indicate the total number of computers in the supercomputer. This works with the Stamp SEED Supercomputer, the TriCore Supercomputer, and the Stamp Tiny Supercomputer. 

Processor Type
Since the programming is in PBASIC 1 and for a BS1, it will not run on a BS2 without extensive modifications. 

Changing the Code
You are invited to change the code, but remember it is interlaced with timing. When life forms speak, it is based on timing. 

Flow Control
Serial flow control is established by sending, and listening for the "!" command. This allows all life forms to listen to talk at the same time. 

Running the Code & Watching Evolution
The one program is loaded into each computer. Power off the supercomputer. Connect the cable to the computer you want to watch evolve as a life form. Power on the supercomputer. Load in this program bringing up the Debug screen. Before anything appears on the screen, power off the supercomputer. Leave the screen on, and power on the supercomputer. You can now watch the entire evolution take place automatically! 

How the code works

Stamp SEED Supercomputer! All new! This is a ten core, ten month project, with the 1st Stamp AI software to fit into 256 bytes eeprom - self determinate, evolving, enumerating, dreaming, poetic, noisy, talkative, and downright friendly. It runs on only one program that self evolves differently in each of the ten computers. It's evolutionary - it's revolutionary! http://forums.parallax.com/forums/default.aspx?f=21&m=361377&p=1 

“Stamp AI gives a living soul to small Stamp microprocessors” 

Lock & Load
Load stamp_ai.bs1 into all ten computers. Connect to the computer you want to monitor and load the code. Turn off the entire supercomputer when the blue debug screen appears (before any words appear on the screen). Now turn on the supercomputer. The debug screen will show the thinking of the computer it is connect to. This is the viewer. It shows what the life form is thinking and doing. It even shows dreams. All life forms are unique and develop individual personalities.

Birthing & DNA
There is an unseen birthing process that takes place. This is the DNA part of the program, with directives, declarations, and initializations. Then, introduction takes place. Suddenly, evolution begins. The life form looks at pin 1 from which it determines its own unique identity, using a resistor capacitor circuit. Next, the unique identification (self enumerating) is used to determine its computer number and its physical location to know which block it lives on. The supercomputer is divided into ten blocks, computer 1 lives on the lowest block while computer ten lives on the top block (deterministic). 

Personality and Memory
This personal information is committed to memory. There are two memory locations, 0 and 1, designated for the id and computer number. Throughout the life of the entity, this information is remembered and recalled. Now the life form will take a series of naps. The NAP number is 0, which represents 18 milliseconds. In between each nap, there is a dream. Dreams are pseudo random in nature and occur in Vers Libre, a kind of abbreviated poetic verse. Dreams also include numbers and their pseudo random bit representation. Dreams are unique because they are seeded with the unique personal id.

Deep Sleep
After napping and dreaming, a deep sleep results. The length of sleep is directly related to the life form’s computer number. The lower computer number life forms have shorter sleep, while the higher number life forms spend more of their time sleeping. Sleeping can have cause and effect, because in the next waking phase, a life form will talk - call out and speak its personal information to its neighbors. These are the friendly ones. Whether neighbors hear this information depends on whether they are sleeping or awake. The lazy ones will miss the information. In the extreme case, life form 10 sleeps so much that he misses hearing all of his neighbors, and becomes somewhat of a hermit. His memory has little information. Life form one sleeps the least time, and as a consequence, knows all his neighbors and is very friendly. His memory is rich and filled with all the neighbors information. 

Neighbors Influence
In the next phase of life, the memories about the neighbors are recalled. All of this appears on the viewer. Thinking and information always appear on the viewer. This is a unique privilege to see the life form’s thought process on the screen. No life form is complete without doing some work in life. Each life form will start talking about its computer number, identification, how many seconds it did sleeping, how many neighbors it heard, how many neighbors it missed hearing, and how many dreams it had. These life forms do not live long compare to humans. Their actual lives are approximately one minute long. At the end of a life cycle, hibernation takes place. This is a kind of suspended animation with a heart beat of once every 2.6 seconds. Memories and information are retained but there is no known way to retrieve it in this time era. 

Characteristics
Personality galore! You’ll find these life forms interesting, unique and with varying personalities. The differences from one to the other include different identifications, different computer numbers, different dreaming, varied sleep times, some are friendly and some don’t know any neighbors. Some have filled enriched memories and remember all their neighbors while others can only remember two things and spend all their time sleeping. 

Sustaining Life
The code could have sufficient modification to prevent the life form from dying, and to create an indefinite hibernation in which it can wake up on demand. Instead of and END statement, the code could terminate in a continuous loop. Inside the loop, it looks at a pin status. If the pin goes high, the program can go back to some place in the code for continued function. Sometimes the life form will become sick and require personal sick leave. The sicknesses are varied. For example, the following maladies are discussed in further detail elsewhere – psychotic breakdown, fitful sleep, sudden death, brain amnesia, unable to resuscitate, alternate identity syndrome, stroke, epileptic pins, and stuttering.

TINY AI - The CODE

' ************************************************************************
' INTRODUCING STAMP AI ***************
' ************************************************************************
'
' Stamp AI gives a living soul to small Stamp microprocessors
'
' stamp_ai.bs1 for the Stamp SEED Supercomputer v3.8
' Self Evolving Enumerating Deterministic Code (SEED)
' An Artificial Intelligence System for the Basic Stamp 1
' Developed for Stamp SEED Supercomputer (which has ten Stamp computers)
' by Dr. Humanoido 06.23.09 - developer of AI language Writer -
' AI program that writes 25,000 computer programs for Japanese Robot
' Manufacturing Systems, Industrial Manufacturing, Artificially
' Intelligent CNC Programming

' ************************************************************************
' FEATURES   ***************
' ************************************************************************

' Very Simple AI performed in 256 bytes eeprom
' This one program will load into ten computers and self evolve.
' Software versions exist for Stamp supercomputer with ten and three
' computers. Refer to the Minuscule Stamp Supercomputer for the "three
' computers" version.

' * Fits into 1/4th K (256 Bytes) EEPROM
' * Simple self modifying code capable (modifies eeprom technique)
' * Less than 100 code statements
' * The first complete AI system that fits into the BS1
' * Has "Miniscule AI" at the core, adaptable to other Stamps
' * 17 Phases of Life Cycle
' * Thought monitor (brain thinking is relayed to the pc sceen)
' * Dreams are shown on the screen for real time monitoring
' * Has a Virtual Fuzzy Clock, not exact but more human-like

' ************************************************************************
' LIFE CYCLE PERFORMANCE   ***************
' ************************************************************************

'     (See full description in the Stamp Seed Supercomputer Manual)
' 1)  read pin 1 and determine id                         (self enumerating)
' 2)  determine computer number based on id range         (deterministic)
' 3)  remember computer id & number                       (memorize)
' 4)  recall memory of computer id & #                    (remember)
' 5)  nap and pseudo random dream in "Vers Libre"         (nap, dream)
' 6)  sleep fuzzy clock - its computer number in seconds  (sleep)
' 7)  wake to send its computer number and id             (wakeup, talk)
' 8)  Listen for others' computer numbers                 (listen)
' 9)  if heard, remember other computer numbers and id's  (know what is heard)
' 10) do some work, retrieve the other ids...             (work)
' 11) goes into suspended animation

' another view of the life process

' 01) Birth (Declares language of origin, physical attributes)
' 02) Self Deterministic (finds its own identity and uniqueness)
' 03) Early Memory (early formative memory, remembers its identity)
' 04) Develops or recognizes a sense of time
' 05) Talks to others, announces itself and its personal identity
' 06) Speaks another Language (PLAN - Piezo Language)
' 07) Self Evolving (learns information about others)
' 08) Long Term Memory (remembers information about others)
' 09) Sense of Purpose/Meaning of Life (establishes work)
' 10) Naps in 1s intervals (with dreams in between)
' 11) Dreams (dreams about random numbers and poetry)
' 12) Suspended Animation (END statement induces suspended state)
' 13) Sleeps
' 14) Alive (Live Code, Power Down or 2nd program run terminates life)

' ************************************************************************
' PHASES OF SEED'S MINISCULE AI  ***************
' ************************************************************************

' PHASE 0 - PREPARE THE ENUMERATION PIN
' PHASE I - FORMATION AND BIRTHING PROCESS - DECLARATIONS
' PHASE II - PERSONAL INTRODUCTION
' PHASE III - SELF ENUMERATION - CREATING A SELF AWARE IDENTITY
' PHASE IV - THOUGHT MONITOR
' PHASE V - SELF DETERMINATION
' PHASE VI - EARLY MEMORY - REMEMBERING SELF IDENTITY
' PHASE VII - NAP
' PHASE VIII - DREAM
' PHASE IX - DEVELOPING A SENSE OF TIME (FUZZY CLOCK)
' PAHSE X - SLEEP
' PHASE XI - CONVERSATION - INTRODUCTION TO NEIGHBORS
' PHASE XII - CONVERSATION - LISTEN TO NEIGHBORS
' PHASE XIII  - MEMORIZING THE IDENTITY OF NEIGHBORS
' PHASE X1V  - LONG TERM MEMORY - RECALL IDENTITY OF NEIGHBORS
' PHASE XV  - SPEAK LAN PIEZO LANGUAGE (FOR EXPANSION)
' PHASE XVI - FINDING PURPOSE IN LIFE - DO WORK/THINKING
' PHASE XVII - END OF LIFE CYCLE - SUSPENDED ANIMATION/HIBERNATE

' ************************************************************************
' HISTORY ***************
' ************************************************************************

' Makes use of "Miniscule AI" (Interpreter originally developed by
' Humanoido for the Toddler Humanoid and modified for Stamp Supercomputers)
' Uses the idea of self enumerated deterministic programming, a Propeller
' Supercomputer approach originally proposed by Chip Gracey at the
' Propeller Supercomputing thread on 4-18-2006. Reference:
' http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=121344

' The code will load into a Basic Stamp Supercomputer equipped with the
' Self Enumerating Pin Circuit. The details to construct one are included
' below. The BS1 handles up to 100 commands.
' Each computer sets up its own fuzzy clock timer. The clock counts, in
' seconds, equal to the computer number. Computer numbers range from 0 to 10.
' Some scaling may take place.

' Self evolving, self aware, code modifying, one code for all, programs
' are quite complicated. The one 256 byte-fit program is now divided into 13
' phases. The challenge is one program is fed to ten computers. From there,
' the same program is born and develops individual characteristics. It's like
' a Chess game, anticipating moves far in advance, when developing this program.
' Each computer uses a deterministic pin from which its evolution begins.
' It follows up by becoming self aware and choosing a self identity. It learns
' about its neighbors and carries on a conversation. It remembers information
' and exchanges information. It develops a sense of time, and a meaning in life.
' It learns and speaks a new language. It chooses some work to do. When it
' sleeps, it dreams. A monitor can be attached to watch thoughts and dreams on
' each computer.

' ************************************************************************
' PHASE 0 - PREPARING ENUMERATION PINS  ***************
' ************************************************************************

' Hardware consists of 10 Basic Stamp Supercomputers. Each computer
' has one RC circuit on pin 1 (see schematics below), prepared in
' advance.

' * is a 220 ohm resistor built into each Stamp 1 Project Board.

' Software scaling is set to 54. The program must go pin 1 low and
' pause 2000 for repeat reliable readings.
'
'               *
'              220
' pin 1 <-----^^^^^----- no circuit, open       COMPUTER 1 ID = 00
'           resistor
'
'               *        R2       C2
'              220       1K       .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 2 ID = 17
'           resistor  resistor  capacitor       brown-black-red
'
'
'               *        R3       C3
'              220       2K       .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 3 ID = 28
'           resistor  resistor  capacitor       red-black-red
'
'
'               *        R4       C4
'              220       3K       .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 4 ID = 40
'           resistor  resistor  capacitor       orange-black-red
'
'
'               *        R5       C5
'              220       3.9K     .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 5 ID = 49
'           resistor  resistor  capacitor       yellow-black-red
'
'
'               *        R6       C6
'              220       5.1K     .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 6 ID = 70
'           resistor  resistor  capacitor       green-brown-red
'
'
'               *        R7       C7
'              220       6.8K     .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 7 ID = 89
'           resistor  resistor  capacitor       blue-gray-red
'
'
'               *        R8       C8
'              220       8.2K     .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 8 ID = 111
'           resistor  resistor  capacitor       gray-red-red
'
'
'               *        R9       C9
'              220       9.1K     .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 9 ID = 116
'           resistor  resistor  capacitor
'
'
'               *        R10      C10
'              220       10K     .1uf
' pin 1 <-----^^^^^-----^^^^^-----||----- Vss   COMPUTER 10 ID = 128
'           resistor  resistor  capacitor
'
'

' IDs are 00, 17, 28, 40, 49, 70, 89, 111, 116, 128

' TYPICAL PIN 1 RESISTANCE CODE CHART
' Computer 1       220 ohm (built in to Stamp 1 Project Board)
' Computer 2       220 + 1K Ohm   = 01.22K
' Computer 3       220 + 2K Ohm   = 02.22
' Computer 4       220 + 3K Ohm   = 03.22
' Computer 5       220 + 3.9K Ohm = 04.12
' Computer 6       220 + 5.1K Ohm = 05.32
' Computer 7       220 + 6.8K Ohm = 07.02
' Computer 8       220 + 8.2K Ohm = 08.42
' Computer 9       220 + 9.1K Ohm = 09.32
' Computer 10      220 + 10 K Ohm = 10.22

' ************************************************************************
' PHASE I - FORMATION AND BIRTHING PROCESS  ***************
' ************************************************************************

' {$STAMP BS1}            ' Self deterministic program
' {$PBASIC 1.0}           ' humanoido July 2009
SYMBOL  result  =   B0    ' (random)Nap & Dream - a random number
SYMBOL   n      =   BIT1  ' (random) bit1 number is 0 or 1 from B0 above
SYMBOL   id     =   B1    ' pin read id number of this computer (0-126)
SYMBOL   c      =   B2    ' determined computer number (1-10)
SYMBOL   v      =   B3    ' id range value for each computer, random dreams counter
SYMBOL   h      =   B4    ' no. of heard/missed coms (never heard - was sleeping)
SYMBOL   x      =   B5    ' slush value for thinking, recycled as needed
SYMBOL  epin    =   1     ' Enumerating pin
SYMBOL  ipin    =   0     ' Rx Tx Interface pin for serial in and out
SYMBOL  ppin    =   7     ' Piezo speaker pin
SYMBOL  baud    =   N1200 ' Baud rate, inverted, n81 format

' The BS1 provides variables from B0-B13 and W0-W6. Variable Examples:
' SYMBOL  XXX         = B0   ' Bit Addressable
' SYMBOL  XXX         = B1   ' Bit addressable
' SYMBOL  XXX         = B2   ' Bit addressable
' SYMBOL  XXX         = B3   ' Bit addressable
' SYMBOL  XXX         = B4   ' Bit addressable
' SYMBOL  XXX         = B5   ' Bit addressable
' SYMBOL  avail       = B6   ' value can be 0 to 255
' SYMBOL  avail       = B7   ' value can be 0 to 255
' SYMBOL  avail       = B8   ' value can be 0 to 255
' SYMBOL  avail       = B9   ' value can be 0 to 255
' SYMBOL  XXX         = W5   ' Consumes B10 & B11
' SYMBOL GOSUB/RETURN = W6   ' Consumes B12 & B13

' When a program is first run, all variables are cleared to 0. The variables
' total to 16 bytes of RAM AND are arranged as follows:
'
' Data            Words   Bytes   Bits
' 0000 0000       PORT    PINS    PIN0 - PIN7  (PINS.0, PORT.0 - PINS.7, PORT.7)
' 0000 0000               DIRS    DIR0 - DIR7  (DIRS.0, PORT.8 - DIRS.7, PORT.15)
'
' 0000 0000       W0      B0      BIT0 - BIT7  (B0.0, W0.0 - B0.7, W0.7)
' 0000 0000               B1      BIT8 - BIT15 (B1.0, W0.8 - B1.7, W0.15)
'
' 0000 0000       W1      B2
' 0000 0000               B3
'
' 0000 0000       W2      B4
' 0000 0000               B5
'
' 0000 0000       W3      B6
' 0000 0000               B7
'
' 0000 0000       W4      B8
' 0000 0000               B9
'
' 0000 0000       W5      B10
' 0000 0000               B11
'
' 0000 0000       W6      B12
' 0000 0000               B13
'
' PORT is the I/O PORT word:
'
'        PINS AND PIN0-PIN7 are the PORT (RB) PINS (buffered to overcome the
'        READ-modify-WRITE problem).  When these variables are READ, RB is READ
'        directly.  When these variables are written to, the corresponding RAM
'        is written TO, which is then transferred TO RB before each instruction.
'
'        DIRS AND DIR0-DIR7 are the PORT (RB) direction bits: 0=INPUT, 1=OUTPUT
'        (buffered to overcome the WRITE-only nature of the TRIS registers).
'        This byte of data is transfered TO !RB before each instruction.
'
' W0-W6, B0-B13, AND BIT0-BIT15 are for general-purpose use.
' W6 (B12,B13) is used as a four-level stack if any GOSUB/RETURNs are executed.

' ************************************************************************
' PHASE II - PERSONAL INTRODUCTION    ***************
' ************************************************************************

DEBUG "Hello human! I am SEED",CR,"Artificial Intelligence Life Form ",CR,CR

' This code is loaded into all ten computers (Stamp SEED Supercomputer).

' Flowchart
' Begin Stamp Baby Supercomputer SBS
'     Each computer has an R/C circuit on pin 1 (see schematic)
'     Load one program (this program) into all 10 computers
'          Each computer: Read Pin 1 rc value using the POT command
'                scale the value into a unique computer ID
'                Remember this ID
'                Delay a time based on the unique ID
'                Send out the ID to the network after delay time
'                Each computer records all the id numbers it hears on the net
'                Remember and recall some information
'                Do some work
'                End

' Some Program Elements
'       RC circuit
'       Data logger
'       EEPROM reader
'       EEPROM writer
'       Time Scaler
'       Fuzzy Clock
'       Serial transmitter
'       Serial receiver
'       Debug Screen

' ************************************************************************
' PHASE III - SELF ENUMERATION - CRATING A SELF AWARE IDENTITY ************
' ************************************************************************

' SELF ENUMERATION
' read pot (POT PotPin, Scale, read_value), display
' LOW 1:PAUSE 2000:POT 1, 54, B1:DEBUG CLS,B1

LOW   epin       ' get id from self enumerate pin, read rc circuit = ID number
PAUSE 2000       ' cap charge & settle time on pin 1
POT   epin,54,id ' pin 1, scale, determine id, read pot (POT PotPin, Scale, read_value)

' ************************************************************************
' PHASE IV - THOUGHT MONITOR   ***************
' ************************************************************************

' The Thought Monitor allows you to peer into the computer's mind
' and view the thought process. Plug in the pc computer and
' view the thought process through the DEBUG screen. The thinking
' of each computer on the supercomputer can be viewed on at a time.
' You can listen in to each computer brain using the debug screen
' and learn what they are thinking, remembering, and what work they
' are doing at the time.

DEBUG "(Self Enumerating)",CR,"id is ",#id,CR,CR ' show on debug screen

' ************************************************************************
' PHASE V - SELF DETERMINATION   ***************
' ************************************************************************

Loop:   'Determine Computer Number - loop for all ten computer possibilities
LOOKUP c, (12,23,35,45,55,76,95,114,122,134), v ' lookup logged id range values v
c = c + 1                                       ' next range lookup address
IF id >=  v THEN Loop                           ' if id > range, try again
DEBUG "(Self Determinate)",CR,"I am computer number ",#c,CR,CR ' show computer #

' ************************************************************************
' PHASE VI - EARLY MEMORY - REMEMBERING SELF IDENTITY
' ************************************************************************

' MEMORY MAP (eeprom 85% full)
' 00              computer id     (enumerating)
' 01              computer number (deterministic)
' 02-21           other computers, alternating id & computer # (see below)

' DATALOGGING MEMORY MAP FROM 02 TO 21 (LOG SHOWN FOR COMPUTER #1 ONLY)
' MEMORY LOCATION  02  03  04  05  06  07  08  09  10  11  12  13  14  15  16  17  18  19  20  21
' DATA STORED      ID1 C1  ID2 C2  ID3 C3  ID4 C4  ID5 C5  ID6 C6  ID7 C7  ID8 C8  ID9 C9  ID10 C10

WRITE 0,id                                     ' memorize id number
WRITE 1,c                                      ' memorize computer number
READ 0,id                                      ' recall this computer's id
DEBUG "(my 1st memory)", id,CR,CR              ' show computer number is remembered
READ 1,c                                       ' recall this computer's computer number
DEBUG "(my 2nd memory)",c,CR,CR,"(Nap Dreams)" ' show computer id is remembered

' ************************************************************************
' PHASE VII - NAP
' ************************************************************************

' Nap#  Nap   Time
' 0     18    ms
' 1     36    ms
' 2     72    ms
' 3     144   ms
' 4     288   ms
' 5     576   ms
' 6     1.152 s
' 7     2.304 s

v = 0                         ' init a new counter
result = id                   ' seed pseudo random # generator with the id
Again:                        ' loop
v=v+1                         ' count the dreams
IF v=11 THEN FuzzyClock       ' do 10 dreams @@@ (based on the total # of computers)
RANDOM result                 ' randomize a byte
BRANCH n, (Dream1, Dream2)    ' go to bit 0 or 1, BRANCH value, (Case_0, Case_1, Case_2)

' ************************************************************************
' PHASE VIII - DREAM   ***************
' ************************************************************************

' The computers will dream when sleeping. Dreams are totally
' random in nature. After a while, a repeat dream may occur.
' Each computer dreams about random numbers which are shown
' on the Dreamscape monitor. Dreams may also involve machine
' poetry but we are not sure.

Dream1:                       ' begin 1st dream
NAP 0                         ' nap reduce 1ma to 25us
DEBUG CR, "Sweet ",#n,#result ' show dream & random number
GOTO Again                    ' next random dream
Dream2:                       ' begin second dream
NAP 0                         ' nap 18ms, reduce 1ma to 25us
DEBUG CR, "Dream ",#n,#result ' next random dream or end of dream, show rnd numb
GOTO Again                    ' repeat

' ************************************************************************
' PHASE IX - DEVELOPING A SENSE OF TIME (FUZZY CLOCK)
' ************************************************************************

FuzzyClock:                   ' this computer will sleep equal to c*3
x=c*3                         ' sleep formula

' IDs are 00, 17, 28, 40, 49, 70, 89, 111, 116, 128  = B0

' 00*3=0
' 17*3=51
' 28*3=84
' 40*3=120
' 49*3=147
' 70*3=210
' 89*3=44
' 111*3=55
' 116*3=80
' 128*3=64

' ************************************************************************
' PHASE X - SLEEP
' ************************************************************************

' SLEEP allows the BASIC Stamp to turn itself off, then turn back on
' after a programmed duration. The length of SLEEP can range from 2.3
' seconds to slightly over 18 hours. Power consumption is reduced to the
' amount described in the table above, assuming no loads are being driven.
' The resolution of the SLEEP instruction is 2.304 seconds. SLEEP rounds
' the specified number of seconds up to the nearest multiple of 2.304.
' For example, SLEEP 1 causes 2.3 seconds of sleep, while SLEEP 10 causes
' 11.52 seconds (5 x 2.304) of SLEEP.

' Pins retain their previous I/O directions during SLEEP. However, outputs
' are interrupted every 2.3 seconds during SLEEP due TO the way the chip
' keeps time. The alarm clock that wakes the BASIC Stamp up is called the
' watchdog timer. The watchdog is a resistor/capacitor oscillator built
' into the interpreter chip. During SLEEP, the chip periodically wakes up
' AND adjusts a counter TO determine how long it has been asleep. If it
' isn't time to wake up, the chip "hits the snooze bar" and goes back to
' sleep.

' To ensure accuracy of SLEEP intervals, the BASIC Stamp periodically
' compares the watchdog timer to the more-accurate resonator time base.
' It calculates a correction factor that it uses during SLEEP. As a result,
' longer SLEEP intervals are accurate to approximately ±1 percent. If your
' application is driving loads (sourcing or sinking current through
' OUTPUT-HIGH OR OUTPUT-LOW PINS) during SLEEP, current will be
' interrupted FOR about 18 ms when the BASIC Stamp wakes up every 2.3
' seconds. The reason is that the watchdog-timer reset that awakens the
' BASIC Stamp also causes all of the pins to switch to INPUT mode for
' approximately 18 ms. When the interpreter firmware regains control of
' the processor, it restores the I/O directions dictated by your program.

' If you plan to use END, NAP, OR SLEEP in your programs, make sure that
' your loads can tolerate these periodic power outages. The simplest
' solution is often to connect resistors HIGH OR LOW (TO +5V OR ground)
' as appropriate to ensure a continuing supply of current during the
' reset glitch.

DEBUG CR,CR,"(Sleeping)",CR   ' display sleeping mode
SLEEP x                       ' sleep its computer number in seconds
DEBUG "(wake up)",CR          ' Display clock status

' ************************************************************************
' PHASE XI - CONVERSATION - INTRODUCTION TO NEIGHBORS
' ************************************************************************

' Announce id & c to Everyone, SEND ID SO OTHERS MAY DATALOG IT
' After self delay timing, send the ID to net

SEROUT ipin,baud,("!",id,c) ' wake up, announce this computer's ID and #,
DEBUG "(talk)",CR,#id,#c,CR  ' show id & c were sent, computer 10 is last to wake,

' ************************************************************************
' PHASE XII - CONVERSATION - LISTEN TO NEIGHBORS
' ************************************************************************

' Listen for Neighbors id & c
' For example, with 3 computers:
' if c = 1   x = 1 to 2  listen for two computers  x = 1 to (3-c)
' if c = 2   x = 1 to 1  listen for one computer
' if c = 3   goto end    do not listen, this is the last computer and
'                        cannot count itself as listening to itself

' @@@ SET THE SUPERCOMPUTER'S NUMBER OF COMPUTERS IN THESE STATEMENTS!!!

v=2                           ' init the write addr, start at 2
Listen:                       ' listen to other computers speaking their id's
IF c = 10 THEN Think          ' jump if computer 10, cannot listen as sleeping @@@
x = 10 - c                    ' equation to determine looping @@@
FOR h = 1 TO x                ' do the loops
SERIN  ipin,baud,("!"),id,c   ' look at serial pin 1 for incoming id & computer #
DEBUG "(hear)",CR,#id,#c,CR   ' show received id & c
GOSUB Memorize                ' remember what you hear
NEXT                          ' next interation
GOTO Recall                   ' recall what what heard

' ************************************************************************
' PHASE XIII  - MEMORIZING THE IDENTITY OF NEIGHBORS
' ************************************************************************

Memorize:                     ' place heard computer's id and c in memory
DEBUG "(memorizing)",CR,CR    ' memorize the id and c values
WRITE v,id                    ' datalog to eeprom, v is eeprom addr = 2
v=v+1                         ' inc eeprom addr
WRITE v,c                     ' datalog to eeprom
v=v+1                         ' increment memory loc
RETURN                        ' listen again *** what happens when no more computers?

' ************************************************************************
' PHASE XIV  - LONG TERM MEMORY - RECALL IDENTITY OF NEIGHBORS
' ************************************************************************

' SET THE SUPERCOMPUTER'S NUMBER OF COMPUTERS IN THESE STATEMENTS ********

Recall:                       ' Read/display neighbors id & c
DEBUG "(recall neighbors)",CR ' screen report about remembering
v=1                           ' init mem loc
DEBUG "mem loc, id/com ",CR   ' screen report for storage location, id & computer #
Repeat:                       ' recall memory subroutine
v = v+1                       ' begin at mem loc 2
READ v,x                      ' recall v and id
DEBUG #v,#x,CR                ' display mem loc, read val
PAUSE 500                     ' slow to see screen vals
IF v>20 THEN Think            ' CHANGE THIS TO REFLECT WHICH SUPERCOMPUTER! @@@
                              ' OK TO USE 20 FOR 10 COMPUTERS
GOTO Repeat                   ' again

' ************************************************************************
' PHASE XVI - FINDING PURPOSE IN LIFE - DO WORK/THINKING
' ************************************************************************

' in its simplest form, this life form will use memory recall to indicate
' its personal computer number and its personal identity.

Think:                        ' think routine

DEBUG CR,"(Thinking)",CR       ' announce thinking
READ 1,c                       ' read computer number at loc 1
DEBUG "I am computer ",#c,CR   ' announce my computer number
READ 0,id                      ' read id at loc 0
DEBUG "My id is ",#id,CR       ' announce my id

' the life form will use memory to recall its computer number and
' determine how long it slept.

x=c*3                          ' formula for length of sleep
DEBUG "I slept  ",#x," sec",CR ' how long did I sleep?
h=10-c                         ' formula for the number of heard coms @@@
DEBUG "I heard  ",#h," com",CR ' announce # of computers heard
h=9-h                          ' formula for the number of missed coms @@@
DEBUG "I missed ",#h," com",CR ' announce computers not heard
DEBUG "I had    10 dreams ",CR ' announce computers not heard
GOTO Halt                      ' end

' ************************************************************************
' PHASE XV  - SPEAK PLAN PIEZO LANGUAGE
' ************************************************************************

' This section is for expansion using the new spinoff Piezo Language PLAN
' Note that some life forms will have the characteristics of Piezo Speech,
' while others will not. No individuals have the same voice sound. Since
' tone is directly related to personal id, computer 1 will have no voice
' while ascending computers (ranked in increasing computer numbers) will
' have increasing pitch voices. Some low tones may or may not be heard.
' It's all in the personality of the individual life form (piezo speakers
' vary in their sound, and human ears vary in their perceptibilities).

'OUTPUT 7                       ' make pin 7 output for speaker
'SOUND  7, (id, 60)             ' id = tone, 60 = duration
'INPUT  7                       ' prevent noise on speaker pin

' ************************************************************************
' PHASE XVII - END OF LIFE CYCLE - SUSPENDED ANIMATION/HIBERNATION
' ************************************************************************

' At the end of the life cycle, it goes into a kind of hibernation or
' suspended animation. It maintains a heartbeat once every 2.6 seconds.
' But, you can terminate it by turning off the power or loading in
' another program (not recommended). It's not cryogentic suspended
' animation but a similar form achieved by the electronics and software
' of this microcontroller.

Halt:
DEBUG CR,"(bye)"
END

' ************************************************************************
' SELF MODIFYING CODE     ***************
' ************************************************************************

' Self modifying code is possible in theory but not easy. In fact, it's
' frowned upon because it becomes very difficult, virtually impossible,
' to debug for one thing. And there are alternatives - that's what
' subroutines are for, and decision code. To create a 100 byte program
' that is self-modifying could require a thousand bytes of decision code
' to decide how to modify the critical 100 byte part. Constants are compiler
' directives - when you use them in your program, the value of the constant
' is plugged into the memory location. In theory, you could change a value
' in EEPROM, however finding which value to change would be difficult.

' A more simple way to have immediate success in self modifying is to
' store initialized data in an otherwise unused part of the EEPROM and
' change it as needed. Program code loads into EEPROM from the top down.
' EEPROM and WRITE commands work from the bottom up. A simple way to self
' modify EEPROM is by writing to locations using the WRITE command, and
' rewriting as necessary. It takes the least amount of code and space to
' do this - one statement per rewrite location. So we now have a simple
' way, in minimal memory and code, to successfully achieve self modifying
' code.

' ************************************************************************
' PERSONAL SICK LEAVE ***************
' ************************************************************************

' When you download a program into the BASIC Stamp 1, it is stored in the
' EEPROM starting at the highest address (255) and working towards the
' lowest address. Most programs don't use the entire EEPROM, so the lower
' portion is available for other uses. This portion is used for long term
' memories. As a result this and other effects, like a real human person,
' this artificial life form is capable of succumbing to sickness.

' PSYCHOTIC BREAKDOWN - AI memory begins at memory location 0 and works
' upward. If the memories become too much, they will fall upon code and a
' psychotic action will take place, resulting in a breakdown as the main
' program will be overwritten.

' FITFUL SLEEP - We don't know how effective sleep really is for the AI
' supercomputer as its sleep is constantly interrupted every 2.6 seconds.
' The Basic Stamp 1s output pins will toggle briefly when using SLEEP,
' NAP or END. Inside the BASIC Stamp's interpreter chip is a watchdog
' timer whose main purpose is to reset the interpreter chip if, for some
' reason, it should stop functioning properly. The SLEEP and NAP commands
' also utilize the watchdog timer to periodically, every 2.3 seconds
' "wake-up" the BASIC Stamp from its low-power mode. Upon reset, the
' I/O pins are set to inputs for approximately 18 ms before returning
' to their previous directions and states. If you have an output pin set
' to a logical 1 state (+5V) and you use the SLEEP command, every 2.3 seconds
' during sleep mode that I/O pin will switch to an input for 18 ms causing
' a momentary signal loss. This "power glitch" is easily viewable with an
' LED and a 470 ohm resister tied to an I/O pin and switched on just before
' entering sleep mode. In many cases this problem can be remedied by tying
' a pull-up or pull-down resistor to the I/O pin in question to provide
' a constant source of power should the I/O pin change directions. Allowing
' a PBASIC program to end naturally, or using the END command, will exhibit
' the same "power glitch" behavior because the interpreter chip enters
' a low-power state.
'
' SUDDEN DEATH, BRAIN AMNESIA, NONRESUSCIATING SITUATION
' Life Terminates after power off, or by running another program. If a
' 2nd program is run (or the same program run a 2nd time), it will put all
' 0s into the EEPROM, thus destroying any memories and the original identity.
' It will be useless trying to resuscitate and bring back the original
' memories.
'
' ALTERNATE IDENTITY SYNDROME - The stamp is reset causing the program to
' run again, and the birthing process takes place and a different identity
' emerges.
'
' STROKE - The stamp is reset or repowered. It tries to communicate with
' other stamps but it is not in sync and the serial command hangs.
' It is unable to reply or do anything at this point.
'
' STUTTERING - Battery low causing short term repeating system resets