Difference between revisions of "Move-Random Action"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Loon911
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[image:Move random action.png|150px]]
+
[[Image:Move random action.png|200px|Move random action.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
[[Image:Move random expand.png|200px|Move random expand.png]]  
<tr>
 
<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.</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
 
<td align="left" valign="top" width="100%">[[Direction parameter|direction]]</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example 1:</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).
 
[[Image:Move 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>
 
  
</table>
+
{| cellpadding="10" cellspacing="0" border="0" width="100%"
 +
|-
 +
| align="left" valign="top" width="80" | '''Definition:'''
 +
| align="left" valign="top" width="100%" | '''Move-Random '''Action: ''When conditions are satisfied, this 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.''
 +
|-
 +
| align="left" valign="top" width="80" | '''Parameters:'''
 +
| align="left" valign="top" width="100%" | [[VAT Formula parameter|formula]]: ''number or Vat Formula''
 +
|-
 +
| align="left" valign="top" width="80" | '''Additional Parameters:'''
 +
| align="left" valign="top" width="100%" |
 +
[[Animation parameter|animation]]: ''accelerated or constant speed''
 +
 
 +
[[Animation time parameter|time]]: ''movement happens instantly (if time is 0) or the slider() option connects the animation time to the slider located above the world.''
 +
 
 +
[[Check Box parameter|Stay on Same Layer]]: ''check box constrains the random movement to the current layer; otherwise, layers may change.''
 +
 
 +
[[Check Box parameter|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.''
 +
 
 +
|-
 +
| align="left" valign="top" width="80" | '''Example:'''
 +
| align="left" valign="top" width="100%" | &nbsp;[[Image:Move random action example.png|500px]]
 +
|}
  
 
[[Category:AgentCubes_Actions]]
 
[[Category:AgentCubes_Actions]]

Latest revision as of 10:48, 17 June 2019

Move random action.png

Move random expand.png

Definition: Move-Random Action: When conditions are satisfied, this 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: number or Vat Formula
Additional Parameters:

animation: accelerated or constant speed

time: movement happens instantly (if time is 0) or the slider() option connects the animation time to the slider located above the world.

Stay on Same Layer: check box constrains the random movement to the current layer; otherwise, layers may change.

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:  500px