Limit same-key responses


Author
Message
agt
agt
Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)
Group: Forum Members
Posts: 42, Visits: 84
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

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: 103K
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




agt
agt
Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)
Group: Forum Members
Posts: 42, Visits: 84
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?
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: 103K
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?

You spell out the trial sequence in the <block> elements' /trials attribute.
agt
agt
Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)
Group: Forum Members
Posts: 42, Visits: 84
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?

You spell out the trial sequence in the <block> elements' /trials attribute.

Do you mean this? 

<block compatibletest1>
/ postinstructions = (compatibletest1feedback)
/ bgstim = (targetAleftmixed, orleft, attributeAleft, targetBrightmixed, orright, attributeBright)
/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a = values.sum1a + block.compatibletest1.latency;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a += 1;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a = values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency);
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct;
]
</block>
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: 103K
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?

You spell out the trial sequence in the <block> elements' /trials attribute.

Do you mean this? 

<block compatibletest1>
/ postinstructions = (compatibletest1feedback)
/ bgstim = (targetAleftmixed, orleft, attributeAleft, targetBrightmixed, orright, attributeBright)
/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a = values.sum1a + block.compatibletest1.latency;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a += 1;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a = values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency);
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct;
]
</block>

The /trials attribute in the blocks, yes.

Instead of

/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]


you need to spell out a trial sequence that does what you want. So

/ trials = [1=instructions;
2=sequence(attributeA, argetAleft, ...);
]


agt
agt
Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)
Group: Forum Members
Posts: 42, Visits: 84
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?

You spell out the trial sequence in the <block> elements' /trials attribute.

Do you mean this? 

<block compatibletest1>
/ postinstructions = (compatibletest1feedback)
/ bgstim = (targetAleftmixed, orleft, attributeAleft, targetBrightmixed, orright, attributeBright)
/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a = values.sum1a + block.compatibletest1.latency;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a += 1;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a = values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency);
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct;
]
</block>

The /trials attribute in the blocks, yes.

Instead of

/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]


you need to spell out a trial sequence that does what you want. So

/ trials = [1=instructions;
2=sequence(attributeA, argetAleft, ...);
]


I would like my sequence to be randomised. Just not more than 4 consecutive same key response.
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: 103K
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?

You spell out the trial sequence in the <block> elements' /trials attribute.

Do you mean this? 

<block compatibletest1>
/ postinstructions = (compatibletest1feedback)
/ bgstim = (targetAleftmixed, orleft, attributeAleft, targetBrightmixed, orright, attributeBright)
/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a = values.sum1a + block.compatibletest1.latency;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a += 1;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a = values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency);
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct;
]
</block>

The /trials attribute in the blocks, yes.

Instead of

/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]


you need to spell out a trial sequence that does what you want. So

/ trials = [1=instructions;
2=sequence(attributeA, argetAleft, ...);
]


I would like my sequence to be randomised. Just not more than 4 consecutive same key response.

I've already explained to you that that's not trivial to do and what you'd have to work out to do this. You can either do that and read up on the things you don't know or you go for the easier option and use fixed trial sequences.
agt
agt
Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)Associate Member (96 reputation)
Group: Forum Members
Posts: 42, Visits: 84
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?

You spell out the trial sequence in the <block> elements' /trials attribute.

Do you mean this? 

<block compatibletest1>
/ postinstructions = (compatibletest1feedback)
/ bgstim = (targetAleftmixed, orleft, attributeAleft, targetBrightmixed, orright, attributeBright)
/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a = values.sum1a + block.compatibletest1.latency;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a += 1;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a = values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency);
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct;
]
</block>

The /trials attribute in the blocks, yes.

Instead of

/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]


you need to spell out a trial sequence that does what you want. So

/ trials = [1=instructions;
2=sequence(attributeA, argetAleft, ...);
]


I would like my sequence to be randomised. Just not more than 4 consecutive same key response.

I've already explained to you that that's not trivial to do and what you'd have to work out to do this. You can either do that and read up on the things you don't know or you go for the easier option and use fixed trial sequences.

I would like to integrate the following to the script:
 consecutiveCorrectResponses = 0;
        maxConsecutiveCorrectResponses = 3;

however, i am unsure which section to include this.
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: 103K
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/9/2024
atgoh - 7/9/2024
Dave - 7/8/2024
atgoh - 7/8/2024
Hi Dave. I would like to make the change. May I find out how to do this?

Look at the combined blocks as they exist now and understand how they work. That's step one.

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.

Otherwise you need to come up with an algorithm that produces random trial sequences that satisfy all the properties above and implement it. This is not trivial.

Thanks Dave. I have noted on the number of trials for each combined blocks. It would be ideal to come up with a script to produce random trial sequence that limit not more than 4 times the same response key in each combined task. 

That is what you should work on then. What you have on your hands there is a constraint satisfaction problem (cf. https://forums.millisecond.com/Topic6419.aspx ), so be prepared to spend some time on this.

Thanks for the information. Is there a starting script or section where I can work on? I have no background on computer science/scripts so it will be great to get some advice from you.

You should not start with any code. You should start with doing the math and spelling out an algorithm -- i.e. a series of precisely defined steps that will yield the desired result -- that produces trial sequences in the way you want them to. You don't need a script for that, you need a piece of paper. Once you have your algorithm worked out, you can start thinking about implementing it. It's only then that you need to concern yourself with any code.

There’s a total of 7 blocks, of which 4 blocks are combined tasks consisting of 32 and 64 trials. Within each ofthe 4 blocks, there should be not more than 4 consecutive same key responses.

Yes. That is not an algorithm. That is a statement of the desired end state. You need to work out the steps that get you to that end state. If you can't do that, my advice is go for the easy option and use a fixed trial sequence, which you can construct by hand.
Unfortunately I am unsure how an algorithm works. How would a fixed trial sequence work?

You simplly write down an order of trials that satisfies the constraints you want. That's what this exercise was for:

Note down the <trial> elements that have the same correct response key in each combined block.

Note down how many trials there are of each type.

Note, too, that combined blocks always alternate between attribute and target trials.

Your easiest option is to simply spell out a fixed trial sequence that satisfiies your added constraint.




Do you mean the blocks or trials?

You spell out the trial sequence in the <block> elements' /trials attribute.

Do you mean this? 

<block compatibletest1>
/ postinstructions = (compatibletest1feedback)
/ bgstim = (targetAleftmixed, orleft, attributeAleft, targetBrightmixed, orright, attributeBright)
/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ ontrialend = [
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.sum1a = values.sum1a + block.compatibletest1.latency;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n1a += 1;
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.ss1a = values.ss1a + (block.compatibletest1.latency * block.compatibletest1.latency);
    if(block.compatibletest1.latency <= 10000 && block.compatibletest1.currenttrialnumber != 1 ) values.n_correct += block.compatibletest1.correct;
]
</block>

The /trials attribute in the blocks, yes.

Instead of

/ trials = [1=instructions;
3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33= random(targetAleft, targetBright);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32 = random(attributeA, attributeB)]


you need to spell out a trial sequence that does what you want. So

/ trials = [1=instructions;
2=sequence(attributeA, argetAleft, ...);
]


I would like my sequence to be randomised. Just not more than 4 consecutive same key response.

I've already explained to you that that's not trivial to do and what you'd have to work out to do this. You can either do that and read up on the things you don't know or you go for the easier option and use fixed trial sequences.

I would like to integrate the following to the script:
 consecutiveCorrectResponses = 0;
        maxConsecutiveCorrectResponses = 3;

however, i am unsure which section to include this.

Adding a bunch of variables will not do a single thing, so the question is beside the point, I'm afraid

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search