Kids should work in groups on 1-3. Any more than 3, and some students will muck around and be non-productive
Random groups work well, especially when it is early on in their robotics experience, but usually kids prefer to choose their groups.
It's good to change groups for each project. If kids know the groups have to change for each project, then they cooperate better with those students who lack social skills.