SummaryAfter mating, queens of social wasp and ant species sometimes band together to start a new colony cooperatively. I assume these queens sequentially encounter potential nest sites that may or may not already contain a queen. Whether to remain at a given site or to leave in hopes of finding a better site is modelled using dynamic programming. The results suggest that discriminating competitive ability is more valuable than discriminating kinship. Wasps, which have a high survival rate in transitions between nest site encounters and in which pleometrosis seems to have a consistently high benefit, are predicted to discrirhinatc both competitive ability and kinship of potential partners. Ants, which have lower survivorship and variable benefits, are predicted to show conditional joining behavior (sometimes based on discriminating competitive ability, but almost never based on discriminating kinship). A survey of the litcrature supports the model with respect to the predictions on kin discrimination in both groups and on conditional joining behavior in ants. However, whether partners are joined based on perceptions of competitive ability needs more tests.