Welcome
Guest
, you are in:
<root>
Elements
•
Login
EventIDE Wiki
Navigation
¶
Main Page
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
Administration
File Management
Create Account
Search the wiki
Back
Old Roulette Element
Modified on 2018/08/29 04:05
by
Administrator
Categorized as
Base Elements
,
Deprecated
,
Elements
<div style="margin-right: 10px; margin-left: 16px; margin-bottom:10px; float: right; width: 500px; overflow: hidden; height: auto; padding: 0px; background: #fafafa; background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));background: -moz-linear-gradient(top, #fbfbfb, #fafafa);border: 1px dashed #ddd;box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ddd, 0 0 0 10px #fff, 0 0 2px 10px #eee;"> == Summary == {s:Element Info Panel | title=Old Roulette | category=Deprecated | icon=[image|Element Icon|{UP(Old Roulette Element)}Old-Roulette-Element-Icon.png] | author= OkazoLab | addin= Base Layer | scope= Parent event | usage= Snippets | ownsnippets= None } == Properties == {| |- ! Name ! Description ! Constraints ! Type ! On<br/>runtime<br/>change |- | colspan="5" bgcolor="#AADDDDD" | Randomization |- | Min value | The minimal integer value that generated random numbers can take. Has to be less than the Max Value property. Change in runtime causes generating a new block of random numbers | {s:atNormal} | Int32 | |- | Max value | The maximum integer value that generated random numbers can take. Has to be greater than the Min Value property. Change in runtime causes regeneration of a block | {s:atNormal} | Int32 | |- | Value frequences | The frequences that denote a relative probabaility for each integer number in the range [Min Value,Max Value] to be included in a block.The frequences and the total amount of possible integer numbers define the block size. Change in runtime causes regeneration a block | {s:atNormal} | IList | |- | Block Length | Total length of the random block estimated with the current properties. | {s:atStatus} | Int64 | |- | Blocking | If true, the random values are generated in the balanced block, with fixed number of occurences. If false, the random values are drawn | {s:atNormal} | Boolean | |- | Factors | Factorial design for random numbers. Each random number is represented decomposed on factors in [Factored Random Value] property | {s:atNormal} | String | |- | No Repetition | If true, the last value of each block will be always different with the first value of the following block | {s:atNormal} | Boolean | |- | colspan="5" bgcolor="#AADDDDD" | |- | | | {s:atNormal} | String | |- | colspan="5" bgcolor="#AADDDDD" | Runtime Status |- | Index in block | Index of the current random value in a random block | {s:atStatus} | Int32 | |- | Current Block | Index of the current random block | {s:atStatus} | UInt32 | |- | Block completed | Is true when the last value for the current random block is just taken. A new block will be generated for the next activation of the parent event. | {s:atStatus} | Boolean | |- | colspan="5" bgcolor="#AADDDDD" | Runtime Actions |- | Force new block | Set to true in order to generate a new block immediately (note: new values will be accesible on the next activation only) | {s:atNormal} | Boolean | |- | Cancel value | Set this parameter to true in runtime in order to cancel the current random value withdrawal. | {s:atNormal} | Boolean | |- | colspan="5" bgcolor="#AADDDDD" | Runtime Output |- | Random Value | Returns a random value in the current position of the random block. Each activation of the parent event shift this position to the next numebr in a random block. | {s:atStatus} | Int32 | |- | Random Values | Returns an entire block of random values as an ordered array of integers. This property changes only when the block is regenerated. | {s:atStatus} | Int32[] | |- | Factored Random Value | Returns the current random value as an array of factors | {s:atStatus} | Int32[] | |- | colspan="5" bgcolor="#AADDDDD" | Control |- | Is Enabled | If set to false the element is completely omitted when the experiment is run | {s:atDesign} | Boolean | |- | Title | Title of the element | {s:atDesign} | String | |- |} == == </div> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> <!--*****************************************************************************************************************************************************************************--> '''Old Roulette Element''' is an element that is designed to produce flexible randomization scenarios in your experiment. In the simplest case it works as a random number generator.<br> '''Warning!''' This element is deprecated, use the new [Roulette-Element|Roulette element] instead.<br><br> {TOC} == Description == In the simplest case it works as a random number generator. For more complicated scenarios it can generate the balanced random blocks of integer numbers and provides a runtime control over them. A simple roulette random number generator can be created by choosing an appropriate event and selecting '''Event''' – '''Add Element''' command and selecting '''Roulette''' under the '''Design''' section. == Practical Use == === A Simple Random Number Generator === Many experiments require the use of simple random number generators for independent, non-blocked features of the design. In a visual task for example it may be necessary to randomly rotate the stimuli on each trial. This factor is unrelated to the experimental factors that will be manipulated in the design (see next section). Once the new Roulette element has been added, it is necessary to amend certain properties in order to get it to behave as appropriately. If the random number generator is simply that, then it is necessary to set the range of the random numbers that are desired in the Factors box by specifying the highest number in the range and placing the letter x behind it. If a stimulus is going to be rotated by a random number of degrees upon each trial for example, then we would set the factors box to read “360x”.{br}{br}It is of course necessary to specify via code, the parameter that will be controlled by the random number that has been generated. === Experimental Factors and Blocking === Most experiments will have a roulette counter to ensure that the main experimental factors are randomly presented, a specific number of times, within each block. If, under the Roulette properties, the property for '''Blocking''' is set to ‘True’, then the main levels of the experimental variables can be defined. Under '''Factors''' the levels of each experimental variable should be written as ‘2x3x3’ or ‘2x2’ etc. The '''Block Length''' will then be calculated, and if a certain variable should be more frequent then others, then this can be manipulated via the '''Value Frequencies''' option. It is of course necessary to assign the output of the '''Factored Random Value''' as a multiparameter array (see Parameters and then in the code snippets, assign the individual parameters of this array to variable names. It is then necessary to specify what the properties of these parameters should be, in the differing levels of each variable. See the bottom of this page for a more detailed example. In the example below, '''Blocking''' is set to "true", and the experimental design in outlined in the Factors box as 2x2x2x3x4. A multi parameter array named ‘fRandomValue’ (visible in orange) has been assigned to the property '''Factored Random Value'''. The individual parameters of this array have been assigned specific names in the snippets box. The last factor (x4) has not been defined. This means that each of the conditions that have been defined, will be repeated 4 times – thus lengthening the duration of each block. Given that the first parameter in the array ‘TContrast’ can be only one of two values (as defined in the Factors box), only four simple lines of code are required to specify what EventIDE should do for each of the 2 levels of this factor. In this example, the shared ‘Colormask’ property of three different elements has been assigned as a multi-parameter array, and the RGB values of this color mask manipulated as required. See the section parameters for more information on manipulating the properties of individual elements. @@ csharp TContrast=fRandomValue[0]; DContrast=fRandomValue[1]; OContrast=fRandomValue[2]; Distance=fRandomValue [3]; @@
Meta Keywords:
Meta Description:
Change Comment:
ScrewTurn Wiki
version 5.2.0.8. Some of the icons created by
FamFamFam
.