Howdy, Stranger!

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

Supported by

[solved] randomizing the order of 3 tasks x 2 conditions and 6 questions

edited February 2014 in OpenSesame

Hello hello,

I've designed a behavioural experiment in OpenSesame with 3 related tasks each of which has two conditions. Currently, the OpenSesame 'experiment' is organized into 3 'sequences' for the tasks and containing 2 'loops' & 'sequences' for the conditions, these conditions must occur in order. But, I would like the task order itself to vary.

  1. How do I randomize the tasks (3 'sequences' within the 'experiment')?

Additionally, I have 6 multiple choice questions, each of which should randomly follow a single condition and not be repeated.

  1. How(where) do I implement these multiple choice questions so that all are possible but only one occurs following one of my conditions as I have described them?
  2. How do I randomize the occurrence of my multiple choice questions in this format?

Any help would be greatly appreciated. Thanks for reading through my problem.

Comments

  • edited 11:09AM

    How do I randomize the tasks (3 'sequences' within the 'experiment')?

    One way is to add the your three sequences to a 'container' sequence and loop, like so:

    image

    Then you define a variable sequence_nr in container_loop and give it the values 1, 2, and 3 (so three cycles). Finally, you use this variable to run only one sequence for each cycle of container_loop, with the following run-if statements for sequence1, sequence2, and sequence3:

    [sequence_nr] = 1
    [sequence_nr] = 2
    [sequence_nr] = 3
    

    This effectively randomizes the order of container_sequence. Does that make sense?

    How(where) do I implement these multiple choice questions so that all are possible but only one occurs following one of my conditions as I have described them? How do I randomize the occurrence of my multiple choice questions in this format?

    This will require a little Python scripting. At the beginning of your experiment, define all the questions and response options that you want to present. For example:

    # NOTE: This script needs to be in the prepare phase, somewhere at the beginning of the experiment
    from random import shuffle
    # Define a list of multiple choice questions. Each question is actually a
    # tuple, consisting of the question, the first option, and the second option.
    mc_list = [
        ('Question 1', 'Option 1A', 'Option 1B'),
        ('Question 2', 'Option 2A', 'Option 2B'),
        ]
    # Randomize the list
    shuffle(mc_list)
    

    Now, just before the form_multiple_choice plug-in, get one of the questions from the list:

    # NOTE: This script should precede the form and be placed in the prepare phase.
    # Get and remove (i.e. pop) one question from the list of questions
    question, option_A, option_B = mc_list.pop()
    # Set the variables, so that they can be used in the form and are logged by
    # OpenSesame
    exp.set('_question', question)
    exp.set('_option_A', option_A)
    exp.set('_option_B', option_B)
    

    Now you can simply use the square-brackets notation to use [_question], [_option_A], and [_option_B] in your form_multiple_choice to define the question and response options.

    Cheers,
    Sebastiaan

  • edited 11:09AM

    Thanks for the help, it was very much appreciated!

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