' A Family 2
' Very adaptable bot capable of finding decent basic values and then sharing them
' Bot can be used successfully in a variety of sims since it isn't locked into a mold
' Recommended to use higher initial population levels
' Reliance on Epigenetic values seem to help prevent spread of cannibotism
' Endy
cond
start
'Turns
314 4 mult rnd 971 store
' Velocity
30 rnd 972 store
' Repro level
5000 rnd 973 store
' Reproduction Percent
20 30 rnd add 974 store
'Cycles
975 inc
.delgene inc
stop
' Above Gene dels first cycle after setting intitial values
' Below is for tracking others' epigenetic values
cond
*.robage 0 =
start
60 4 rnd add inc
971 *61 mult
972 *62 mult add
973 *63 mult add
974 *64 mult add
.memloc store
stop
' Combination Cycle Timer and Reset function
cond
start
975 *975 dup div mult inc
51 *51 dup div mult dec
52 *52 dup div mult dec
stop
' Complex Zone Ahead
' Selected memory location value is compared with bot's own value for location
' Based on difference bot will inc or dec it's own value
' Cycle Timer *975 is used to tell when enough initial time has passed for the worst
' used of the epigenetic values to have died off
cond
*975 3000 >
start
*971 *61 mult
*972 *62 mult add
*973 *63 mult add
*974 *64 mult add
*.memval sub *.memval dup div mult sqr 51 mult inc
*971 *61 mult
*972 *62 mult add
*973 *63 mult add
*974 *64 mult add
*.memval sub *.memval dup div mult sgn -52 mult inc
*.memloc *51 mult inc
*.memloc *52 mult dec
stop
' Extremly good (but not perfect) conspec attack avoidance gene
cond
*.eye5 30 >
start
-2
*.refeye *.myeye sub sgn abs add
.shoot
*.refeye *.myeye sub sgn abs mult
store
stop
' If any of bot's values are zero and the robage greater than the receiving age
' The bot will select new ones
cond
*.robage 60 >
start
314 4 mult rnd 971 *971 dup div 1 sub -1 mult mult store
30 rnd 972 *972 dup div 1 sub -1 mult mult store
4900 rnd 100 add 973 *973 dup div 1 sub -1 mult mult store
20 30 rnd add 974 *974 dup div 1 sub -1 mult mult store
stop
cond
*.eye5 0 =
*.refeye *.myeye =
or
start
*971 rnd .aimdx store
stop
cond
*.refeye *.myeye !=
*.eye5 0 >
*.vel *972 <
start
*972 *.vel sub 2 div .up store
stop
cond
*.nrg *973 >
start
*974 .repro store
*971 rnd .aimdx store
stop
end