There are many studies on hardware and software experiments to control a modular robot. The modular robot consists of homogeneous or heterogeneous simple modules. A feature of them is that the modular robot behavior obtained by an each module movement is based on local communications between linked modules. This study focuses on a computer simulation for a virtual modular robot obeying physics laws. This simulation aims at achieving given tasks autonomously for the virtual modular robot in specific circumstances. Our goal is to acquire a control system in evolution for the virtual modular robot and to analyze and evaluate their behavior.