Thursday, May 03, 2007

chimera genetics

I've flipped to my AI project for a bit after being frustrated by the nvidia bug. Yes, it's been a week with no progress on it.

Chimera, for those who haven't seen this working name before, is a PySoy extension module for "pet" AI which can be used in any game supporting the module (so your same pet can be in any game supporting Chimera).

It started over a year ago for Soya and, like PySoy, has been rewritten several times over. Originally it was to be akin to Pokemon, except open, so you could have virtually anything you could imagine. This had two main drawbacks; lack of "breed-ability" and extremely complex cerebellum AI required to "learn" how to move and effect it's environment.

The latter real-world animals have as instinct. Baby horses are walking within hours of birth, baby birds try to fly as soon as their bodies are able, baby mammals feed from mother's teat without external prompting, and despite language barriers all us humans use the same emotional expressions to communicate ideas (smiling, laughter, etc). In order to give this leg-up Chimera need to be based on the same base model; ie, all bipedal or quadrupedal, same senses, etc.

So the new goal is for Chimera to be of the same species and a sort of "genetic code", not DNA but an array of floats which can be mixed for offspring and random mutations allowing for surprising outcomes. Since some instinct (ie, how to walk) should fit the breed this becomes genetic as well, the parameters for how to walk being an example of behavior passed parent to child. Genetics only provide the base for behavior, each individual chimera will develop based on their own experiences. In real world biology this is called it's phenotype.

Using the walking example again, this means a baby chimera will get a small advantage from walking parameters combined with their leg parameters. It won't be perfect, but they'll likely be able to stand on their own and improve over time. The "play" associated with improving will likely be entertaining for players as well.

The current model includes 5 body-type morphs for running, climbing, flying, digging, and swimming, all quadruped (the flying type is more akin to a flying squirrel). It's best described as a squirrel or cat, small and able to sit on a shoulder. I hope to have procedurally created textures based on the genetic code for different patterned coats, each unique.

No comments: