'by PeterB
' A simple bot capeable of aiming at a target (just a bit, but thats enough)
' Able to reproduce for a regular stable growing population
' Builds up a shell and using slime and removes any tie's
' It does do good between algey, or simple enemies, as its a simple enemy itself
' It was a study for simple bot eyes with not to complex math.

cond

start

' storing the default for the program makes them a better target for genetics mutations.
' whoehahaha (evil grin of carbon based god )











' dont get distracted to much if we have something in sight
' by limiting som eyes to not react if eye5 has visual contact.
'z = (eyex-eyex div)
'
'Z - eye5 sgn -1 sgn +1
'0 - 0 0 -1 -1 0
'1 - 0 1 0 0 1
'1 - 30 -1 -2 -1 0
'0 - 30 -1 -2 -1 0

*.eye1 *.eye1 div *.eye5 sub sgn 1 sub sgn 1 add 35 mult .aimsx store
*.eye2 *.eye2 div *.eye5 sub sgn 1 sub sgn 1 add 35 mult .aimsx store
*.eye3 *.eye3 div 50 mult .aimsx store
*.eye4 *.eye4 div 50 mult .aimsx store
*.eye6 *.eye6 div 50 mult .aimdx store
*.eye7 *.eye7 div 50 mult .aimdx store
*.eye8 *.eye8 div *.eye5 sub sgn 1 sub sgn 1 add 35 mult .aimdx store
*.eye9 *.eye9 div *.eye5 sub sgn 1 sub sgn 1 add 35 mult .aimdx store


*.eye5 -8 div 10 add .up store

*.eye3 *.eye3 div 1 mult .dx store
*.eye4 *.eye4 div 1 mult .dx store

'brakes when something is insight
*.eye5 *.eye5 div 10 mult .dn store

'shoot (it does shoot a bit early, oh well it still survives..)
*.eye5 50 sub sgn -1 mult .shoot store
'*.eye5 *.eye5 div -6 mult .shoot store


*.robage sgn 1 sub sgn -30 sum .dn store
*.robage sgn 1 sub sgn -30 sum .aimsx store

*.nrg 25000 sub sgn 1 add sgn 85 mult .mrepro store
*.nrg 25000 sub sgn 1 add sgn 385 mult .aimsx store

*.nrg 100 mod sgn 1 sub sgn -2 mult .mkshell store
*.nrg 100 mod sgn 1 sub sgn -5 mult .mkslime store
*.nrg 200 mod sgn 1 sub sgn -50 mult .strbody store

.tie store

stop
