
Vision Data Tab
This tab looks at the 8 direction surrounding a cell and displays what the vision related KFORTH instructions will return.
The cell is shown in the middle of the dialog. Surrounding the cell are the results from looking along each of the 8 directions. Shown is the distance (the WHERE value) and the type of thing seen (WHAT value).
The instructions LOOK, WHAT, WHERE, NEAREST, NEAREST2, FARTHEST, and FARTHEST2. will be using the same information as is displayed in this dialog. This dialog will help in debugging organisms.
LOOK Examples
Here's some KFORTH instructions and what they will return, assuming the data shown above.1 NEAREST ; returns (1, 0) |
The mask is '1' meaning find the nearest CELL. Which would be direction (1, 0). There are six cells visible to this cell, and the one at (1, 0) has the smallest distance: 3.
3 NEAREST ; returns (1, 0) |
The mask is '3' meaning find the nearest CELL or SPORE. Which would be direction (1, 0) as the distance 11 is the smallest containing a SPORE.
8 FARTHEST ; returns (-1, 0) |
The mask is '8' meaning find the farthest BARRIER. Which would be direction (1, 1) as the distance 43 is the largest distance. This is a "tie" condition; FARTHEST/NEAREST look at each direction in clock-wise order beginning with a RANDOM direction. So the result may differ.
15 NEAREST ; returns (1, 0) |
The NEAREST and FARTHEST instructions take a mask, so OR'ing 1, 2, 4, and 8 is "everything". The OR'ing of all what-values is 15. This instruction therefore will return the direction to nearest CELL, SPORE, ORGANIC, or BARRIER. The result is direction (1, 0) because 3 is the smallest distance.
15 FARTHEST ; returns (0, -1) |
Here we get (0, -1). Looing along direction (0, -1) we see something at a distance of 49. This is the largest distance
SIZE, BIGGEST and SMALLEST Examples
The SIZE of the organism is the number of cells it consists of.HOTTEST, COLDEST and TEMPERATURE Examples
The TEMPERATURE of the organism is how much energy it has. The HOTTEST thing is the thing with the most energy. The COLDEST thing is the thing with the least energy.More information about vision instructions here.