Microorganisms are capable of communication and cooperation to perform social activities. Cooperation can be enforced using kind discrimination mechanisms in which individuals preferentially help or punish others, depending on genetic relatedness only at certain loci. In the filamentous fungus Neurospora crassa, genetically identical asexual spores (germlings) communicate and fuse in a highly regulated process, which is associated with fitness benefits during colony establishment. Recognition and chemotropic interactions between isogenic germlings requires oscillation of the mitogen-activated protein kinase (MAPK) signal transduction protein complex (NRC-1, MEK-2, MAK-2, and the scaffold protein HAM-5) to specialized cell fusion structures termed conidial anastomosis tubes. Using a population of 110 wild N. crassa isolates, we investigated germling fusion between genetically unrelated individuals and discovered that chemotropic interactions are regulated by kind discrimination. Distinct communication groups were identified, in which germlings within one communication group interacted at high frequency, while germlings from different communication groups avoided each other. Bulk segregant analysis followed by whole genome resequencing identified three linked genes (doc-1, doc-2, and doc-3), which were associated with communication group phenotype. Alleles at doc-1, doc-2, and doc-3 fell into five haplotypes that showed transspecies polymorphism. Swapping doc-1 and doc-2 alleles from different communication group strains was necessary and sufficient to confer communication group affiliation. During chemotropic interactions, DOC-1 oscillated with MAK-2 to the tips of conidial anastomosis tubes, while DOC-2 was statically localized to the plasma membrane. Our data indicate that doc-1, doc-2, and doc-3 function as "greenbeard" genes, involved in mediating long-distance kind recognition that involves actively searching for one's own type, resulting in cooperation between non-genealogical relatives. Our findings serve as a basis for investigations into the mechanisms associated with attraction, fusion, and kind recognition in other eukaryotic species.