In spatially structured microbial communities, clonal growth of stationary cells passively generates clusters of related cells. This can lead to stable cooperation without the need for recognition mechanisms. However, recent research suggests that some biofilm-forming microbes may have mechanisms of kin recognition. To explore this unexpected observation, we studied the effects of different types of cooperation in a microbial colony using spatially explicit, agent-based simulations of two interacting strains. We found scenarios that favor a form of kin recognition in spatially structured microbial communities. In the presence of a ″cheater″ strain, strains with greenbeard cooperation were able to increase in frequency more than obligate cooperators. This effect was most noticeable in high density colonies and when the cooperators were not as abundant as the cheaters. We also studied whether a polychromatic greenbeard, in which cells only cooperate with their own type, could provide a numerical benefit beyond a simple, binary greenbeard. We found the greatest benefit to a polychromatic greenbeard when cooperation is highly effective. These results suggest that in some ecological scenarios, recognition mechanisms may be beneficial even in spatially structured communities.