Darwinbots Forum

Bots and Simulations => DNA - General => Tips and Tricks => Topic started by: Elite on June 06, 2006, 02:13:08 PM

Title: Vision and Turning
Post by: Elite on June 06, 2006, 02:13:08 PM
Here's a handy chart:

Code: [Select]
eye1    -140
eye2    -105
eye3    -70
eye4    -35

eye5    0

eye6    35
eye7    70
eye8    105
eye9    140


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
Title: Vision and Turning
Post by: Elite on June 06, 2006, 04:17:11 PM
Look what I made  

Code: [Select]
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


It will turn to face the closest thing it can see

Neat, huh?
Title: Vision and Turning
Post by: fulizer on December 06, 2007, 06:23:52 AM
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
Title: Vision and Turning
Post by: Peter on December 06, 2007, 11:53:36 AM
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
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

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.
Title: Vision and Turning
Post by: bacillus on March 19, 2008, 12:26:01 AM
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?
Title: Vision and Turning
Post by: abyaly on March 19, 2008, 12:46:21 AM
2 part answer:
360 degree eyes are relatively new (a bit over a year old) so bots before then don't have them, and some bots after just haven't adapted to the new features.

Recently, eye distance depends on width - narrower eyes can see farther.
Title: Vision and Turning
Post by: bacillus on March 19, 2008, 01:13:30 AM
Thanks
Title: Vision and Turning
Post by: Numsgil on March 19, 2008, 02:56:29 AM
It's kind of the way of things here.  New features are added that make new bots stronger than older bots.
Title: Vision and Turning
Post by: fulizer on March 19, 2008, 10:07:37 AM
Quote from: 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
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

Just change your bot a little
I did but they pick on me anyway
Title: Vision and Turning
Post by: bacillus on March 20, 2008, 02:09:22 AM
The eyesight shortening doesn't seem to be happening, could you please tell me at which version this kicks in? (I think I'm using 2.43j at the moment)
Title: Vision and Turning
Post by: EricL on March 20, 2008, 09:58:53 AM
Sight distance varies as a function of width beginning in version 2.43.z.  See this topic (http://www.darwinbots.com/Forum/index.php?showtopic=2443&st=0).

Title: Vision and Turning
Post by: bacillus on March 20, 2008, 11:20:06 PM
Great. I stopped downloading new versions a long time ago, because each version after 2.43j breaks down after about a month.
Title: Vision and Turning
Post by: EricL on March 20, 2008, 11:24:20 PM
Quote from: bacillus
each version after 2.43j breaks down after about a month.
What do you mean by 'break down'?
Title: Vision and Turning
Post by: bacillus on March 21, 2008, 11:09:55 PM
First it takes forever to load, then after about four days it crashes as soon as you open it.