Darwinbots Forum

Bots and Simulations => Simulation Emporium => Topic started by: MacadamiaNuts on October 21, 2007, 11:39:09 AM

Title: The Zen Challenge
Post by: MacadamiaNuts on October 21, 2007, 11:39:09 AM
I'm setting up challenges when I'm not even running them myself... well I promise I'll try this one. As long as the English literature classes let me.  

These are the conditions for the Zen Challenge:

- The code size must not be over 256 bytes -comments excluded. Which is like:

xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx

- You shall not use any constant values apart of the sysvar you are storing in.
- You shall not use flow commands, and you cannot do operations to the sysvar you are storing in (no 1G mults on the sysvar).

So this is fine:

*.eye5 .shootval store
*.tiepres *.mass sgn sub abs mult .tie store

(sorry, mass was the first sysvar that come to my mind)

but not:

1 .tie *.tiepres 1 sub abs mult store
Title: The Zen Challenge
Post by: Numsgil on October 21, 2007, 12:20:14 PM
When you say code size, do you mean your bot.txt file can't be over 256 bytes?  Or that you can only use up to 256 DNA commands?
Title: The Zen Challenge
Post by: MacadamiaNuts on October 23, 2007, 02:25:57 PM
The DNA code, stripped of all comments, must be 256 bytes. Not that the number really matters a lot, but it sounds cool.
Title: The Zen Challenge
Post by: MacadamiaNuts on October 23, 2007, 05:37:47 PM
Sheesh... this is harder than I thought.

Here enters Origami (247 bytes):

Code: [Select]
start
*.waste *.eye5 *.body div add *.genes add *.vel sub .up store
*.pleas .repro store
*.refeye *.myeye sub sgn *.eye5 sgn mult .shoot store
*.robage .eye5width store
*.refxpos *.refypos angle *.eye5 sgn *.refeye sgn sub mult .setaim store
stop
Title: The Zen Challenge
Post by: Numsgil on October 23, 2007, 06:50:57 PM
Ah, very nice.  Sort of reminds me of a neural net in its interconnected wackiness.
Title: The Zen Challenge
Post by: Gobo on November 27, 2007, 11:47:42 PM
I didn't feel it was hard
Here comes Tao (200 bytes). Beats Origami in F1 Contest easily.
Code: [Select]
start
.tie inc
*.maxvel dup sqr .up store
*.eye4 *.eye6 sub .aimsx store
*.tiepres .tienum store
*.myeye div dup - .tieval store
dup dup mult *.nrg sub - sgn sqr mult .repro store
.tieloc dec
Title: The Zen Challenge
Post by: Peter on November 28, 2007, 07:29:43 AM
I am lauging in your faces, this is shorty. Beating both your bots
84 bytes  
I never tried to made my bots as short as possible, maybe you have some ideas for a new shortbot-league setup. You are in fact making short shortbots.
Shortbot-league setup. (http://www.darwinbots.com/Forum/index.php?showtopic=2350&view=getnewpost)

shorty
Code: [Select]
start
*.maxvel *.vel sub .up store
*.eye4 *.eye6 sub .aimsx store
-6 .shoot store
Title: The Zen Challenge
Post by: Numsgil on November 28, 2007, 09:08:42 AM
Sorry Peter...

Quote from: MacadamiaNuts
- You shall not use any constant values apart of the sysvar you are storing in.
Title: The Zen Challenge
Post by: Peter on November 28, 2007, 09:42:40 AM
Quote from: Numsgil
Sorry Peter...

Quote from: MacadamiaNuts
- You shall not use any constant values apart of the sysvar you are storing in.
True, well I could revise it, still have 200-84=116 bytes left
But in that case isn't gobo's bot false too. Keeping value in .tie stuck at one.
Title: The Zen Challenge
Post by: Numsgil on November 28, 2007, 01:04:47 PM
He's not using actual numbers, so I think it's valid.  We'd need to ask Maca to be sure.  You could maybe do:

.shoot dec .shoot dec .shoot dec .shoot dec .shoot dec .shoot dec

to do -6 .shoot store, if dec and inc are valid.  Of course, that's alot of bytes spent!  65 I think.
Title: The Zen Challenge
Post by: Peter on November 28, 2007, 02:06:55 PM
Quote from: Numsgil
He's not using actual numbers, so I think it's valid.  We'd need to ask Maca to be sure.  You could maybe do:

.shoot dec .shoot dec .shoot dec .shoot dec .shoot dec .shoot dec

to do -6 .shoot store, if dec and inc are valid.  Of course, that's alot of bytes spent!  65 I think.
Yes, but I have them left . Instead I could also do this, and it uses 5 bytes less, I think.
Making a bot existing out of 79bytes.
Shots are less powerful, but it is more then enough to beat the other two here.
Quote
start
*.maxvel *.vel sub .up store
*.eye4 *.eye6 sub .aimsx store
.shoot dec
It is hard to make exact rules that will apply to everything, in much cases the cheaters win. Well the one that are on the edge of the rules.

See the SG-league.  , and you see my point.

Wait, SG. I've seen Jez making a few very short bots(shorter then a. mini.) let's see.
Title: The Zen Challenge
Post by: Peter on November 28, 2007, 02:13:58 PM
And here we have two bots of Jez.
Edit: Yes, after further checking both bots don't really apply to the rules, using solid numbers, still the second one is one the shortest around.

225 bytes, Bot of jez <----sorry some stuff removed to see if it didn't was too long. Misses a gene where there are all ' before it.
Quote
'Topic: Short-bots thread
'Jez
cond
*.nrg 6000 >
start
25.repro store
stop
cond
*.eye5 0 >
start
10 .up store
-1.shoot store
stop
cond
*.eye5 0 =
start
150.aimdx store
stop
cond
*.refeye 3 =
*.eye5 0 !=
start
150 .aimdx store
stop
end

179 bytes
Quote
'12.11.03
'Topic: one-gene bot challenge
'Jez unnamed bot
cond
*.refeye 3 !=
start
*.eye4 *.eye8 sub *.sx 2 mult add .aimsx store
*.eye5 100 sub -1 mult 10 div *.dn add .up store
-1 .shoot store
40 299 *.sun add store
stop
end