Its Auto-Defined Obstacle Avoidance Attribute -- A Learning Algorithm for the Simulation