2
« on: February 02, 2010, 10:08:59 PM »
I think I see the prob. Apparently the updating of eyef, memval lag behind the actual position of the focuseye (so my results lead me to conclude)
Here's what I did:
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'Scan eyes
cond
*.eyef 0 =
*.memval *.specIDloc = or
start
.up 10 *.velscalar sub sgn 0 floor mult dup inc inc
*.timer 9 mod 4 sub .focuseye store
*.memval 991 store
*.specIDloc 992 store
*.eyef 993 store
stop
'Center eye5 on prey
cond
*.eyef 0 !=
*.memval *.specIDloc !=
*.focuseye 0 !=
start
*.focuseye 140 mult .aimdx *.robage sgn mult store
0 .focuseye store
stop
'Track prey
cond
*.eye5 0 >
*.memval *.specIDloc !=
0 *.focuseye =
start
*.refvelup 50 add .up .sthreshold *.eye5 sub sgn 0 floor mult store
*.refxpos *.refypos angle .setaim *.robage sgn mult store
*.memval 994 store
*.specIDloc 995 store
*.focuseye 996 store
stop
'Gene X
cond
start
*.memval 997 store
*.specIDloc 998 store
*.eyef 999 store
*.focuseye 1000 store
stop
And I followed the memory changes in the robot DNA dialog box.
*ASB means as seen by.
(ASB scan eyes) (ASB track gene) (ASB Gene X)
memv sID eyef memv sID focus memv sID eyef focus
--------------------------------------------------------------------------
0 310 0 0 310 0 0 310 0 -1
0 310 0 0 310 0 0 310 0 0
310 310 9 0 310 0 310 310 9 1
Now the target bot was only visible in one eye (eye5) yet its ID only shows up in memval when focuseye = 1
Also eyef (when focuseye = 1, i.e. when eyef should = eye6) is equal to what eye5 is. Throughout everything I ensured that only eye5 could see the bot so it pretty conclusively shows that the updating lags (since at no point eye6 = 9).
The formatting changed from me typing to after it posted, so the columns of the table don't align as they should Sorry about that.
[edit] While I make no assertions about when these stores occur (I think that's irrelevant) the last quadruplet is guaranteed to have been taken at the same time.