[ODE] Combining (low-level) physical simulation and (high-level) AI/user control (long text :-)

Tyler Streeter tylerstreeter at gmail.com
Sat Feb 5 12:34:23 MST 2005

> Although I cannot believe that the idea is totally new, I havn't yet seen it in any PC game. Normally, computer
> games restrict the possible motions of their characters to a very limited set of pre-defined animations. Even
> games that are quite fond of their physic engines (like HalfLife2) simulate physical influence only to lifeless
> bodies, thus avoiding the problem of combining simulation results with an intendet target posture. 

That's because it's really hard to give physically simulated
characters intelligent motor control.  Ragdolls, on the other hand,
are pretty easy since they don't need any motor control.

> Now I'm kind of mentally stuck since all I managed to come up with are the following two ideas:
> 1. Pure simulation:
> Letting the character's posture completely to the physics engine. This would surely produce good results as to
> the reaction to external influences (like the oppontents weapon). On the other hand, it requires that the motion
> control works only by applying forces to the simulated body parts (thus simulating the muscles). There, some kind
> of AI is required that translates the players input into muscle stimuli. I can imagine that it is difficult to
> keep a human upright against gravity just by applying muscle forces, let alone to have him moving around at the
> same time as being punched by an enemy at the same time as wielding his own weapon. I guess this is a very hard
> AI task.
> 2. The string puppet aproach:
> One could play pre-recorded animation. But instead of directly playing it on the character body, it is played on
> an invisible double (the "puppet master"). At the same time, there exists a characters body that is e.g.
> simulated by ODE. The simulated body is then attached to the puppet master by joints with some "spring"
> behaviour, i.e. the ODE body is dragged around by the puppet master, thus inducing the animation into the ODE
> body. Now, if external forces add to this, the ODE body parts are no longer able to follow the animation (since
> the springs are not stong enough to attract them "at all costs") and the springs will somehow "break", switching
> the body into pure simulation when it falls.
> Problem here is: when/how will the body ever be re-attached to the animation double? And wouldn't it behave
> rather strangely, one second having elf-like elegance, the next moment behaving like a rag doll?

I think the first approach would be best for AI characters (NPCs). 
For NPCs, though, there is a variety of ways to attempt this.  This is
currently an active area of research.  Here are a few links:

* Natural Motion (www.naturalmotion.com): This company uses genetic
algorithms (at least they did at first; don't know if they still
are...) to optimize neural networks to perform specific tasks.  They
use these trained neural networks ("behaviors") in a character
animation tool called Endorphin.  Also search for papers by Reil,
Massey, and Husbands on evolved neural networks.

* Russ Smith's PhD thesis (http://q12.org/phd.html): For one of his
experiments he uses his artificial cerebellum to control a humanoid

* Demetri Terzopolous
(http://www.mrl.nyu.edu/~dt/papers/siggraph01/siggraph01.pdf): Another
  motor control technique.

* http://www.droidlogic.com : Also uses genetic algorithms and neural
networks.  Cool videos.

* Autonomous Virtual Humans project
(http://www.vrac.iastate.edu/~streeter/avh/avh.html): A project I
worked on a year ago, using genetic algorithms and neural networks to
generate simple standing, jumping, and walking behaviors for simulated

I'm not sure if using genetic algorithms for training/optimization is
the best method for more complex behaviors.  Lately I've been
researching other learning techniques (e.g. temporal difference
learning, see Reinforcement Learning by Sutton & Barto) that seem more
biologically plausible (see papers by Wolfram Schultz on reward
signals in the brain).

I hope that gives you some pointers on the AI control side.  For human
control, it might be difficult to translate human input to motor
signals for each muscle using your first technique.  Maybe others have
some ideas.


More information about the ODE mailing list