Millisecond Forums

Random stimuli sets

https://forums.millisecond.com/Topic2384.aspx

By IvoR - 1/13/2009

Hey everyone,

Currently I'm making a unconcious thinking task. For this, people get presented a lot of information, in this case the specifications of cars. The idea of presenting this information is that it is random for every participant. There are 3 variables, which have to be randomly selected, but are connected to each other and can't change during the entire experiment: the number of the car, the color of the car and the set of 10 specifications. I've been able to randomize these variables, but I did it via a detour (let a combination of a trial and block take random items from a item-list and then put them in another item-list). Is there a more easier way for me to do this? The possible parameters are quite easy: the carnumbers and the set numbers range from 1 to 10. The colors are: dark blue, light blue, dark green, light green, orange, pink, yellow, red, black and grey.

Kinds regards,

Ivor
By seandr - 1/14/2009

Hi Ivor,


Would it be possible to attach your script to this message thread? That would allow me to see more clearly what you are trying to do and determine whether there is a more efficient way.


Thanks,
Sean

By IvoR - 1/14/2009

Hey Sean,

Of course it is possible to put the script online. You can find it at www.student.ru.nl/i.grisel/Subconcious Experiment.zip .

A little explanation on the files: I've stripped both files to the bare/bear essentials. This includes two main parts, namely presenting cars and getting a nice timer. Since both took a lot of stimuli to make, I've made three files. The first one is to run the whole experiment, namely Subconcious Experiment.exp. The stimuli file is named Random Car Stimuli.exp. Next to that I've also have a file with the car specifications which is in Auto.exp.
A little bit more explanation is required for the Stimuli file. Since I had three variables which needed to be created random for each participant, that gave me a lot of combinations for cars (10 possible carnumbers, 10 possible colors and 10 possible sets of specifications). To get the random lists, I made 3 item-lists, got to present this list randomly (shown in white and timeout 0)(via a trial and block) and let it put the presented words back in a list.
After that, I hard-scripted every possible combination so I could activate them with a branch command. Don't worry, I didn't type it all: I let my little Python script do it for me ;) So my question about this is, if there's a way to do it in a more flexible way, in which Inquisit generates the random lists and maybe even reduce the hard-scripting?
The second question is a bit of the same: is it possible to make a timer without implementing every possible time?

Thanks a lot for your help!

Ivor
By Dave - 1/14/2009

The second question is a bit of the same: is it
possible to make a timer without implementing every possible time?




With a little bit of lateral thinking, yes. I've used the <video>
element and the <block> element's '/bgstim' command in the past
to provide participants with continuous information about the elapsed
time across trials. You'd basically have a video or (even better) a
flash file that serves as a digital clock. I can email you these files
as well as an example script if you want.



Regards,

~Dave
By IvoR - 1/14/2009

The second question is a bit of the same: is it possible to make a timer without implementing every possible time?


With a little bit of lateral thinking, yes. I've used the <video> element and the <block> element's '/bgstim' command in the past to provide participants with continuous information about the elapsed time across trials. You'd basically have a video or (even better) a flash file that serves as a digital clock. I can email you these files as well as an example script if you want.

Regards,
~Dave


I didn't thought about that possibility! It certainly is a more hansome solution in the script. I would really appreciate it if you would sent the files. I'm curious how that will look. Too bad my employer doesn't really care much for the way it is implemented, just how it looks :)
My mailadress is nospam_i.grisel@student.ru.nl (without the nospam_ obviously). Thanks!

Ivor
By seandr - 1/15/2009

You'd basically have a video or (even better) a flash file that serves as a digital clock.


A flash file! I hadn't thought of this before. Great idea.


-Sean

By Dave - 1/15/2009

A flash file! I hadn't thought of this before. Great idea.


I came up with this approach back in the good, old Inquisit 2.0 days. We had subjects do a timed writing task and needed to provide them with continuous information about the time they had left to complete their essays. If you have any use for the flash file, just let me know.

Best wishes,
~Dave
By IvoR - 1/15/2009

Hey Dave,

I checked out the file you sent. I wasn't that impressed with the timer (although the idea of a flash tile or movie is still quite clever ;)), but really with the Tower of Hanoi problem! It looks really great. Hopefully I'll get the chance myself to have to make something like that (but only if my employer wants that of course).

I also hope you could answer my other answer. But take your time, there's no time pressure since the program is working, I'm just curious about a more... 'beautiful' way of programming it.

