Messing With Branch/ontrialend/stop attributes


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

Hi,


So i'm currently trying to write a script for a test in which I present a pattern image with a missing square, and subjects pick the right square which completes the pattern. I've gotten the images to load with the proper positioning and mouse click responses displaying correct/incorrect.


The trick here, however, is that I need to code the stop cue, which occurs when the subject gets 3 out of the last 5 answers incorrect. 


Here's how I have it set up:


Each trial is one question with 5 different answer options. There's currently one block which dictates all these trials to run in order, and the experiment dictates the one block to run. 


To try and solve the scoring issue, I've tried several things:



  1. Coding /branch [if (trial.a25.correct + trial.a26.correct +trial.a27.correct + trial.a28.correct + trial.a29.correct <= 2) trial.endtrial] into trials. This should theoretically count the last 5 answers (#25-29), and if the subject gets only 2 or less right (3 wrong), it would branch to the last trial trial.endtrial. No good.

  2. Coding /ontrialend [if (trial.a25.correct + trial.a26.correct +trial.a27.correct + trial.a28.correct + trial.a29.correct <= 2) trial.endtrial] into trials. Similar result.

  3. Coding /stop [trial.a25.correct + trial.a26.correct +trial.a27.correct + trial.a28.correct + trial.a29.correct <= 2] into block. I believe this similarly didn't stop the block. 

  4. Coding /stop [trial.a25.correct + trial.a26.correct +trial.a27.correct + trial.a28.correct + trial.a29.correct <= 2] into expt. This simply stopped the experiment before a single trial was run.

  5. Coding /branch [if (trial.a25.correct + trial.a26.correct +trial.a27.correct + trial.a28.correct + trial.a29.correct <= 2) page.end] to see if it would jump to an end page after catching the branch, but no good.

  6. Coding /branch [if (trial.a25.correct + trial.a26.correct +trial.a27.correct + trial.a28.correct + trial.a29.correct <= 2) block.endblock] to see if it would jump to an end block after catching the branch, but no good.


Any advice would be lovely, as I'm at my wit's end here trying to figure out how to make this work. I've considered the possibility of creating some sort of vector measurement that would automatically take the last 5 recorded answers and check if percent correct is less than 40%, but I don't know how to code that.



Here are some example codes:



<expt exptest3>


/preinstructions = (intro, getready)


/postinstructions = (end)


/blocks = [1=block1]   


</expt>



<block block1>


/ trials = [1=A20,A21,A22,A23,A24,A25,A26,A27,A28,A29]


</block>



<trial A25>


/ showmousecursor = true


/validresponse = (A25.1,A25.2,A25.3,A25.4,A25.5,A25.6)


/correctresponse = (A25.5)


/ stimulusframes = [1=A25.big; 2=A25.1,A25.2,A25.3,A25.4,A25.5,A25.6]


/errormessage = true(error, 300)


</trial>




Thanks!


Calvin




GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
cgoetz - 12 Years Ago
Dave - 12 Years Ago
cgoetz - 12 Years Ago
Dave - 12 Years Ago
                     Well, if I reset the <values> entry to 0 on every chunk of 5...
cgoetz - 12 Years Ago
                         Ah, I see. I mistakenly thought you wanted to consider fixed *sets* of...
Dave - 12 Years Ago
                             And here's a quick example of one way to do it via a bit of...
Dave - 12 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search