Code center > Darwinbots Program Source Code

Eyes in DB!?

<< < (4/6) > >>

Endy:
Just out of curiosity, does " *.refxpos *.refypos dist " return the same value as *.eye5 would?

Endy B)

Numsgil:
the eyes return this:

eyevalue = 12000/distance (120000 = robsize*100)

note that refX variables won't activate if no eyes are used, I don't think.  Has to do with how the refX variables work.

Endy:
Darn and here I wanted to make a blind bot. :)

Endy B)

Numsgil:
A bot that uses no eyes would be really cool,  but you just couldn't use anything to tell anything about the other bot.

Even in/out won't work.

PurpleYouko:
Like Carlo said earlier, the first time the DNA of a new bot is tokenized in the DNA parser, it sets a flag called ".view" if it encounters any .eye(x) command.

This flag sets the stage for the entire set of refvars to be imported on the next (and every) subsequent cycle.

At first I wondered if you could create a robot with one gene that has an eye command, a timer and a gene deletion command. Something like

--- Code: ---' gene 1
cond
*.robage 2 =
*.eye5 *.eye5 =
start
1 .delgene store
stop
--- End code ---
I don't think it will work though since I am pretty sure that the .view flag is reset on every cycle.

Might be worth trying out though.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version