Difference between revisions of "Move-Random-On Action"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Loon911
m
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[image:Move random on action.png|200px]]
+
[[Image:Move random on action.png|200px|Move random on action.png]]  
  
[[image:Move random on action additional params.png|200px]]
+
[[Image:Move random on expanded.png|200px|Move random on expanded.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
{| cellpadding="10" cellspacing="0" border="0" width="100%"
<tr>
+
|-
<td align="left" valign="top" width="80"><b>Definition:</b></td>
+
| align="left" valign="top" width="80" | '''Definition:'''
<td align="left" valign="top" width="100%">The <strong>Move-Random-On</strong> action
+
| align="left" valign="top" width="100%" | The '''Move-Random-On Action:''' ''Moves the subject agent randomly onto agents of type specified that are immediately adjacent. If there are no such agents, nothing happens. If there is one specified agent, the subject agent moves onto it. If more than one, the subject agent randomly selects one and moves onto it.''
The Move Random On action lets an agent move randomly onto any of its immediate neighbors that show the Depiction displayed in the Depiction parameter. The agent chooses one of its qualifying neighbors to move onto at random.
+
|-
 +
| align="left" valign="top" width="80" | '''Parameters:'''
 +
| align="left" valign="top" width="100%" | [[Depiction parameter|target agent]]: ''the class name of the Agent to move onto.
 +
|-
 +
| align="left" valign="top" width="80" | '''Additional Parameters:'''
 +
| align="left" valign="top" width="100%" |
 +
[[Animation parameter|animation]]: ''accelerated or constant speed''
  
.</td>
+
[[Animation time parameter|time]]: ''If time is 0, movement happens instantly, or the slider() option connects the animation time to the slider control located above the world.''
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
 
<td align="left" valign="top" width="100%">[[Formula parameter|formula]]</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Additional Parameters:</b></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>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%">???WHICH EXAMPLE???
 
[[Image:Move random action example.png|500px]]</td>
 
</tr>
 
  
</table>
+
|-
 +
| align="left" valign="top" width="80" | '''Example:'''
 +
| align="left" valign="top" width="100%" | [https://agentcubesonline.com/Ristretto3D/public/Ristretto3D.html?nid=1332630&mode=edit AgentCubes move-random-on-a example]
 +
 
 +
In this example the lady bug agent is using move-random-on action and can only move on the red tile. However, the beaver is using the move-random-on-a action which allows the agent to move on all of the tiles shapes.
 +
|}
  
 
[[Category:AgentCubes_Actions]]
 
[[Category:AgentCubes_Actions]]

Latest revision as of 09:47, 28 June 2019

Move random on action.png

Move random on expanded.png

Definition: The Move-Random-On Action: Moves the subject agent randomly onto agents of type specified that are immediately adjacent. If there are no such agents, nothing happens. If there is one specified agent, the subject agent moves onto it. If more than one, the subject agent randomly selects one and moves onto it.
Parameters: target agent: the class name of the Agent to move onto.
Additional Parameters:

animation: accelerated or constant speed

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

Example: AgentCubes move-random-on-a example

In this example the lady bug agent is using move-random-on action and can only move on the red tile. However, the beaver is using the move-random-on-a action which allows the agent to move on all of the tiles shapes.