basically my evolve series of bots use simple 'feelings', it is not neural programming.
Still it does result in intresting behaviour, in the first series evolve-2 the aiming was simple
So you cold spot this behaviour easily.
But i write it down in normal english, this bot shoots a bit longer shots (actually based on distance).
But every shot costs him something, the cost is reset when nothing is in eye5 (so the move gene runs)
If the eye5 gene is not running then the move gene is running
The move gene resets the missed shots (you could also write it to count them down).
Back to the eye5 gene, if there are to many shots missed then it will perform a fixpos, and if even more shots are missed then it turns away from this difficult to get prey.
Also while in gene5 execution if it was under pain, then that counted for 3 shots (which is i think a bit low, but well that's easily changeable).
Later bots evolve series had better aiming techniques but still sometimes made use of the fixpos, or of the givingup option tricks.
As a result of that behaviour the bots didnt endlessly shoot at bots they cant get, they stop the hunt after a while.
the better aiming was gained by also moving like
*.refdx 2 div .dx store besides the
.up moves.
the code is an early version without the .dx adjustments
So its better to spot this behaviour, SIM sohuld be F1 no friction (so we get aiming problems for this bot).
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'Évolve II
'
'Advanced shooting and aiming
'
'mainly 2 gene bot with new mechinisms
'
' Gain or pain >> eat or not, and always shoot target if insight
' simple repro gene more advaces will be added later
' first other parts need to be tuned. (gain pain mechanics)
'
def direction 52
def etarget 53
def eyetemp 54 'left or right or not (1|-1|0)
def shootnow 55
def shootdist 56
def temp 60
def pleased 61
def borring 62
def missed 63
def detect 64
def nogain 65
def sneaky
'GENE EAT ============================================
'
'Note this bot always tries to eat
'It checks (still to improve) if eating was succesfull
'Is it a Gain or Pain ?
'So it wont keep shooting runing & spinning, if its out of reach
'Or if it doesnt contain enough food.
cond
*.robage 30 >
*.eye5 0 >
' *.in1 *.reproval !%=
' *.in2 *.bigsmall !%=
' *.refeye *.myeye !=
start
'
'*.refxpos *.refypos dist .edist store
'*.eye5 30 sub sgn 1 add sgn .shootnow store
-32 *.eye5 div .shootval store
-1 .shoot store
*.sx 2 div .dx store
*.refxpos *.refypos angle .setaim store
-1 .shoot store
0 .fixpos store
'positive longer
'negative smaller
'after shooting move
*.refvelup 20 add .up store
'____________________________________________________________________________
___
' pain is more then gain counts as 3 times missed.
..
*.pain *.pleas sub sgn 1 add sgn 1 sub abs 3 mult *.missed add .missed store
' 0 0 0 0 1 1 0 0 0
' 7 0 -7 -1 0 0 -1 1 3
' 0 7 7 1 2 1 0 0 0
'no pain no gain missed + 1
*.pain sgn 1 sub abs .nogain store
*.please sgn 1 sub abs *.nogain add sgn *.missed add .missed store
'out of reach tried long enough now (150..??) .....
*.missed 150 mod sgn 1 sub -628 mult .aimdx store
*.missed 150 mod sgn 1 sub -1 mult .fixpos store
'____________________________________________________________________________
___
stop
'GENE MOVE====================================================================
cond
*.eye5 0 =
*.robage 30 >
start
*.eye9 *.eye1 sub sgn .eyetemp store
*.eyetemp 130 mult .aimdx store
*.eyetemp abs -1 add abs 5 mult .up store
*.eyetemp abs -1 add *.mass mult .dn store
*.dx -2 div .dx store
10 .up store
'if eye eye4 or 6 see something fixpos turn
*.eye6 *.eye4 sub sgn .borring store
*.borring 35 mult .aimdx store
*.eye6 *.eye4 add sgn abs .fixpos store
*.pain 1 sub abs .pain store
*.eyetemp abs .detect store
*.borring abs *.detect add sgn .detect store
*.detect *.missed mult .missed store
0 .sneaky store
stop
cond
*.nrg 30000 >
start
10 .repro store
-700 .aimdx store
7 .strbody store
11 .mkshell store
stop
cond
*.robage 30 <
start
*.tiepres .deltie store
500 .dx store
*.robage 5 sub sgn 1 add sgn 500 mult .dn store
' 1 -1 0 0 0
' 5 0 1 1 500
' 10 1 2 1 500
1 .aimdx store
1 .strbody store
stop
cond
*.body *.refbody <
*.refeye *.myeye !=
*.sneaky 0 =
start
.repro .shoot store
50 .shootval store
stop
I know its a real old topic, but since i just made them (just a week ago)
And it answers this post i thought lets post it, its a basic principle, and could be used in other more advanced bots too
So if someone else gets into this thread he would get an answer.
(i came here looking for neuron based bots)