Bots and Simulations > Interesting behaviour bots
my bot. pls give it a name
theblaze:
i made a bot which uses ties to feed.pls give suggestions for me to work on.
--- Code: ---cond
*.robage 0 =
start
52 inc
stop
cond
*52 1 !=
start
*.thisgene .mkvirus store
*.myeye *.myshoot add 32000 mult 50 add 32000 ceil .vshoot store
.delgene dec
stop
cond
start
2 .mkvirus store
10 .vshoot store
stop
cond
*.eye1
0
>
start
34.9
.aimsx
store
stop
cond
*.eye9
0
>
start
34.9
.aimdx
store
stop
cond
*.eye2
0
>
start
34.9
.aimsx
store
stop
ond
*.eye8
0
>
start
34.9
.aimdx
store
stop
cond
*.eye3
0
>
start
34.9
.aimsx
store
stop
cond
*.eye7
0
>
start
34.9
.aimdx
store
stop
cond
*.eye4
0
>
start
34.9
.aimsx
store
stop
cond
*.eye6
0
>
start
34.9
.aimdx
store
stop
cond
*.eye5
0
>
start
*.refveldx
.dx
store
*.refvelup
30
add
.up
store
cond
*.nrg
10000
>
start
50
.repro
store
10
.aimdx
store
stop
cond
*.waste
1
>
start
.backshot
inc
-4
.shoot
store
*.waste
.shootval
store
stop
cond
start
.fixpos *.fixed mult dec
stop
cond
robage 0 =
start
.shoot .ploc store
stop
cond
*.shell 2500 <
*.nrg 2000 >
start
100 .mkshell store
stop
cond
*.numties 0 >
*.in1 1 !=
start
-1 .tieloc store
-1000 .tieval store
*.tiepres .tienum store
stop
cond
*.slime 90 <
*.nrg 3000 >
start
100 .mkslime store
stop
cond
*.tiepres *.feedtie =
start
-1000 .tieval store
*.tieval 1000 div .tieloc store
stop
cond
*.robage 0 =
start
.deltie
inc
stop
cond
*.robage 1
=
start
.deltie
inc
stop
cond
*.nrg 5 >
start
1
.tie
store
stop
cond
*.nrg
2000
>
start
10
.strbody
store
stop
cond
*.nrg
50
<
start
1
.fdbody
store
stop
cond
*.edge
1
=
start
10
.dn
store
stop
cond
*.poison
1000
>
*.nrg 1000 <
start
8 .ploc
store
cond
start
99 .sharenrg *.multi mult store
.sharewaste *.multi mult inc
stop
cond
*.out1 1 !=
start
1 .out1 store
stop
end
--- End code ---
bacillus:
I'm not quite sure what's going on with your turning genes, but
34.9
.aimsx
store
Is not a valid syntax-remember, DB does not take decimals.
Also, it might be a good idea to do something like this, for example:
cond
*.eye2 0 >
*.eye5 0 =
start
...
You don't really want to turn away from food once you have it centered in your vision - remember, the code is read in order, so the eye9 turn command will override every previous turn command in the DNA. So instead of having this structure:
1
2
3
4
5
6
7
8
9
You want this, causing minimal turning:
1
9
2
8
3
7
4
6
5
(And also *.eye5 0 = in every command, or 0 .aimdx store in the eye5 command).
The bot itself looks good overall, just play out in your mind the sequence of events to catch out these easily avoidable mistakes (don't worry, it comes more easily than you think ;)).
theblaze:
thanks
theblaze:
ok I finally made an update (we were caught in the earthquake)
Numsgil:
--- Quote from: theblaze on October 06, 2010, 01:26:49 PM ---(we were caught in the earthquake)
--- End quote ---
This one?
Are you a time traveler, sir? Or maybe an immortal?
Navigation
[0] Message Index
[#] Next page
Go to full version