Experiment that skips forward and jumps back through blocks


I am trying to create an experiment of a total of 30 blocks with increasing difficulty, where participants need to get 3 trials correct in one block, and they will skip forward 5 blocks. However, if they get a trial incorrect, they will need to go back 10 blocks. Additionally, I would input before the experiment starts which block the participant would start from. For example, they can start from block 10, 11, 12 and then skip forward or go back depending on their mistakes. I would need a code at the start of the experiment for all of this, I’m guessing, but what would the code be, as I’m having issues with finding similar designs.

Thank you for the help!

I would load the trial information into an array / list (in a similar way to the way I use in independent randomisation) and then have the main trials loop read from the list rather than the original spreadsheet. I use this method for a Hypertext fiction experiment where the next trial is dependent on the choice just made.