Howdy, Stranger!

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

Supported by

[solved] Flexible trial order -- adaptive designs

edited June 2013 in OpenSesame


I'm looking into Opensesame's abilities regarding adaptive designs. What I want is, to use Opensesame to construct all my trial sequences, use its logging and other facilities, but I also to be able to dynamically decide what trial will run next, with what exact parameter setting, and how many trials there will be in total.

I thought I can simply use an inline script in a loop that will figure out what to do next, i.e. determine the next parameter combination, set the corresponding variables and potentially adjust the number of trials in a loop. The latter seems to be possible:

However, doing a self.experiment.set() in an inline script doesn't seem to be enough to communicate a a parameter to a predefined trial sequence. Without any variable definition in the loop Opensesame complains about an unknown variable. If I add a dummy definition
of this variable to the loop it doesn't complain anymore, but the set() has no effect on the remaining items in the trial sequence (inline script is first item in the sequence). I assume this is because the whole trial is somehow pre-crafted before it (and therefore the script) runs.

What is the best strategy to be able to use predefined trial sequences, but control trial order and trial parameters dynamically during the experiment?

Thanks in advance,



  • edited 12:16AM

    Hi Michael,

    If you add a self.experiment.set('my_var', 'my_value') statement in an inline_script item at the start of a (trial-)sequence, it should work, but only if you add it to the prepare phase. This is because most of the trial is pre-constructed, as you point out. By inserting Python code to the prepare tab of an inline_script you can modify variables etc., before the sketchpads etc have been constructed.

    Does this answer your question?


    Buy Me A Coffee

  • mihmih
    edited 12:16AM

    Sorry for the delay, I forgot that there is no email notification. Indeed I had the respective code in the run phase. Moving it worked, thanks!

  • edited 12:16AM

    Good that it works!

    And right, you should receive e-mail notifications if you bookmark a discussion with the big yellow star. That's not completely obvious, though, so I'll try to make that a bit clearer.

    Buy Me A Coffee

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 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