For this project, I assume that the way that human walking is the best way to move and keep balance. Unity has its physical engine, therefore the rigged walking character would fall down if lose balance. For Nature of Code final, I am going to use genetic algorithm to get the best and most natural way of human movement.

Here I set 40 frame circle of left hands and leg and right side will start at 20th frame. Every frame contains rotation of joints.

Fitness is evaluated by the time of duration.

Crossover: I randomly pick the first part from mom’s genes and rest part from dad’s. But this is a very bad crossover idea. Because every frame is generated randomly, so the parents might start with different walking circles or have different walking periods.

Unfortunately, with everything random, it may take months or years to get involve. And more importantly, two good selections may start their movement at a different point. For example, if one start at “Down” point and another start at “Up”, they would get a bad child —- which would fall down immediately.

So I change my walking circle value. All the value here would have basic value add a random value. So for the good fitness one, it won’t crossover with another good one but with different start point.

Now, only 21 generation, we got some really good character that can keep walking and keep balance. But it still doesn’t look like the way we walk.

Leave a Reply

Your email address will not be published. Required fields are marked *