'by Shadowgod2
'first parent to child NNet pass down working
'2 input per neuron
'1 in 10000 chance to change/mutate each neuron aspect

'start nnet


cond
*.robage 9 <
*.robage 0 >
start
5 rnd 995 add *51 store
6 rnd 3 sub *52 store
51 inc
52 inc
stop

cond
*.robage 5 <
*.robage 0 >
start
6 rnd 3 sub *53 store
53 inc
stop

cond
*.robage 8 >
start
1 .delgene store
stop

'birth mutations

cond
*.robage 0 =
start
971 51 store
979 52 store
987 53 store
10000 50 store
stop

cond
*.robage 15 >
*.robage 21 <=
start
5 rnd 995 add *51 1 *50 rnd sub 0 floor mult store
*52 * 6 rnd 3 sub add *52 1 *.mut rnd sub 0 floor mult store
51 inc
52 inc
stop

cond
*.robage 15 >
*.robage 19 <=
start
*53 * 6 rnd 3 sub add *53 1 *.mut rnd sub 0 floor mult store
53 inc
stop

'input

cond
*.robage 21 >
*.numties 0 =
start
*.eye5 995 store
*.refeye *.myeye sub 996 store
stop

'invisable

cond
*.numties 0 =
*.robage 21 >
start
*971 * *979 mult *972 * *980 mult add *987 add 997 store
*973 * *981 mult *974 * *982 mult add *988 add 998 store
*975 * *983 mult *976 * *984 mult add *989 add 999 store
*977 * *985 mult *978 * *986 mult add *990 add 1000 store
stop

'output

cond
*.numties 0 =
*.robage 21 >
*1000 *990 >
start
-1 .shoot store
stop


cond
*.numties 0 =
*.robage 21 >
*998 5 sub *989 >
start
*999 5 sub -60 floor 60 ceil .up store
stop

cond
*.numties 0 =
*.robage 21 >
*998 5 add *989 <
start
*998 5 add -60 floor 60 ceil .aimsx store
stop

cond
*.numties 0 =
*.robage 21 >
*.nrg 5000 >
*.body 5000 >
start
50 .repro store
stop

cond
*.numties 0 >
start
1 .fixpos store
stop

cond
*.numties 0 =
*.fixpos 0 !=
start
0 .fixpos store
stop
