We can form instant groups from students who sit in the same row. Some groups formed in this manner may be smarter than others, but over a whole course, such inequalities are likely to even out. Besides, nothing much hinges on how well any one group works. If the group is to last longer, we need to be more sophisticated. Each student tallies up his or her own total of these properties.
All students then line up around the circumference of the classroom in order of their total tallies.
I have the students number themselves off from 1 to the number of groups to be formed. All students calling out a 1 are in group 1, those calling out a 2 are in group 2, and so on. They then meet in their groups and introduce themselves to each other, and the groups are formed. It is all done in, at most, twenty minutes, and by an open process that everybody understands. Long before the groups are formed, we, as course designers, have to decide just what role the groups are to play in the course.