So I am creating an experiment where i have some shapes which change in different positions in certain time. Now what i want to do is, make the program recognize whether shapes presented in recognition interval are the same as in memorization interval.
At this moment the experiment is running the same shapes and positions in both intervals. Half of the trials should include different shapes.

Is there any libraries i might use, any help would be appreciated guys!

Here is a picture on how the experiment should run.

How do you currently have your trials/conditions spreadsheet set up? if there are 10 shapes in total, 5 presented in interval 1 and 5 presented in interval 2, then you need a spreadsheet with 10 columns (5 corresponding to the shapes presented in interval 1 and 5 corresponding to the shapes presented in interval 2) on half of the trials, the 5 columns corresponding to the shapes in interval 2 will be different to those shown in interval 1. something like this conditions.xlsx (9.1 KB)

Briefly now i have two different spreadsheet with all possible permutations (one for images one for positionns).

Now, i only need to find a way to write a code that will randomly select 10 rows from two different CSV files and write these selected rows in one single new CSV file.

You like to independently randomise shapes and positions. If you do this using two spreadsheets then my approach is to pre-load one spreadsheet into a list and then read values from that list during the main trails loop (pointing at the other spreadsheet). This approach is demonstrated in my independent randomisation demo and also used in PM Time. To avoid extra rows in online data files (since the is trials switch doesn’t yet work) I am moving to pre-loading in a code component, which is shown in Trial Switching.