Author Topic: Evolve II  (Read 2955 times)

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
Evolve II
« on: April 07, 2010, 11:57:36 AM »
This bot is opportunistic, it tries to shoot.
But each missed shot counts as a bad shot.
To much bad shots or pain, result in a fixed pos and later later even a turn away.
Based on that the following behaviors could be seen :

  • It will not endlessly hunt to fast bots, it gives up after a while (give up
  • It will not circulate around a veggy forever (fixpos re-orientate and attack
  • Hard to get targets will not be hunt forever (give up

its not the greatest danger this bot, but its i think an intresting behaviour bot.
Also the reproduction isnt that complex, i was mainly designing a bot that wouldnt circle around forever and that had some kind of gain and pain system, on which it acted.


Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
Evolve II
« Reply #1 on: April 08, 2010, 12:00:34 PM »
Slightly improved... but what a difference it beats my strong bot called w6 now.

Improvement is in the repro system, it gets multiple offsprings first one, in later cycles more..
Hmm you got to see it in actioin, i think.


Also the boesnt use any dirty trick, no poison, no virus, ...  no tricky shots, doesnt even release its own waste...
Its nice to see with other bots, as larger bots will in the end get balanced to produce ofspring more.



[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'Évolve  II b
'
'(improved repro system)
'
' Gain or pain >> eat or not, and always shoot target

' the nice thing about this bot is that it tries to shoot
' But each shot increases a counter also pain increases this counter
' To much of this and it does a fixpos or turn  (first fixpos later turn)
'
' The repro system lets young bots escape, from parent
' And also when it ages it gets more ofspring at once.
'
'

' simple repro gene more advances 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 wait 66

'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

*.wait sgn 1 add sgn .temp store
'-30    -1    0
'  0     0    1
'  4     1    2


-32 *.eye5 div .shootval store
-1 .shoot store


*.refxpos *.refypos angle .setaim store
-1 *.temp mult .shoot store
 
0 .fixpos store

 'positive longer
 'negative smaller



'after shooting move
*.refvelup 20 add *.temp mult .up store
*.refveldx 7 div *.temp mult .dx store
*.wait 1 add .wait store

'____________________________________________________________________________
___
' pain is more then gain counts as 1 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
*.wait 1 add .wait store
stop


cond
*.nrg 32000 mod 0 =
*.mass 5 mod 2 >
start
1 .repro store
-700 .aimdx store
10 .strbody store
10 .mkshell store
-40 .wait 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
'5                  0    1   1
'10                 1    2

*.robage 20 sub 0 floor 9 mult .aimdx store
'
'
'
1 .strbody store
stop

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Evolve II
« Reply #2 on: April 30, 2014, 01:53:29 PM »
Sorry, topic in wrong format. Moving to untagged.