constrained randomization help


Author
Message
tcarpenter216
tcarpenter216
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)
Group: Forum Members
Posts: 8, Visits: 11

Hi all,


I have an experiment in which I have three blocks (chips, peanut, cereal) that I need presented in a random order. Typically, I would just use the following command:


/blocks = [1,2,3=noreplace(chips, peanut, cereal)]


However, there is a catch. In between each of the three blocks (chips, peanut, cereal) I need them to do some other things.


In other words, I want them to do one of the three at random, then do some other procedures, then do one of the remaining two blocks  at random, then do some other procedures, then do the last of the three remaining blocks. 


Here is how I attempted to solve it, but the problem here is that this allows you to repeat an earlier block (which I don't want:



<expt ALL>


/ blocks = [1=noreplace(chips, peanut, cereal); 2=interim; 3=noreplace(chips, peanut, cereal); 4=interim; 5=noreplace(chips, peanut, cereal)]


</expt>



I also attempted to solve the problem by using a counter. The problem is, apparently, elements can't be invoked this way. This summarizes the idea of what I want to do. Does anybody know how to pull this off?



<counter chooser>

/ items = (block.chips, block.peanut, block.cereal)

/ select = noreplace

/ selectionrate = always

</counter>



<expt ALL>

/ blocks = [1=counter.chooser.selectedvalue; 2=interim; 3=counter.chooser.selectedvalue; 4=interim; 5=counter.chooser.selectedvalue]

</expt>



As you can see, this code is clearly invalid because you can't "store" blocks in a counter that way. Does anyone know how to correctly implement this randomization procedure?




GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search