Bots and Simulations > Short bots
Fruit Flies 0.1 (F1) (Moonfisher) 23-09-08
Moonfisher:
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: ---'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
--- End code ---
Numsgil:
It doesn't look like it's doing anything fancy. What's the trick?
Moonfisher:
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)
bacillus:
Yes, a very efficient bot, but was unable to beat Pacifist.
abyaly:
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."
Navigation
[0] Message Index
[#] Next page
Go to full version