Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Unequal repeat times in a loop with different conditions

Hello:

I have met a problem in Opensesame. I have 2 conditions need to be presented in one loop, it would present the condition A or condition B, and the presented order of A and B is random. However, I can’t write the specific things of A and B, because the interior of A and B is also required to randomize.

When I was using the loop to choose the repeat times, I realized that for A I need to present 60 times, but for B, it only need to present for 40 times, they are unequal. However, in the loop it defaults to a fixed number of trials for the A and B sequences (i.e., the A and B sequences are presented with an equal number of trials).

I think condition A should be 60 times, while B should be 40 times, but I don't know how to make it. if there is any solution for it?

Thank you in advance! ☺️





Comments

  • Hi @Zehan,

    I'm having some difficulty understanding your description but I think that what you mean is that you want to run two conditions (A and B) with different probabilties: A should run 60 times and B should run 40 times.

    The simplest way is to create 5 rows in your loop: 3 rows with condition set to "A", and two rows with condition set to "B". Then set the number of cycles to 20. That way you'll end up with 20 x 3 = 60 "A"s, and 20 x 2 = 40 "B"s.

    Note that with this solution, the task will run 3 As and 2 Bs per every five successive trials. If you want more randomization, you could create 10 rows (6 As and 4 Bs) and then set the number of cycles to 10. Or if you want total randomization across the 1000 trials, simply create 100 rows (60 As and 40 Bs) and set the number of cycle to 1.

    Hope this helps,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab ,

    Thanks for your kind reply. It's my problem that I didn't articulate it clearly.

    This is defintely the simplest way to solve this problem.

    However, for the condition A, it will contain 60 different picture pairs( the pairs are not fixed, they are all random), as well as condition B, it will contain 40 different picture pairs( also, random). Because different combinations of pictures in A and B are presented randomly, therefore, if I devide the condition A into A1, A2, A3, condition B into B1 and B2, it will also devide the picture pairs in the big condition A & B, it may lead the picture pairs themselves can't be organized randomly with each other. I wonder if there is other solution that can allow the two different big conditions can have the different repeat times in a loop without deviding into small conditions that have equal repeat times. I don't know if I've made myself clear, please ask me if there is unclear. 😊

    By the way, I have thought about building an array of Python script that containing all the trials of this exp, it can allow the picture pairs to combine randomly, and also presenting A and B randomly, but it will be super complex, and messy😫. Do you think it will be other simple way to solve this problem?

    Thank you again!!!😺


  • Hi @Zehan,

    I understand you don't want the pairs of pictures to be fixed and the same for all participants but I don't really understand the rest of your description.

    Are you using different sets of pictures for conditions A and B or are they all drawn from the same set? How many pictures are you using? Are there constrains regarding the random selection of the pictures? (for example that a picture can only be picked once across all trials). Etc.

    The solution may be more or less complex depending on what exactly you want to do.

    For complex randomizations, the most flexible (and often then only) option is indeed to work with arrays of elements in Python (unless you plan to run your task in the browser, in which case you should use JavaScript) to set up your trials list, and then to populate the loop from the array as the task progresses.

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab ,

    I will try to explain it clearly.

    For the condition A and B, they are from the same picture set, this set has 120 picture inside.

    When the experiment begins, the half of the pictures(60) will be allocated into condition A, and the rest (60) will be allocated into condition B.

    The picture will be presented as pairs,( e.g. mouse-keyboard in condition A, and sunglasses-cat in condition B for the subject 1, while for subject 2, mouse-cat in condition A, and sunglasses-dog in condition B, I can't tell the specific pairs for each subject, becasue it is randomly allocated by the code).

    For pictures, when they are allocated into condition A and condition B, it means the pictures in condition A will not present in condition B, as the example of subject 1 above, the mouse-keyboard will not present at condition B, but the picture pair will present twice in condition A(e.g., showing keyboard-mouse again in the condition A), in this case, each picture will present twice in the condition A; and you may have questions about the condition B, follow this thought, it seems that condition B has the same picture pairs as A, but I will not show the entirely picture pairs in condition B, this is becasue the experiment manipulation, so in the condition B , it will be present 40 picture pairs randomly.

    I do not know if it is clear enough, please ask me about the unclear part.

    I have done a lot of the random allocation about the picture pairs, but I was stuck in the repeat times. Maybe there is not other opition to devided the loop into 60/40 because of the complex randomation in this experiment, but only do the arrays of elements in Python......? However, I do not the experience of using python script to build the loop, that's why I asked at first......but if there are no methods, I will try😣

    Thanks for your help and suggestions!

    Best,

    Zehan


  • I used the arrays in Python to solve this question 😁 😁 for the totally random problem, this definitely the greatest way to solve it!!


Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games