Difference between revisions of "Percent-chance Condition"
Jump to navigation
Jump to search
imported>Andri |
imported>Andri |
||
Line 1: | Line 1: | ||
− | [[image: | + | [[image:Percent chance condition.png|150px]] |
− | |||
<table cellpadding="10" cellspacing="0" border="0" width="100%"> | <table cellpadding="10" cellspacing="0" border="0" width="100%"> | ||
<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> | + | <td align="left" valign="top" width="100%">The <strong>Percent-chance</strong> condition succeeds with a certain percent chance, as specified by a number or a Visual AgenTalk Formula. For instance, with a value of 50 this condition will succeed, on average, 50% of the time. |
+ | The Percent Chance condition chooses a random number between 1 and 100 whenever it is executed. If this number is less than the number indicated in its number field, the condition is true. Otherwise, the condition is false. Use this to introduce randomness to an agent's behavior.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td align="left" valign="top" width="80"><b>Parameters:</b></td> | <td align="left" valign="top" width="80"><b>Parameters:</b></td> | ||
− | <td align="left" valign="top" width="100%">[[ | + | <td align="left" valign="top" width="100%">[[Formula parameter|formula]]</td> |
</tr> | </tr> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<tr> | <tr> | ||
<td align="left" valign="top" width="80"><b>Example:</b></td> | <td align="left" valign="top" width="80"><b>Example:</b></td> | ||
− | <td align="left" valign="top" width="100%"> | + | <td align="left" valign="top" width="100%"> |
− | [[Image: | + | [[Image:Percent chance condition example.png|500px]]</td> |
</tr> | </tr> | ||
Revision as of 20:30, 17 June 2011
Definition: | The Percent-chance condition succeeds with a certain percent chance, as specified by a number or a Visual AgenTalk Formula. For instance, with a value of 50 this condition will succeed, on average, 50% of the time. The Percent Chance condition chooses a random number between 1 and 100 whenever it is executed. If this number is less than the number indicated in its number field, the condition is true. Otherwise, the condition is false. Use this to introduce randomness to an agent's behavior. |
Parameters: | formula |
Example: | 500px |