in my daydream ideas about evolutionary programming, if I want individuals to be able to distinguish genetically related others from those that are further genetically removed, I always feel that giving them a special sensory input for "genetic similarity of target organism" is kind of like cheating.
My idea would be to give them a set of LFO's in a bunch of genetically determined frequencies. The sensory input would not determine genetic similarity, but the correlation of an organism's set of LFO's with the target organism. This also gives non-related strains the option of "faking" the similarity, kind of like mimicry, and it gives organisms the option of genetically controlling their similarity [as they don't have to change their LFO frequencies if they evolve a couple of generations away from the main species, but they might find it beneficial do to so, or maybe the main species finds this]
It doesn't have to be LFO's either, it can just be a sequence of numbers, but in my idea the oscillators can also be used to control certain bodily functions, so they are not just flags.