Modifying Symmetry Span to Timeout


Author
Message
cgoetz
cgoetz
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 7, Visits: 1

Hey Inquisit folk,


So I'm looking into tailoring the Automated SymmSpan task to make it a little shorter, and i was wondering if anyone (specifically David Nitz) knew how to tailor the task so that when the recall screen appears, the subject doesn't have an infinite amount of time to enter their response (we're worried about subjects just not responding). 


I tried modifying it myself and adding a timeout to the recall_square trial, and it got weird. 


Any ideas?



Thanks,


Calvin


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: 108K

A simple /timeout in <trial recall_square> won't do because said trial element is repeated over and over until the subject clicks exit. Look at the /branch:


/ branch = [if(trial.recall_square.response=="exit")trial.square_feedback else trial.recall_square]


What you need to do is something like summing up the latencies for each run of the trial and then branch along the lines of the above if the sum exceeds a certain threshold. In any case, please make sure you first work through the original script and develop a sufficient understanding of its mechanics prior to introducing any modifications.


Regards,


~Dave


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: 108K

FWIW, if you wanted to limit the max. recall time allotted per each square (i.e., each run of <trial recall_square>) instead of limiting the overall recall time allotted for a given set of squares, the modifications are quite simple:


<trial recall_square>
/ ontrialbegin = [values.recallcount+=1; values.squarenumber+=1]
/ ontrialbegin = [if(values.recallcount==1)values.recalldelay=500 else values.recalldelay=0]
/ pretrialpause = values.recalldelay
/ stimulusframes = [1=WhiteScreen, matrixbg, R1C1, R1C2, R1C3, R1C4, R2C1, R2C2, R2C3, R2C4,
    R3C1, R3C2, R3C3, R3C4, R4C1, R4C2, R4C3, R4C4, _, clear, exit, recallprompt, squarestrings]
/ validresponse = (R1C1, R1C2, R1C3, R1C4, R2C1, R2C2, R2C3, R2C4, R3C1, R3C2, R3C3, R3C4, R4C1, R4C2, R4C3, R4C4, _, clear, exit)
/ monkeyresponse = (R1C1, R1C2, R1C3, R1C4, exit)
/ ontrialend = [if(trial.recall_square.response!="exit" && trial.recall_square.response!="clear")
    {item.RecalledSquares.item=trial.recall_square.response}]
/ ontrialend = [if(trial.recall_square.response=="clear"){clear(item.RecalledSquares); values.squarenumber=0;
    text.R1C1.textbgcolor=(white); text.R1C2.textbgcolor=(white); text.R1C3.textbgcolor=(white);
    text.R1C4.textbgcolor=(white); text.R2C1.textbgcolor=(white); text.R2C2.textbgcolor=(white);
    text.R2C3.textbgcolor=(white); text.R2C4.textbgcolor=(white); text.R3C1.textbgcolor=(white);
    text.R3C2.textbgcolor=(white); text.R3C3.textbgcolor=(white); text.R3C4.textbgcolor=(white);
    text.R4C1.textbgcolor=(white); text.R4C2.textbgcolor=(white); text.R4C3.textbgcolor=(white);
    text.R4C4.textbgcolor=(white);
    text.R1C1.item.1=" "; text.R1C2.item.1=" "; text.R1C3.item.1=" "; text.R1C4.item.1=" ";
    text.R2C1.item.1=" "; text.R2C2.item.1=" "; text.R2C3.item.1=" "; text.R2C4.item.1=" ";
    text.R3C1.item.1=" "; text.R3C2.item.1=" "; text.R3C3.item.1=" "; text.R3C4.item.1=" ";
    text.R4C1.item.1=" "; text.R4C2.item.1=" "; text.R4C3.item.1=" "; text.R4C4.item.1=" "}]
/ ontrialend = [if(trial.recall_square.response=="R1C1"){text.R1C1.item.1=values.squarenumber; text.R1C1.textbgcolor=(red)};
    if(trial.recall_square.response=="R1C2"){text.R1C2.item.1=values.squarenumber; text.R1C2.textbgcolor=(red)};
    if(trial.recall_square.response=="R1C3"){text.R1C3.item.1=values.squarenumber; text.R1C3.textbgcolor=(red)};
    if(trial.recall_square.response=="R1C4"){text.R1C4.item.1=values.squarenumber; text.R1C4.textbgcolor=(red)};
    if(trial.recall_square.response=="R2C1"){text.R2C1.item.1=values.squarenumber; text.R2C1.textbgcolor=(red)};
    if(trial.recall_square.response=="R2C2"){text.R2C2.item.1=values.squarenumber; text.R2C2.textbgcolor=(red)};
    if(trial.recall_square.response=="R2C3"){text.R2C3.item.1=values.squarenumber; text.R2C3.textbgcolor=(red)};
    if(trial.recall_square.response=="R2C4"){text.R2C4.item.1=values.squarenumber; text.R2C4.textbgcolor=(red)};
    if(trial.recall_square.response=="R3C1"){text.R3C1.item.1=values.squarenumber; text.R3C1.textbgcolor=(red)};
    if(trial.recall_square.response=="R3C2"){text.R3C2.item.1=values.squarenumber; text.R3C2.textbgcolor=(red)};
    if(trial.recall_square.response=="R3C3"){text.R3C3.item.1=values.squarenumber; text.R3C3.textbgcolor=(red)};
    if(trial.recall_square.response=="R3C4"){text.R3C4.item.1=values.squarenumber; text.R3C4.textbgcolor=(red)};
    if(trial.recall_square.response=="R4C1"){text.R4C1.item.1=values.squarenumber; text.R4C1.textbgcolor=(red)};
    if(trial.recall_square.response=="R4C2"){text.R4C2.item.1=values.squarenumber; text.R4C2.textbgcolor=(red)};
    if(trial.recall_square.response=="R4C3"){text.R4C3.item.1=values.squarenumber; text.R4C3.textbgcolor=(red)};
    if(trial.recall_square.response=="R4C4"){text.R4C4.item.1=values.squarenumber; text.R4C4.textbgcolor=(red)};]
/ ontrialend = [if(trial.recall_square.response=="exit" || trial.recall_square.response=="0"){
    text.R1C1.textbgcolor=(white); text.R1C2.textbgcolor=(white); text.R1C3.textbgcolor=(white);
    text.R1C4.textbgcolor=(white); text.R2C1.textbgcolor=(white); text.R2C2.textbgcolor=(white);
    text.R2C3.textbgcolor=(white); text.R2C4.textbgcolor=(white); text.R3C1.textbgcolor=(white);
    text.R3C2.textbgcolor=(white); text.R3C3.textbgcolor=(white); text.R3C4.textbgcolor=(white);
    text.R4C1.textbgcolor=(white); text.R4C2.textbgcolor=(white); text.R4C3.textbgcolor=(white);
    text.R4C4.textbgcolor=(white);
    text.R1C1.item.1=" "; text.R1C2.item.1=" "; text.R1C3.item.1=" "; text.R1C4.item.1=" ";
    text.R2C1.item.1=" "; text.R2C2.item.1=" "; text.R2C3.item.1=" "; text.R2C4.item.1=" ";
    text.R3C1.item.1=" "; text.R3C2.item.1=" "; text.R3C3.item.1=" "; text.R3C4.item.1=" ";
    text.R4C1.item.1=" "; text.R4C2.item.1=" "; text.R4C3.item.1=" "; text.R4C4.item.1=" "}]
/ responsemessage = (clear, clickclear, 150)
/ responsemessage = (exit, clickexit, 150)
/ responsemessage = (_, click_, 150)
/ branch = [if(trial.recall_square.response=="exit" || trial.recall_square.response=="0")trial.square_feedback else trial.recall_square]
/ recorddata = true
/ timeout = 5000
</trial>


Regards,


~Dave


cgoetz
cgoetz
Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)Esteemed Member (1.6K reputation)
Group: Forum Members
Posts: 7, Visits: 1

Hey Dave,


Could you provide an example to start off with regarding summing up latency then branching? Would a good way be to create a new value which would update on every trial?


Another solution I considered would be to branch if after a certain amount of time (trial.sometrial.latency >= 10000) the subject hasn't clicked exit yet. Would it be possible to code an automatic exit click after 10000ms if the subject fails to? 


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: 108K

Would a good way be to create a new value which would update on every trial?


Yes. See e.g. for a somewhat related example: http://www.millisecond.com/forums/Topic6989.aspx#6989


Another solution I considered would be to branch if after a certain amount of time (trial.sometrial.latency >= 10000) the subject hasn't clicked exit yet. Would it be possible to code an automatic exit click after 10000ms if the subject fails to? 


That's unnecessary. The /timeout attribute alone already does that.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search