Positioning of random images & Using a conditional expression in /trialduration... & more.


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

/ timeout = (if(values.timer30="on") values.trial_limit30 else (if(values.timer60="on") values.trial_limit60))


is invalid syntax. Inquisit does not have an else if control structure. You need to solve this differently. (Hint: There is no need for separate values entries for the 30 and 60 second timeouts; use a single one and just set it to either 30 or 60 seconds.)


Regards,


~Dave


aya
aya
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 14, Visits: 1

THANK YOU! I have one more question about my code (which is updated). I also used the timer that you made, I hope that is okay. 


When the participant is in the 60 second condition, I want to make values.60timer "on" and I specify this in the particular <expt> element.  However, it seems that values.30timer also gets switched to "on" as well in this condition, and so the /timeout property automatically goes to values.trial_limit30 (30 sec). The value.timers are all default "off". I don't see where it is being changed to "on" in my code unless the other conditions are getting looked at. 


Attachments
dvms.exp (883 views, 18.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

I will take more time to read up on how these properties work before asking again


I'm not trying to scare you from asking further questions. Rather, I'm suggesting that getting to grips with some of Inquisit's basic constructs first will save you a lot of time and effort. The tutorials should provide you with a solid foundation in that regard.


And oops, I didn't mean blocks -- I meant conditions (<expt>). I only get the first <expt> which goes through those instruction pages (not all of the <expt> elements go through all of them, or go through different ones). 


The different <expt> elements are run based on the numerical subject id. See the documentation for the /subjects attribute; see https://www.millisecond.com/forums/Topic4150.aspx#4150 for a more technical description. Case in point: You need to enter different subject numbers if you want to run different <expt>s.


Regards,


~Dave


aya
aya
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 14, Visits: 1

Thank you, I really appreciate your replies. I will take more time to read up on how these properties work before asking again. It's just that I can't exit after making the choice (with ALT+F4) so I found that weird. And oops, I didn't mean blocks -- I meant conditions (<expt>). I only get the first <expt> which goes through those instruction pages (not all of the <expt> elements go through all of them, or go through different ones). 


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

How do you get your code so nice and formatted?


See https://www.millisecond.com/forums/Topic4400.aspx#4400.


Except now, the script crashes after I make a choice.


No, it does not crash after making a choice. In the "timer" conditions, you've set each trial to last 90 seconds via /trialduration. So, if you make a choice at, say, 5 seconds into the trial, the script will wait for 85 seconds before starting the next trial. You've told it to do so. Note that trialduration != timeout, see the documentation for those attributes for details. Also see the "How to Control Trial Duration and Inter-Trial
Intervals" topic in the Inquisit documentation.


And if I DO let it idle for more than the trials I've specified (I only have 2 trials up right now for a particular block), it will pick another trial from the list, even though I specified noreplacenorepeat


You are mistaken about how sequence() as in


<block visual>
/ trials = [1-2=sequence(yogurt_01, yogurt_02)]
</block>


works. See https://www.millisecond.com/community/forums/p/1306/4092.aspx#4092. 'noreplacenorepeat' has nothing to do with it.


In addition, other blocks are never "chosen"... so far, every time I've run the code, it only gives me the first block.


Well, again that's how you've set up the script:


<expt>
/ preinstructions = (visualintro, education, timer)
/ postinstructions = (generaloutro)
/ onexptbegin = [values.vis="on"; values.timer="on"; values.edu="on"]
/ blocks = [1=sequence(visual)]
/ subjects = (1 of 8)
</expt>


obviously only runs a single block. The script can't chose another one if you don't tell it to. Additionally see the documentation for the /subjects attribute for details on between-subjects condition assignment based on the numerical subject id. I generally recommend you re-visit the various tutorials contained in the Inquisit helpfile to refresh some basics.


Regards,


~Dave




aya
aya
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 14, Visits: 1

How do you get your code so nice and formatted? I don't wanna post my entire code and have it be double-spaced and annoying to read. I uploaded my code, if you could please look at it.


Thank you for the advice, I managed to get the randomization of images working! Except now, the script crashes after I make a choice. It doesn't crash when I let it idle and let trialduration go to the next trial. And if I DO let it idle for more than the trials I've specified (I only have 2 trials up right now for a particular block), it will pick another trial from the list, even though I specified noreplacenorepeat. I thought the experiment would have finished. Or will it not finish until a selection has been made? I can view the individual trials in Object Browser, but the selection problem occurs for each one. 



In addition, other blocks are never "chosen"... so far, every time I've run the code, it only gives me the first block.



Thank you very much.


Aya


Attachments
dvx.exp (826 views, 17.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

This would mean I would have to specify the list of images in /item for each <picture>, then, and have to use multiple <counter>s to make sure that each image presented is unique? 


The answer to both is "Not necessarily":


<text left>
/ items = myitems
/ position = (25%,50%)
/ select = mycounter
</text>

<text center>
/ items = myitems
/ position = (50%,50%)
/ select = mycounter
</text>

<text right>
/ items = myitems
/ position = (75%,50%)
/ select = mycounter
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
</item>

<counter mycounter>
/ select = noreplace(1-3)
/ selectionrate = always
</counter>

<trial mytrial>
/ stimulusframes = [1=left, center, right]
/ validresponse = (anyresponse)
</trial>

<block myblock>
/ trials = [1-3=mytrial]
</block>


The optimal approach depends on what you ultimately want to do, so plan wisely.


Regards,


~Dave


aya
aya
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 14, Visits: 1

Ahh that makes a lot more sense now! Thank you very much. 


This would mean I would have to specify the list of images in /item for each <picture>, then, and have to use multiple <counter>s to make sure that each image presented is unique? 


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K

A <counter> referenced in a stimulus element's (<text>, <picture>, etc.) /select attribute has the purpose of delivering an item's index number, not the actual item. Thus


<text mytext>
/ items = ("a","b","c")
/ select = mycounter
</text>

<counter mycounter>
/ select = sequence(1,2,3)
</counter>


Regards,


~Dave


aya
aya
Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)Distinguished Member (3.5K reputation)
Group: Forum Members
Posts: 14, Visits: 1

But what I want to be randomized is in the counter. (e.g. the numbers 5, 4, 3, 2, 1) If I put something in /items, wouldn't that disregard the numbers in the counter? 


I want to do something like what you did in the other topic:



<counter type2pos>


/ items = (5%,25%,25%,35%,50%,65%,80%,95%)


/ not = (type1pos)


/ select = noreplace


/ selectionrate = always


</counter>


Where the different percentages are being put into the hposition property in <text>. Does /select in <text> not have access to the /items in <counter>? 


Aya


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search