Code center > Suggestions

Varying sight distance as a function of eye width

(1/5) > >>

EricL:
In playing around with building a bot that can catch Shrinking Violets, its apparent that having the sight distance the same for all species makes sneaking up and "surprising" a species rather difficult, particularily when everyone is using omnieye vision.

I'm still planning on adding .camo at some point, but what do people think about the idea of making an eye's sight distance a function of it's width?  The wider the eye, the shorter the distance it can see.  If we assume the sight distance for the default PI/18 eye width is 1, then I might scale this such that the sight distance S for a specific eye width W as a function of W

S = 1 - log(W)/2 where W is the eyewidth as a mutplie of standard Pi/18 eye widths.

Thus, when the .eyewidth is 0 and thus the eye has the standard width, W=1 and thus S=1.

For a 360 degree omnieye, W=36.  S ~ 0.22.

For an eye half the normal width, W = 0.5, S~1.15.

For the narrowest eye possible, W=1/35, S~2.54.

So, omnieye bots can only see about 1/4th as far as bots with the standard eye wdith.  Bots using a long distance eagle eye can potentially see 2.5 times as far as standard bots, but with an incredibly narrow field.

This change might actually improve performance, particularly over sims with omnieye bots.

What think?

shvarz:
sounds reasonable

MacadamiaNuts:
Totally ok.

Predator animals have a narrower field of view pointed ahead because (I think) they get better resolution for details, therefore being able to notice smaller/farther/immobile things.

shvarz:
"Field of view pointed ahead" is necessary for depth perception. If you need to catch something in front of you (be it a prey or just a branch on a tree), then you need very accurate measurement of how far it is.

I like the idea of balancing depth and broadness, mostly for its simplicity. But I think that accuracy of measurement and the concept of "focus" should be somewhere there as well. Maybe in the future.

Endy:
Sounds good, might even have more of a predator/prey dynamic from it.

Navigation

[0] Message Index

[#] Next page

Go to full version