Eyes
The bot's nine eyes, the focus eye and the cells that aim and widen each eye: how a bot sees and what number each eye gives it.
| Address | Sysvar | Kind | Summary |
|---|---|---|---|
| 501 | .eye1 | Sense | The eye centered 40 degrees to the left of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 502 | .eye2 | Sense | The eye centered 30 degrees to the left of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 503 | .eye3 | Sense | The eye centered 20 degrees to the left of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 504 | .eye4 | Sense | The eye centered 10 degrees to the left of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 505 | .eye5 | Sense | The front eye: 0 if there is nothing ahead, and the closer what the bot has in front, the higher the value; it is the most used sense in bot DNA. |
| 506 | .eye6 | Sense | The eye centered 10 degrees to the right of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 507 | .eye7 | Sense | The eye centered 20 degrees to the right of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 508 | .eye8 | Sense | The eye centered 30 degrees to the right of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 509 | .eye9 | Sense | The eye centered 40 degrees to the right of the front: 0 if it sees nothing, and the closer what it sees, the higher the value. |
| 510 | .eyef | Sense | What the focus eye sees: repeats the value of the eye you chose with .focuseye, or that of .eye5 if you chose none. |
| 511 | .focuseye | Command | Chooses which of the nine eyes has the focus: the one copied into .eyef and the one that decides what the ref* cells describe. |
| 521 | .eye1dir | Command | Turns eye 1 relative to its factory position (40 degrees to the left): positive toward the left, negative toward the right; 1256 is a full turn. |
| 522 | .eye2dir | Command | Turns eye 2 relative to its factory position (30 degrees to the left): positive toward the left, negative toward the right; 1256 is a full turn. |
| 523 | .eye3dir | Command | Turns eye 3 relative to its factory position (20 degrees to the left): positive toward the left, negative toward the right; 1256 is a full turn. |
| 524 | .eye4dir | Command | Turns eye 4 relative to its factory position (10 degrees to the left): positive toward the left, negative toward the right; 1256 is a full turn. |
| 525 | .eye5dir | Command | Turns eye 5 relative to its factory position (straight ahead): positive toward the left, negative toward the right; 1256 is a full turn. |
| 526 | .eye6dir | Command | Turns eye 6 relative to its factory position (10 degrees to the right): positive toward the left, negative toward the right; 1256 is a full turn. |
| 527 | .eye7dir | Command | Turns eye 7 relative to its factory position (20 degrees to the right): positive toward the left, negative toward the right; 1256 is a full turn. |
| 528 | .eye8dir | Command | Turns eye 8 relative to its factory position (30 degrees to the right): positive toward the left, negative toward the right; 1256 is a full turn. |
| 529 | .eye9dir | Command | Turns eye 9 relative to its factory position (40 degrees to the right): positive to the left, negative to the right; 1256 is a full turn. |
| 531 | .eye1width | Command | Widens eye 1: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 532 | .eye2width | Command | Widens eye 2: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 533 | .eye3width | Command | Widens eye 3: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 534 | .eye4width | Command | Widens eye 4: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 535 | .eye5width | Command | Widens eye 5: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 536 | .eye6width | Command | Widens eye 6: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 537 | .eye7width | Command | Widens eye 7: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 538 | .eye8width | Command | Widens eye 8: the wider it is, the more field it covers, but the shorter its range and the smaller its numbers. |
| 539 | .eye9width | Command | Widens eye 9: the wider it is, the more field it covers, but the less far it sees and the smaller its numbers get. |
A bot has nine eyes, from .eye1 to .eye9, laid out like a fan around the direction it is pointing (.aim). Each eye is a cell that the engine fills in every cycle with a number: 0 if it sees nothing, and bigger the closer what it sees is. It is the most-used sense of all; almost any bot that looks for food or fights starts with something like *.eye5 0 >. How sight works inside is explained in Vision.
Where each eye looks
By default each eye covers 10 degrees. .eye5 looks straight ahead; the lower-numbered ones look to the left and the higher ones to the right, 10 degrees apart: .eye1 is centered 40 degrees to the left and .eye9 40 to the right. Together the nine cover 90 degrees. A large or close object can show up in several eyes at once.
What number they give
The value depends on the distance between the edges and on the eye's reach. With the factory eye, which reaches about 1440 units:
| Distance between edges | Value |
|---|---|
| touching or overlapping | 32000 |
| almost touching | about 20700 |
| 134 | 100 |
| 278 | 25 |
| 710 | 4 |
| 1430 | 1 |
Each eye gives the value of the closest thing it sees. At night the reach drops by 20%, and in pond mode it shortens with depth.
Configuring the eyes
The eyes can be re-aimed with .eye1dir….eye9dir and widened with .eye1width….eye9width; a wider eye sees less far and gives smaller numbers at the same distance. .focuseye chooses which eye is the focus eye: its value is copied into .eyef and what it sees fills the cells of what it sees. All these configuration cells stay as you leave them; writing them once is enough, for example in the first cycle:
' front eye a little wider and focus on the front eye
cond
*.robage 0 =
start
35 .eye5width store
0 .focuseye store
stopWhat the eyes see arrives one cycle late: the engine writes it after moving everybody (see Execution and costs).