Bots and Simulations > Tips and Tricks
Vision and Turning
Elite:
Here's a handy chart:
--- Code: ---eye1 -140
eye2 -105
eye3 -70
eye4 -35
eye5 0
eye6 35
eye7 70
eye8 105
eye9 140
--- End code ---
The number on the right is the clockwise turn you need to make, in DB turning units, so that you turn towards the eye listed on the left
So, if you want to turn towards your eye9 then just store 140 in .aimdx
The vision range of a bot is a 90 degree arc with the eyes spaced 10 degrees apart
In DB units:
360 degrees = 1256
90 degrees = 314
10 degrees = 35
Elite:
Look what I made
--- Code: ---cond
*.eye1 *.eye2 >=
*.eye1 *.eye3 >=
*.eye1 *.eye4 >=
*.eye1 *.eye5 >=
*.eye1 *.eye6 >=
*.eye1 *.eye7 >=
*.eye1 *.eye8 >=
*.eye1 *.eye9 >=
start
mult -140
stop
cond
*.eye9 *.eye2 >=
*.eye9 *.eye3 >=
*.eye9 *.eye4 >=
*.eye9 *.eye5 >=
*.eye9 *.eye6 >=
*.eye9 *.eye7 >=
*.eye9 *.eye8 >=
*.eye9 *.eye1 >=
start
mult 140
stop
cond
*.eye2 *.eye9 >=
*.eye2 *.eye3 >=
*.eye2 *.eye4 >=
*.eye2 *.eye5 >=
*.eye2 *.eye6 >=
*.eye2 *.eye7 >=
*.eye2 *.eye8 >=
*.eye2 *.eye1 >=
start
mult -105
stop
cond
*.eye8 *.eye9 >=
*.eye8 *.eye3 >=
*.eye8 *.eye4 >=
*.eye8 *.eye5 >=
*.eye8 *.eye6 >=
*.eye8 *.eye7 >=
*.eye8 *.eye2 >=
*.eye8 *.eye1 >=
start
mult 105
stop
cond
*.eye3 *.eye9 >=
*.eye3 *.eye8 >=
*.eye3 *.eye4 >=
*.eye3 *.eye5 >=
*.eye3 *.eye6 >=
*.eye3 *.eye7 >=
*.eye3 *.eye2 >=
*.eye3 *.eye1 >=
start
mult -70
stop
cond
*.eye7 *.eye9 >=
*.eye7 *.eye8 >=
*.eye7 *.eye4 >=
*.eye7 *.eye5 >=
*.eye7 *.eye6 >=
*.eye7 *.eye3 >=
*.eye7 *.eye2 >=
*.eye7 *.eye1 >=
start
mult 70
stop
cond
*.eye4 *.eye9 >=
*.eye4 *.eye8 >=
*.eye4 *.eye7 >=
*.eye4 *.eye5 >=
*.eye4 *.eye6 >=
*.eye4 *.eye3 >=
*.eye4 *.eye2 >=
*.eye4 *.eye1 >=
start
mult -35
stop
cond
*.eye6 *.eye9 >=
*.eye6 *.eye8 >=
*.eye6 *.eye7 >=
*.eye6 *.eye5 >=
*.eye6 *.eye4 >=
*.eye6 *.eye3 >=
*.eye6 *.eye2 >=
*.eye6 *.eye1 >=
start
mult 35
stop
cond
*.eye5 *.eye9 >=
*.eye5 *.eye8 >=
*.eye5 *.eye7 >=
*.eye5 *.eye6 >=
*.eye5 *.eye4 >=
*.eye5 *.eye3 >=
*.eye5 *.eye2 >=
*.eye5 *.eye1 >=
start
mult
stop
cond
start
.aimdx store
stop
--- End code ---
It will turn to face the closest thing it can see
Neat, huh?
fulizer:
wow I cant think af anuything like that
I can barly make bots
my best one so far has been penalised by peter for being like wassisname
so ill make a veg
Peter:
--- Quote from: fulizer ---wow I cant think af anuything like that
I can barly make bots
my best one so far has been penalised by peter for being like wassisname
so ill make a veg
--- End quote ---
It is pretty well thought out, and just this is alone made for some energie saving. But it has been well thought out.
And for anything like it. Here is the turning gene I use for my bots. Works pretty well too.
--- Quote ---cond
*.eye5 0 =
*.refeye *.myeye = or
start
500 .up store
*.eye9 *.eye1 sub 4 mult .aimdx store
*.eye4 *.eye6 sub .aimsx store
stop
--- End quote ---
And for the 'penalisation', no it isn't personal. Just change your bot a little, if you don't understand the dna completely just ask the forum, we're here to help you.
Ok, you're making a veg, waiting how that is going to turn out.
bacillus:
I use 360 degree genes all the time, they seem to be so handy, but I don't often see an opponent using them. Do people just not know about this trick, or is there some major drawback I don't know of?
Navigation
[0] Message Index
[#] Next page
Go to full version