Difference between revisions of "Move-Random Action"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Andri
Line 6: Line 6:
 
<tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Definition:</b></td>
 
<td align="left" valign="top" width="80"><b>Definition:</b></td>
<td align="left" valign="top" width="100%">The <strong>Move-Random</strong> action moves an agent randomly any number of cells away from the original location.</td>
+
<td align="left" valign="top" width="100%">The <strong>Move-Random</strong> action moves an agent randomly any number of cells away from the original location as specified by a number or formula in the Formula parameter.</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 14: Line 14:
 
<tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Additional Parameters:</b></td>
 
<td align="left" valign="top" width="80"><b>Additional Parameters:</b></td>
<td align="left" valign="top" width="100%">[[Layer parameter|layer]], [[Animation parameter|animation]], [[Animation time parameter|time]]: the move action can move an agent in a layer other than the current layer the agent resides on; it can animate the movement with accelerated or constant speed; and it can make the movement happen instantly (if time is 0) or it can take any amount of time to perform the animation. The slider() option in the time parameter connects the animation time to the slider located above the world, next to the other world controls.</td>
+
<td align="left" valign="top" width="100%">[[Animation parameter|animation]], [[Animation time parameter|time]]: the move random action can animate the movement with accelerated or constant speed; and it can make the movement happen instantly (if time is 0) or it can take any amount of time to perform the animation. The slider() option in the time parameter connects the animation time to the slider located above the world, next to the other world controls. If checked, the ''Stay on Same Layer'' check box constraints the random movement in the current layer; otherwise, the random movement can take move the agent in any layer. If checked, the ''Only on empty cells'' check box only moves the agent on empty spots in the world, not piling it on any other agents in the target location.</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td align="left" valign="top" width="80"><b>Example 1:</b></td>
+
<td align="left" valign="top" width="80"><b>Example:</b></td>
<td align="left" valign="top" width="100%"><b>move on the same layer</b>: In the Frogger game, the Truck agent moves to the right once every half a second, as long as there is road there (second rule in the behavior below).
+
<td align="left" valign="top" width="100%"><b>???WHICH EXAMPLE???
 
[[Image:Move random action example.png|500px]]</td>
 
[[Image:Move random action example.png|500px]]</td>
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example 2:</b></td>
 
<td align="left" valign="top" width="100%"><b>move between layers</b>: In the 3D Matrix game, in its "Lift" method, the Nebuchadnezzar agent moves to the layer above it if the shift and up arrow key are pressed together and if at that position in the layer above, there is a Hole agent (first rule). Similarly, it moves to the layer below it if the shift and down arrow key are pressed together and if at that position in the layer above, there is a Hole agent (second rule).
 
[[Image:Move action example2.png|500px]]</td>
 
 
</tr>
 
</tr>
  

Revision as of 23:08, 17 June 2011

Move random action.png

Move random action additional params.png

Definition: The Move-Random action moves an agent randomly any number of cells away from the original location as specified by a number or formula in the Formula parameter.
Parameters: formula
Additional Parameters: animation, time: the move random action can animate the movement with accelerated or constant speed; and it can make the movement happen instantly (if time is 0) or it can take any amount of time to perform the animation. The slider() option in the time parameter connects the animation time to the slider located above the world, next to the other world controls. If checked, the Stay on Same Layer check box constraints the random movement in the current layer; otherwise, the random movement can take move the agent in any layer. If checked, the Only on empty cells check box only moves the agent on empty spots in the world, not piling it on any other agents in the target location.
Example: ???WHICH EXAMPLE??? 500px