Unable to create logic between blocks


Author
Message
cccyyy
cccyyy
Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)
Group: Forum Members
Posts: 7, Visits: 12
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

Attachments
networklearning_osf.iqx (120 views, 30.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: 105K
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.
cccyyy
cccyyy
Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Sorry about that. I've uploaded all the files into this drive folder. https://drive.google.com/drive/folders/1Ry9FXFsnyEYN8Lkrsv7qvF1Tjn66RmbV?usp=sharing   
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: 105K
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Having briefly looked at the script you attached, one preliminary issue:

Where is that script actually executing <block socialcompleterep1> ( what you refer to as "block 3")? As far as I can see, that block is never actually invoked anywhere.

Your expt elements don't run it, they execute no more than two blocks -- socialcomplete1 (the "practice" block) and socialcomplete2 --

<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2]
</expt>

and block.socialcompleterep1 isn't invoked by any /branch either.


cccyyy
cccyyy
Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)
Group: Forum Members
Posts: 7, Visits: 12
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Sorry about that. I've uploaded all the files into this drive folder. https://drive.google.com/drive/folders/1Ry9FXFsnyEYN8Lkrsv7qvF1Tjn66RmbV?usp=sharing   

The whole program is a little more complicated as it involves four conditions in which participants will be randomly assigned to. But each condition uses the same logic as I mentioned before and this is where I encountered the problem.
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: 105K
cccyyy - 10/4/2022
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Sorry about that. I've uploaded all the files into this drive folder. https://drive.google.com/drive/folders/1Ry9FXFsnyEYN8Lkrsv7qvF1Tjn66RmbV?usp=sharing   

The whole program is a little more complicated as it involves four conditions in which participants will be randomly assigned to. But each condition uses the same logic as I mentioned before and this is where I encountered the problem.

The script never actually runs <block socialcompleterep1>, so I'm not sure how the logic in that block element is supposed to do anything at all.
cccyyy
cccyyy
Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Dave - 10/4/2022
cccyyy - 10/4/2022
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Sorry about that. I've uploaded all the files into this drive folder. https://drive.google.com/drive/folders/1Ry9FXFsnyEYN8Lkrsv7qvF1Tjn66RmbV?usp=sharing   

The whole program is a little more complicated as it involves four conditions in which participants will be randomly assigned to. But each condition uses the same logic as I mentioned before and this is where I encountered the problem.

The script never actually runs <block socialcompleterep1>, so I'm not sure how the logic in that block element is supposed to do anything at all.
You're right! This is one thing I missed. But the problem still exists after I added the <block socialcompleterep1> 

It looks like this now (I've updated the file in the drive folder also):
<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2; 3=socialcompleterep1]
</expt>

I think there are still problems within each condition as I mentioned at the beginning. Could you also have a look at that? Thank you so much!!!

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: 105K
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Sorry about that. I've uploaded all the files into this drive folder. https://drive.google.com/drive/folders/1Ry9FXFsnyEYN8Lkrsv7qvF1Tjn66RmbV?usp=sharing   

The whole program is a little more complicated as it involves four conditions in which participants will be randomly assigned to. But each condition uses the same logic as I mentioned before and this is where I encountered the problem.

The script never actually runs <block socialcompleterep1>, so I'm not sure how the logic in that block element is supposed to do anything at all.
You're right! This is one thing I missed. But the problem still exists after I added the <block socialcompleterep1> 

It looks like this now (I've updated the file in the drive folder also):
<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2; 3=socialcompleterep1]
</expt>

I think there are still problems within each condition as I mentioned at the beginning. Could you also have a look at that? Thank you so much!!!

> But the problem still exists

Please spell out, clearly, what the supposed problem actually is. "Bizarre results" doesn't really tell me anything.

For what it's worth, what I'm guessing you actually want is

<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2]
</expt>

with

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcompleterep1]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]

</block>

and

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]

</block>

(analogously for the other conditions
cccyyy
cccyyy
Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)Associate Member (113 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Dave - 10/4/2022
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Sorry about that. I've uploaded all the files into this drive folder. https://drive.google.com/drive/folders/1Ry9FXFsnyEYN8Lkrsv7qvF1Tjn66RmbV?usp=sharing   

The whole program is a little more complicated as it involves four conditions in which participants will be randomly assigned to. But each condition uses the same logic as I mentioned before and this is where I encountered the problem.

The script never actually runs <block socialcompleterep1>, so I'm not sure how the logic in that block element is supposed to do anything at all.
You're right! This is one thing I missed. But the problem still exists after I added the <block socialcompleterep1> 

It looks like this now (I've updated the file in the drive folder also):
<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2; 3=socialcompleterep1]
</expt>

I think there are still problems within each condition as I mentioned at the beginning. Could you also have a look at that? Thank you so much!!!

> But the problem still exists

Please spell out, clearly, what the supposed problem actually is. "Bizarre results" doesn't really tell me anything.

For what it's worth, what I'm guessing you actually want is

<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2]
</expt>

with

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcompleterep1]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]

</block>

