A New Architecture Based on a Simulation Environment for Four Legged and Humanoid Robots