Kind regards,

Ivor

By Dave - 1/15/2009

Hey Dave,

I checked out the file you sent. I wasn't that impressed with the timer (although the idea of a flash tile or movie is still quite clever ;)), but really with the Tower of Hanoi problem! It looks really great. Hopefully I'll get the chance myself to have to make something like that (but only if my employer wants that of course).

I also hope you could answer my other answer. But take your time, there's no time pressure since the program is working, I'm just curious about a more... 'beautiful' way of programming it.

Kind regards,

Ivor



Hey Ivor,

well, the timer certainly isn't meant to be actually 'impressive' but simplistic and functional. You can do all sorts of things with this approach (including impressive ones!). Just take the general idea and optimize it for your particular needs. Many thanks for the comments on the Tower of Hanoi script (although it's only a rough sketch and I'm not particularly happy with it in its current form). But hey - it does the job. As I already said, I'll look at your other questions whenever I have some time...

Best wishes,
~Dave
By IvoR - 1/15/2009

Hey Dave,

I know the timer is simplistic and functional. Just one catch: I'm not familiar with flash, so I won't be able to fully integrate the timer into my script. And since we want total control (sounds really bad), I think hard-scripting it is the only method here. And since I do know a little Python, hard-scripting isn't all that bad since Python makes the <item>-element :)

What form would you like the Tower to have? More flashy?

And I'll hear from you soon than, but as mentioned: take your time!
By Dave - 1/16/2009

I know the timer is simplistic and functional. Just one catch: I'm not familiar with flash, so I won't be able to fully integrate the timer into my script. And since we want total control (sounds really bad), I think hard-scripting it is the only method here. And since I do know a little Python, hard-scripting isn't all that bad since Python makes the <item>-element :)


If you really want to use method I outlined and tell me exactly what you'd need, I'd even consider doing the flash part for you. Shouldn't be too much work.

What form would you like the Tower to have? More flashy?


I'm not so much concerned about the looks of the script. But the underlying code is a bit crude (i.e. not very elegant) in some places and there are some redundancies I'd have to sort out. It's definitely not something I'd make available to others in its current form. On the other hand: The script does what it's supposed to do - even in its current, unpolished state.

And I'll hear from you soon than, but as mentioned: take your time!


I can't see myself getting around to it in the next few days. And since you already have a functional version up and running, I'll definitely take my time...

Best,
~Dave
By Barbara - 2/7/2010

Hi Dave,


I want to make an experiment where continious information about the time elapsed it's provide. Following your advices, I used <video> and /bgstim command, but my video is to large and low quality. I don't know if it's possible, but could you send me your flash file and an example script, please?


Thank you very much for your help, and sorry for my english,


Barbara.

By Dave - 2/7/2010

The file along with a demo script is available for download at my profile page:


http://www.millisecond.com/community/members/Dave/files/ToH_5F00_Rev2_5F00_Timer.zip.aspx


Let me know if that helps,


~Dave

By Barbara - 2/7/2010

Thank you very much Dave, It's very helpful!


Thanks again for your help,

By kdwhite - 11/9/2011

Hi Dave,


I'm a complete noob to Inquisit, but this answer in a prior Forum seems relevant to my question.  I've previously written code in QB45, Pascal, VB, and C# but am still catching on to Inquisit.


I want to show a video of an ambiguous stimulus and have participants press one of two keys to report its percieved direction of motion.  The video would run continuously for about 4 minutes, during which roughly 50 key presses need to be recorded and time-stamped.  The goalis to estimate the proportions of time associated with each of the two possible reports.  My speculation has been to start the video in a block with block duration specified, which block calls a do-loop of trials each instance of which writes a data record of its key press.  However, you may have implemented a more elegant solution in your script to answer this prior question.


I will be very grateful for advice or an example how to script in Inquisit.


Thanks & Best,  Keith White (kdwhite@ufl.edu). 

By Dave - 11/9/2011

See https://www.millisecond.com/forums/Topic3446.aspx. The basic setup goes like this:



  • Set up a <video> element.

  • Display video via the <block> element's /bgstim attribute

  • Set the <block> to /timeout after 240000 ms (4 min)

  • Set up a <trial> element to collect responses and have said <trial> element /branch back to itself (creating an infinite loop).

  • Run a *single* instance the trial via the <block> element's /trials attribute.


Regards,


~Dave