By nc - 6/26/2020
Hi all, I'm trying to create complex branching where a certain block appears once the subject either (a) gives 2 incorrect responses on the first trial; (b) gives at least 2 correct answers on the first trial and at least 2 incorrect answers on the second trial; (c) gives at least 2 correct answers on the 2nd trial and at least 2 incorrect answers on the 3rd trial....and so on. Here is my code, and it's not working. Can anyone help me understand what I'm doing wrong?
<block test> /trials = [1=one] /branch = [ if (trial.one.totalerrorcount >=2) block.end ] /branch = [ if (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2) block.end ] /branch = [ if (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2) block.end ] /branch = [ if (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2) block.end ] /branch = [ if (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2) block.end ] /branch = [ if (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2) block.end ] /branch = [ if (trial.six.totalcorrectcount >=2) block.end ] </block>
|
By nc - 6/26/2020
here's an example of one of the relevant trials:
<trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial>
|
By Dave - 6/29/2020
+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends.
E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc.
|
By nc - 6/29/2020
+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc.
|
By nc - 6/29/2020
Thank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice?+x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc.
|
By Dave - 6/29/2020
+xThank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice? +x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc. > it seems like the expressions with && are the ones not being properly evaluated
What makes you think that, please?
|
By nc - 6/29/2020
the block doesn't end when there are 2 correct responses on trial 'three' and 2 incorrect on trial 'four', for example.+x+xThank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice? +x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc. > it seems like the expressions with && are the ones not being properly evaluated What makes you think that, please?
|
By Dave - 6/29/2020
+xthe block doesn't end when there are 2 correct responses on trial 'three' and 2 incorrect on trial 'four', for example. +x+xThank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice? +x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc. > it seems like the expressions with && are the ones not being properly evaluated What makes you think that, please? Please provide the full script including any and all external files it requires to run then
|
By Dave - 6/29/2020
+x+xthe block doesn't end when there are 2 correct responses on trial 'three' and 2 incorrect on trial 'four', for example. +x+xThank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice? +x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc. > it seems like the expressions with && are the ones not being properly evaluated What makes you think that, please? Please provide the full script including any and all external files it requires to run then Assuming the /branch attributes in your <trial one> snippet you posted previously are representative and accurate,
/branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three]
notice that you branch to trial.three, not trial.two here -- so it would seem that there are situations where trial.two (and possibly other trials) is never run, which would explain why the a stop condition like
(trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); or (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2);
doesn't fire.
But it's impossible for me to say without actually being able to examine the code in context as well as a sufficiently detailed description of how exactly the script is intended to behave.
|
By nc - 6/29/2020
+x+xthe block doesn't end when there are 2 correct responses on trial 'three' and 2 incorrect on trial 'four', for example. +x+xThank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice? +x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc. > it seems like the expressions with && are the ones not being properly evaluated What makes you think that, please? Please provide the full script including any and all external files it requires to run then
|
By nc - 6/29/2020
+x+x+xthe block doesn't end when there are 2 correct responses on trial 'three' and 2 incorrect on trial 'four', for example. +x+xThank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice? +x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc. > it seems like the expressions with && are the ones not being properly evaluated What makes you think that, please? Please provide the full script including any and all external files it requires to run then
|
By nc - 6/29/2020
Also to reply to a previous comment: the branching you pointed to is intentional (3 should come after 1). It is possible that trial 2 would never be run. nonetheless, even when I try two correct on 3 and 2 incorrect on 4, it still doesn't end the block.+x+x+x+xthe block doesn't end when there are 2 correct responses on trial 'three' and 2 incorrect on trial 'four', for example. +x+xThank you for the quick reply. I set up the stop logic like this, but it still doesn't seem to be working: <block test> /trials = [1=one] /stop = [ (trial.one.totalerrorcount >=2); (trial.one.totalcorrectcount >=2 && trial.two.totalerrorcount >=2); (trial.two.totalcorrectcount >=2 && trial.three.totalerrorcount >=2); (trial.three.totalcorrectcount >=2 && trial.four.totalerrorcount >=2); (trial.four.totalcorrectcount >=2 && trial.five.totalerrorcount >=2); (trial.five.totalcorrectcount >=2 && trial.six.totalerrorcount >=2); (trial.six.totalcorrectcount >=2)] </block> in particular, it seems like the expressions with && are the ones not being properly evaluated. Any advice? +x+x+xhere's an example of one of the relevant trials: <trial one> / stimulusframes = [1=one, plus_one, minus_one, try_again, pond, duck_1_a, duck_1_b, duck_2_a, duck_2_b, duck_3_a, duck_3_b, duck_4_a, duck_4_b, duck_5_a, duck_5_b, pond] / inputdevice = dragdrop / showmousecursor = true /droptargets = (pond) / validresponse = (plus_one, minus_one, try_again) / correctresponse = (plus_one) /ontrialbegin=[ picture.duck_1_a.hposition=24%; picture.duck_1_a.vposition=45%; picture.duck_1_b.hposition=5%; picture.duck_1_b.vposition=30%; picture.duck_2_a.hposition=20%; picture.duck_2_a.vposition=30%; picture.duck_2_b.hposition=15%; picture.duck_2_b.vposition=40%; picture.duck_3_a.hposition=25%; picture.duck_3_a.vposition=55%; picture.duck_3_b.hposition=5%; picture.duck_3_b.vposition=20%; picture.duck_4_a.hposition=10%; picture.duck_4_a.vposition=35%; picture.duck_4_b.hposition=20%; picture.duck_4_b.vposition=35%; picture.duck_5_a.hposition=30%; picture.duck_5_a.vposition=55%; picture.duck_5_b.hposition=13%] /branch = [if (trial.one.response == "try_again") trial.one] /branch = [if (trial.one.response == "minus_one") trial.one] /branch = [if (trial.one.response == "plus_one") trial.three] </trial> /branch attributes at the <block> level are executed when that block ends, not sometime in the middle of the block, while the block is still running trials. It's not clear at all from the snippets you posted when the block ends. E.g. if you want the block to immediately terminate after two errors in <trial one>, you need to put some /stop logic in the <block> to do that etc. > it seems like the expressions with && are the ones not being properly evaluated What makes you think that, please? Please provide the full script including any and all external files it requires to run then
|
By Dave - 6/29/2020
Thanks for the script. I asked you for some kind of description of how that script is actually supposed to behave. That isn't evident from the code. Can I get that please?
A slightly revised version based on some guesswork is attached. I fixed a few errors (e.g. some /branch in trial.two was relying on the response to trial.three, not the response to trial.two) and added a few additional columns to the data file and some expression so you can see exactly which stop condition fired.
|
By nc - 6/29/2020
I'm not sure what kind of description I should provide. It's meant to function as a counting task to be administered to children. They are asked to drag the ducks into a pond. There is a demonstration trial first, and then they are asked to place successive numbers of ducks into a pond (e.g., 1 duck, then 3 ducks, then 4, then 5). It's titrated, so if they get a number wrong, they go up a number. If they get it right, they go down a number. An adult grades their answers by either pressing "next' or "previous" (depending on whether the child got the answer right or wrong). The experiment is meant to end when children either a) fail the 1 trial twice, b) fail any given trial twice, but succeed on the previous trial twice, or c) succeed on the last trial twice.
|
By nc - 6/29/2020
+xI'm not sure what kind of description I should provide. It's meant to function as a counting task to be administered to children. They are asked to drag the ducks into a pond. There is a demonstration trial first, and then they are asked to place successive numbers of ducks into a pond (e.g., 1 duck, then 3 ducks, then 4, then 5). It's titrated, so if they get a number wrong, they go up a number. If they get it right, they go down a number. An adult grades their answers by either pressing "next' or "previous" (depending on whether the child got the answer right or wrong). The experiment is meant to end when children either a) fail the 1 trial twice, b) fail any given trial twice, but succeed on the previous trial twice, or c) succeed on the last trial twice. Sorry, I meant to say - if they get a number wrong, they go down a number. If they get it right, they go up a number*
|
By nc - 6/29/2020
+x+xI'm not sure what kind of description I should provide. It's meant to function as a counting task to be administered to children. They are asked to drag the ducks into a pond. There is a demonstration trial first, and then they are asked to place successive numbers of ducks into a pond (e.g., 1 duck, then 3 ducks, then 4, then 5). It's titrated, so if they get a number wrong, they go up a number. If they get it right, they go down a number. An adult grades their answers by either pressing "next' or "previous" (depending on whether the child got the answer right or wrong). The experiment is meant to end when children either a) fail the 1 trial twice, b) fail any given trial twice, but succeed on the previous trial twice, or c) succeed on the last trial twice. Sorry, I meant to say - if they get a number wrong, they go down a number. If they get it right, they go up a number* I see now you sent the script. Thank you SO much!! Works great
|
|