Automatic modular design of robot swarms using behavior trees as a control architecture