Showing posts with label artificial life. Show all posts
Showing posts with label artificial life. Show all posts

Tuesday, January 13, 2009

Her Stroke of Insight

In the later part of last year, I was working on improving my presentation skills. I was reading about presentations and great presenting. I cannot remember if it was Guy Kawasaki or a talk on Presentation Zen
by Garr Reynolds. Guy turned me on to Garr and an author's talk he did at Google on Presentation Zen. Along the way, several people have also pointed me towards TED (Technology, Innovation, Design). One of the best talks that I have watched on TED was "My Stroke of Insight" by Jill Bolte Taylor:


After watching this presentation, I purchased and read the book under the same name, My Stroke of Insight: A Brain Scientist's Personal Journey. She has turned something that most people would find very crippling into a source of knowledge and strength. Along the way, she also used her education as a brain researcher to help gain better understanding about how the brain works. I find this particularly interesting.

She found out how hard it is to build a plan and stick to it when the narrator in the brain is not working. When your inner voice, that helps plot and plan, is no longer available. This would be a lot like how my Artificial Life forms live. I am not yet sure how to incorporate that inner voice into my creatures, but wow, it would be great to have them.

Right now, without that narrative, my creatures are living in the moment. At each moment, they need to make a plan, analyze the situation, and take a course of action. At the next moment, they don't really have much information about the plan that they were following previously. There are some clues, but they are pretty weak.

One thing I picked up from the book is the length of time for a physiological response. After something happens or you first become aware of it, your body physically responds for a bout 90 seconds. You are afraid, or angry, or happy, or whatever for 90 seconds. After that period, you can choose your reaction again. You can choose how you feel. You can ignore your initial physical reaction to something for 90 seconds and then it gets easier. This is very good to keep in mind when your child does something particularly harsh or someone does something that sets you off for some reason. Just wait 90 seconds, pretend it is all good, and in 90 seconds, it will be easier to let it go. I have used this insight to get past some really painful or frustrating things, and also to help change what I think about.

Jill described telling her brain something on the order of "yes, that is very nice, we are going to stop having that kind of thought now" and having it work. I have had a decent amount of success with this technique. Why did it take reading a book about someone's experience during and recovering from partial brain death for me to consider talking to my brain? I know it sounds weird, but have you tried it? Ask your brain to do something or not do something. Really ask it. You might be surprised.

Another thing that I found really scary was Jill's description of what it was like to be in the hospital after a stroke. She wanted people to speak slowly and quietly. She needed a lot of time to form a response to a question. The doctors or nurses ended up thinking that she was incapable due to her reaction to bright lights and loud questions or the amount of time it took her to come up with a response.

It still amazes me how adaptive a human body and human brain are. She lost a lot. By working on getting back pieces and stretching a little bit more each day, she gained a lot of it back. Yes, in the end, she is not the same person. But, if she had listened to common wisdom, she would have been an invalid for life with never expanding horizons. Believe in what your body and brain can do. Give them a chance.

To Jill, who went through a massive breakdown and turned it into genius: Thank You!

Jacob

Saturday, November 22, 2008

Building Life Part 1 (Withdrawal...)

I think I am experiencing withdrawal from PHP|Works and Py|Works. I had a great time in Atlanta. I was able to see lots of great people, spend time looking at at thinking about things I love, give a talk on AI and Artificial Life, and spend time working on my Artificial Life project.

A few months ago, I decided, on suggestion of Travis Swicegood, to revive my Artificial Life project of evolving group hunting and group defense among artificial life forms. This project was an excellent learning opportunity and I achieved most of the results that I set out to do. It started out very simply. I created a world with plants and added prey. I hand coded the prey so that they would be able to use antenna (a smell based system where smell decreased proportionally with the distance squared) to get to the plants near them and eat. This worked relatively well. Now to bring on the competition.

I started with simple predators that were the same model as the prey, but were following the "prey" antenna instead of the plant antenna. In my model, each pair of antenna would give information on only one scent. In order to handle multiple scents, the system would have multiple sets of antenna. Now I had predators hunting prey that were hunting plants. My world was charging creatures for each time slice, how far they moved, and how much they turned. The predators were able to keep alive for only a little while before they ran out of juice.

Now was time to add evolution into my "evolving group hunting and defense" project. I created a simple neural network, gave it nice high-level inputs and had it output neurons for speed (high, medium, stop) and turning (left, center, right). Remember that the predators were not living too long at this point. The very first time that I ran the evolving predators from a random start, the second generation did not die. One of the predators lived so long and ate so many prey that it actually wrapped the health counter to a negative number while the debugger was attached. Ouch. So much for my hand coded algorithm. At this point, the game was really on. I quickly modified the creatures to have a maximum lifetime and health count. No more infinite life or infinite energy. It also ensured that a trial would run for a maximum of around 37,500 clock ticks. Prey and predators were switched to evolving neural networks and physiology and were never switched back.

I have had several questions from people about how I managed plant populations and generations of predators and prey. Plants are replaced as needed to keep the population steady after every move cycle. Plants are centered on one of the four quadrants randomly chosen with a random distance (there is a multiplier that can be adjusted to make them more or less clustered). Prey and Predators have a similar methodology for being replaced. Once an entire generation of prey or predators are dead, a lottery is held. Each creature starts out with one lottery ticket, just for being alive. For each point of health that they have consumed in their lifetime, they get an extra ticket. This means that even completely ineffective creatures may have the ability to breed. It also means that you have to finish an entire generation before you can get more food. A single prey off in the corner can make it pretty hard for the predators to eat.

Jacob

Monday, September 22, 2008

Contemplating Artificial Life...

I have long had a fascination with Artificial Life. My master's thesis at UCLA was evolving pack hunting and pack defense in artificial life forms. I thought it was an interesting project and it went well. I was quite surprised by the variety and completeness of the forms of hunting and defense that very simple organisms were capable of displaying. I was able to get my artificial life forms to display all of the kinds of hunting that were in a book on predatory behavior. My thesis was a parallel program written in C++. I am currently starting to port it to Python and I am going to present a talk on it at Py|Works "Exploring Artificial Intelligence with Python" . I hope that some of you can make it.

My ideal outcome would be to leverage my research and that of others to produce better, deeper, more realistic, and ultimately more fun creatures for games and education. Knowing how easy it is to evolve and/or run simple creatures that behave in amazing ways, I am constantly disappointed in the creatures that are out there in games today. I am also looking for people that would be interested in joining me in this pursuit. Do you love AI or online games? Would you love to make them better?

Let me know,
Jacob Taylor