Author Topic: Fruit Flies v0.21 (F1) (Moonfisher) 28-09-08  (Read 3489 times)

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Fruit Flies v0.21 (F1) (Moonfisher) 28-09-08
« on: September 28, 2008, 10:12:08 AM »
Ok this time it beats the old version  A litle bit longer, but not realy more complex or anything.

Code: [Select]
'Fruit Flies v0.21 (for DB2.43.1L)
'By Moonfisher : 28-09-08
'A very simple tie feeder for F1.
'Beats EtchII and everything else I've tried it on so far. So it should beat the current F1 league I think.
'The reproduction gene is capped at 1000, if it's still too slow try 700, although that could change the results.
'No fancy eyes or conspec or anything of that sort, just a very simple strategy.
'v0.2 : Now addapts to it's oponent through natural selection.
'It also beats most oponents a lot faster, but has a slightly harder time beating Etch II.
'It's also now one gene and generaly shorter, planning to use it as a virus for an alge.
'v0.21 : Now beats v0.1

def maxpop 1000
def alge 13

def rand 110
def type 973

cond
*.nrg 15 >
*.numties 0 != or
start
.fixpos dec

'-- Birth
*.robage 0 =
314 .aimright store
.deltie inc
300 .eye5width store
.dnalen .memloc store
.dnalen .tmemloc store
15 rnd .rand store

*.rand 5 < and
*.rand .type store

*.type 0 =
5 rnd .type store


'-- Reproduction
*.body 5 >
*.nrg 80 > and
*.totalmyspecies .maxpop 2 mult < and
*.maxvel .dn store
50 .repro store

*.totalmyspecies .maxpop <
*.nrg 200 > and
50 *.body 10 mult sub 0 floor .strbody store

'-- Shrinking
not
*.body 1 > and
*.body 10 mult 10 sub 0 floor .fdbody store


'-- Tie feeding
*.numties 0 !=
*.tiepres .tienum store

*.tmemval *.dnalen =
*.numties 1 > or and
*.numties .deltie store

*.numties 0 !=
*.robage 1 > and
*.trefxpos *.trefypos angle .setaim store
99 .sharenrg store

dupbool
*.memval .alge = and
*.trefxpos *.xpos sub abs *.trefypos *.ypos sub abs pyth 5 div 10 sub 0 floor *.maxvel ceil .up store
*.velsx .dx store

dropbool
dupbool
*.type 1 = and
.tieval .tieloc store
3200 .tieval store
*.memval .alge = and
.tieloc .shoot store
-1 .shootval store

dropbool
dupbool
*.type 2 = and
.shootval .tieloc store
-31999 .tieval store

dropbool
dupbool
*.type 3 = and
.tieloc .tieloc store
-6 .tieval store
*.memval .alge = and
.tieval .shoot store
3200 .shootval store

dropbool
*.type 3 > and
.tieloc .tieloc store
-1 .tieval store
*.memval .alge = and
.tieval .shoot store
3200 .shootval store


'-- Hunting
*.numties 0 =
*.body 1 = and
dupbool
*.eye5 0 =
*.memval *.dnalen = or and
350 .aimright store

dropbool
*.eye5 0 != and
*.memval *.dnalen != and
*.refbody 20 >
*.totalmyspecies 600 > or and
*.refxpos *.refypos angle .setaim store
.tie inc
*.memval .alge = and
*.velsx .dx store
*.refvelup 15 add *.maxvel ceil 0 floor .up store
.fixpos .shoot store
1 .shootval store
stop

end

This time one of the tie attacks realy messes up the maxpop....
So added the old condition again, but I let it reproduce when convenient up to twice the maxpop this time, just to be safe...
You can probably reduce the maxpop value, or just set the convenient repoduction cap down to 1000 if your sim is freezing, but I can't garantee that it won't change it's performance...
You can also try setting the maxpop to 32000 if you want to see how many cycles it takes to completely freeze the sim
« Last Edit: December 22, 2011, 11:52:57 AM by Shasta »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Fruit Flies v0.21 (F1) (Moonfisher) 28-09-08
« Reply #1 on: September 29, 2008, 05:36:13 PM »
Congrats, that probably helped you keep top spot on the F1 league a while longer than the previous version  
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Fruit Flies v0.21 (F1) (Moonfisher) 28-09-08
« Reply #2 on: September 29, 2008, 10:11:14 PM »
Well I had to get the new version in there, v0.1 was before I realy got the hang of using inline conditions... and it didn't use natural selection it just asumed things acording to the oponents size and such.
I kind of like how the new version manages to adapt to certain oponents in the midle of an F1 fight... sometimes you see a population drop when fighting Etch, but then it comes back strong

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Fruit Flies v0.21 (F1) (Moonfisher) 28-09-08
« Reply #3 on: May 02, 2014, 02:35:02 PM »
Moving to SB league.