Physical Simulation

Making the actions count 

Home

Genetic Algorithm Development

Application of Gene to Behavior

Robot Simulation

Download Files

Team Members

Links

Contact

Blog

The robot simulation was written using a slightly modified python class-based wrapper of the Open Dynamics Engine (http://www.ode.org).  Also, the graphics (which can be turned off via "quiet mode" for more efficient runs) are implemented using vPython.  Overall, the physical simulation was designed so that the quantity of inputs were not unmanageable by our algorithm, but also so that there were enough different possibilities that it did not become trivial.  Therefore, the robots were modelling using real phyics, with variable position, speed, etc.  Currently, the robots are positioned on a sliding joint with stops to prevent running away too far and to prevent colliding; the shoulders have universal joints, and the elbows have hinge joints.  Collision detection (using collision detection from PyODE) has been implemented between all parts of each robot, to create a more accurate simulation.

Each robot also has a "low" block and punch, as well as a "high" block and punch.  The code allows simple changing of the parameters of these blocks and punches (in case it is intended that the genetic algorithm affects "how" you punch, and not just "when"), as well as adding new punches for more complicated evolution.  Left and right arm actions are built to be symettrical to code for; overall, the physical sim was built to be easily expandable.

Finally, energy and health bars have been implemented such that moving and punching take away energy, which slowly returns over time, and hit points are decreased when a robot is hit in the head or torso.