This is not guaranteed but I think it should work to always try and get a sexual reproduction every 500 cycles. I crammed it into one gene but if you replace the starts with conds, ''' with starts, and the '''''''''' with stops it would work the same:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']def sexreprocalled 61 'remember defs go at the top
def reprocalled 62
cond
start
*.nrg 7500 <
*.timer 430 >= and 'gives it some time to try and sexually reproduce, adjust as necessary
*.refeye *.myeye = and 'if I see a bot of the same species try to get it fertilized
'''
-8 .shoot store
'''''''''' 'essentially a new gene
*.fertilized 0 !=
*.sexreprocalled 1 != and
'''
50 .sexrepro store
1 .sexreprocalled store
''''''''''
*.nrg 7500 >
*.timer 500 >=
'''
50 .repro store
1 .reprocalled store
''''''''''
*.sexreprocalled 0 !=
*.reprocalled 0 != or
*.timer 500 >= and
'''
0 .sexreprocalled store
0 .reprocalled store
0 .timer store
stop
edit: If you want it to still reproduce if below 7500 and didnt sexually reproduce you can check against .sexreprocalled and .reprocalled and use .repro, with that you will always reproduce every 500th cycle.
So that should work, might not be the slickest way but oh well.