and

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]

</block>

(analogously for the other conditions

Sorry I should have been more clear about my problem. The thing is I tried several times and each time getting different patterns of errors. I've revised the code as you advised, but the problem still persisted. I uploaded the revised script and a dataouput file.

Here's the test result:
block one (practice)
block two (failed some trials)
block three (all 12 trial correct)
block three (all 12 trial correct, ideally the program should end here because we have two correct trials consecutively, but it continued)
block four (failed some trials)
block five (all 12 trial correct and the program ended here).

Also, are you suggesting that I don't need to add socialcompleterep1 into the following code?
<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2]
</expt>

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: 105K
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
cccyyy - 10/4/2022
Dave - 10/4/2022
cccyyy - 10/4/2022
<block socialcomplete1>
/preinstructions = (socialinstruct1, socialinstruct2, socialinstruct3, socialinstruct4, socialinstruct5, instruct5)
/trials = [1-12 = noreplace(S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/postinstructions = (round1)
</block>

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
</block>

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]
</block>

I created three blocks named "socialcomplete1" "socialcomplete2" and "socialcompleterep1". Each block has 12 rounds.
Block 1 ("socialcomplete1") is a practice trial. What I want is that the program would end when participants successfully finish two blocks consecutively either in the order of Block 2 ("socialcomplete2") and Block 3("socialcompleterep1"), or Block 3("socialcompleterep1") and Block 2 ("socialcomplete2"). But with the above code, I always obtained very bizarre results. 

I've tried to debug this code for almost a week but no luck so far. Would really appreciate if anyone could help!!!

If your code requires external files to run, as yours does, please always provide all necessary files.

Sorry about that. I've uploaded all the files into this drive folder. https://drive.google.com/drive/folders/1Ry9FXFsnyEYN8Lkrsv7qvF1Tjn66RmbV?usp=sharing   

The whole program is a little more complicated as it involves four conditions in which participants will be randomly assigned to. But each condition uses the same logic as I mentioned before and this is where I encountered the problem.

The script never actually runs <block socialcompleterep1>, so I'm not sure how the logic in that block element is supposed to do anything at all.
You're right! This is one thing I missed. But the problem still exists after I added the <block socialcompleterep1> 

It looks like this now (I've updated the file in the drive folder also):
<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2; 3=socialcompleterep1]
</expt>

I think there are still problems within each condition as I mentioned at the beginning. Could you also have a look at that? Thank you so much!!!

> But the problem still exists

Please spell out, clearly, what the supposed problem actually is. "Bizarre results" doesn't really tell me anything.

For what it's worth, what I'm guessing you actually want is

<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2]
</expt>

with

<block socialcomplete2>
/trials = [1-12 = noreplace(S13socialcomplete,
S14socialcomplete,
S15socialcomplete,
S16socialcomplete,
S17socialcomplete,
S18socialcomplete,
S19socialcomplete,
S20socialcomplete,
S21socialcomplete,
S22socialcomplete,
S23socialcomplete,
S24socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcompleterep1]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]

</block>

and

<block socialcompleterep1>
/preinstructions = (round2more)
/trials = [1-12 = noreplace (S1socialcomplete,
S2socialcomplete,
S3socialcomplete,
S4socialcomplete,
S5socialcomplete,
S6socialcomplete,
S7socialcomplete,
S8socialcomplete,
S9socialcomplete,
S10socialcomplete,
S11socialcomplete,
S12socialcomplete)]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctstreak + block.socialcompleterep1.correctstreak == 24) block.endinstruct]

</block>

(analogously for the other conditions

Sorry I should have been more clear about my problem. The thing is I tried several times and each time getting different patterns of errors. I've revised the code as you advised, but the problem still persisted. I uploaded the revised script and a dataouput file.

Here's the test result:
block one (practice)
block two (failed some trials)
block three (all 12 trial correct)
block three (all 12 trial correct, ideally the program should end here because we have two correct trials consecutively, but it continued)
block four (failed some trials)
block five (all 12 trial correct and the program ended here).

Also, are you suggesting that I don't need to add socialcompleterep1 into the following code?
<expt socialcomplete>
/ groupassignment = random
/ subjects= (1 of 4)
/ blocks = [1=socialcomplete1; 2=socialcomplete2]
</expt>

Okay, thanks for the clarification. Two things need to be fixed:

(1) You'll want to use correctcount, not correctstreak.
(2) In your /branch attributes,

/ branch=[if (block.socialcomplete2.correctcount + block.socialcompleterep1.correctcount <= 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctcount + block.socialcompleterep1.correctcount == 24) block.endinstruct]

is wrong. You need

/ branch=[if (block.socialcomplete2.correctcount + block.socialcompleterep1.correctcount < 24) block.socialcomplete2]
/ branch=[if (block.socialcomplete2.correctcount + block.socialcompleterep1.correctcount == 24) block.endinstruct]

otherwise the first branch will always be true and you end up in an infinite loop.

Attachments
networklearning_osf.rev.iqx (130 views, 31.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search