See Condition

From AgentCubes
Revision as of 22:12, 16 May 2011 by imported>Andri
Jump to navigation Jump to search
Definition: The See condition checks if the agent at the cell indicated by the Direction parameter looks like the shape specified in the Shape parameter. The dot (.) refers to the agent itself.
If the indicated cell contains the chosen depiction, the condition is true. Otherwise, the condition is false.
Parameters: direction, shape
Optional Parameters: <a href="tm_ti_direction.html" target="body">direction</a>, <a href="tm_ti_depiction.html" target="body">depiction</a>
Example: The Shark agent in the <a title="The applet link will only work if you are accessing the documentation from the AgentSheets web pages." href="http://www.agentsheets.com/Applets/fish-tank/index.html" target="Demo Window">Fish Tank</a> simulation looks above it to see if there is a Fish agent to eat, and also checks to see if the Shark itself looks like a Shark going left and decides to change directions or move to the left.

<img align="bottom" border="0" src="images/condition_see_example.gif">