Author Topic: Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08  (Read 4374 times)

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
« on: September 22, 2008, 10:52:01 PM »
So... finaly got some time to make a bot. Figured I'd take a good look at Etch II
It beats Etch II and everything else I tryed... I think it should be able to take first place in F1...
It's a very simple strategy, and probably not that hard to beat... but it works for now

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
Code: [Select]
'Fruit Flies 0.1 (for DB2.43.1L)
'By Moonfisher
'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 600-700, although that could change the results.
'No fancy eyes or conspec or anything of that sort, just a very simple strategy.

def alge 13
def popcap 1000

'-- Birth
cond
*.robage 0 =
start
.deltie inc
314 .aimright store
300 .eye5width store
.dnalen .memloc store
.dnalen .tmemloc store
stop

'-- Reproduction
cond
*.totalmyspecies .popcap < '--- This is to cap the population so the fight doesn't freeze.
start

*.body 6 >
*.nrg 80 >
*.maxvel .dn store
50 .repro store

clearbool
*.body 6 <=
*.nrg 200 >
10 .strbody store
stop

'-- Shrinking
cond
*.body 1 >
start
clearbool
*.nrg 200 <=
*.totalmyspecies .popcap > or
*.body 10 mult 10 sub 0 floor .fdbody store
stop

'-- Tie feeding
cond
*.robage 0 >
*.numties 0 !=
start

clearbool
*.tmemval *.dnalen =
*.numties 1 > or
*.body 50 > or
*.numties .deltie store

clearbool
*.tiepres .tienum store
*.trefxpos *.trefypos angle .setaim store

*.trefbody 20 >
*.nrg 10 >
*.maxvel .up store
*.velsx .dx store
.tieval .tieloc store
1000 .tieval store
.tieloc .shoot store
-1 .shootval store

clearbool
*.trefbody 20 <=
.tieloc .tieloc store
-6 .tieval store
stop

'-- Hunting
cond
*.numties 0 =
*.body 1 =
*.nrg 10 >
start

clearbool
*.eye5 0 =
110 .aimright store

clearbool
*.eye5 0 !=
*.memval *.dnalen =
314 .aimright store

clearbool
*.eye5 0 !=
*.memval *.dnalen !=
*.refbody 10 >
*.refshell 0 > or
*.refxpos *.refypos angle .setaim store
.tie inc
*.velsx .dx store
*.maxvel .up store
.memloc .shoot store
-1 .shootval store

*.memval .alge =
.fixpos .shoot store
1 .shootval store
stop

cond
start
0 .fixpos *.fixpos 0 sub dup div mult store
stop

end
« Last Edit: May 13, 2014, 03:20:26 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
« Reply #1 on: September 22, 2008, 10:56:07 PM »
It doesn't look like it's doing anything fancy.  What's the trick?

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
« Reply #2 on: September 23, 2008, 04:22:48 AM »
It basicaly just reproduces realy fast, and uses forced counter leeching through mem shots (It doesn't even use venom) on all larger oponents.
On small oponents it assumes they're going to try something funy with ties and just pushes -6 into tieloc, so instead of doing some anoying mem attack it starts to feed you.

The point is larger bots can eat you through the tie, so large bot = counter leeching.
Small bots can't eat much through the tie so they'll likely try to mess something up instead, or use counter leeching, but to do that you usualy push a positive value into tieval so pushing -6 into tieloc makes it feed you.

So it's not that hard to figure out how to beat this thing, it just works well right now because all the bots follow a strick pattern according to their size... but I can already think of some ways to counter this behavior.

Anyway the point wasn't to make something invincible, just to beat Etch and keep the thing as simple as possible.
6 small simple genes, nothing fancy

I was thinking of trying to use tmemloc to track what the oponent was doing and stuff like that to make some propper tie defences, but I kinda like how this seems to work without doing anything advanced. It has a hard time killing some bots, but eventualy everything dies from starvation if the fruit flies don't kill it. (Some fights will take a while, especialy when running it against pacifist and etch)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
« Reply #3 on: September 25, 2008, 12:32:27 AM »
Yes, a very efficient bot, but was unable to beat Pacifist.
"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 abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
« Reply #4 on: September 25, 2008, 12:39:40 AM »
That's a slick bot.
It's a shame it didn't beat pacifist, though. I should make another bot anyway. Etch Mk II is getting old.
Or, as Zaphod might say, "Amazing. That really is truly amazing. That is so amazingly amazing I think I'd like to steal it."
« Last Edit: September 25, 2008, 12:50:40 AM by abyaly »
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
« Reply #5 on: September 26, 2008, 04:38:01 AM »
It did beat Pacifist, atleats in DB 2.43.1L it did...
And finaly someone is going to steal something from me, was about time...
After all that work I put into making Spinners eyes easy to just copy paste into your own bot and make adjustments with a couple of values and all that, noone even bothered stealing them :'(
But steal from v0.2 it's much better, the strategy is better and uses natural selection which I think is cool
Also I was getting the hand of inline conditions at that point so cleaned up the code a lot...
Basicaly v0.2 is shorter, simpler and better

And v0.2 also beats Pacifst... atleast it does in DB 2.44 ....

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
« Reply #6 on: September 26, 2008, 10:58:50 AM »
That pretty cool.   I've got a bot that uses shflav to swap shot attacks, I'll have to try something similar for ties and see how it does.

Offline Botsareus

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