Random AAT HELP PLEASE


Author
Message
poleraze
poleraze
Respected Member (310 reputation)Respected Member (310 reputation)Respected Member (310 reputation)Respected Member (310 reputation)Respected Member (310 reputation)Respected Member (310 reputation)Respected Member (310 reputation)Respected Member (310 reputation)Respected Member (310 reputation)
Group: Forum Members
Posts: 18, Visits: 48
Hey there,

I want to program an AAT (approach avoidance task) were you have to pull non_alcoholic drinks towards you and push alcoholic drinks away from you.
Its connected with a sequence generator.
I have two groups. alcoholic and non-alcoholic pictures.
I want each item two be used 3 times that makes a total of 150. selection should be random.
below you see the sequence genarator script.
Thank you all

<values>
/count1 = 25
/count2 = 25
/totaltrialcount = 150

/runcount_1 = 0
/runcount_2 = 0

/newnumber = 0
/count_comparecat = 0

/sequence = ""
/index = 0
/reset = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text wait>
/items = ("Please wait; we'll be ready shortly")
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 0)
</text>


**************************************************************************************************************
**************************************************************************************************************
    LISTS
**************************************************************************************************************
**************************************************************************************************************

<list stimcats>
/ items = (
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
/ maxrunsize = 3
/ replace = false
</list>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS
**************************************************************************************************************
**************************************************************************************************************

Trial Selectnumber: selects the newnumber and checks whether
all constraints are met
- if all constraints are met: adds new number to sequence
- constraints are not met: checks whether an alternative number is available that could meet constraint
                            => if yes: returns current number to list and tries again
                            => if no: starts the sequence over

<trial selectnumber>
/ ontrialbegin = [
    values.newnumber = list.stimcats.nextvalue;
    values.index += 1;
    values.sequence = concat(values.sequence, values.newnumber);
]
/branch = [if (values.index != values.totaltrialcount) trial.selectnumber else trial.checksequence]

/timeout = 0
/recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCK
**************************************************************************************************************
**************************************************************************************************************

<block SequenceGenerator>
/ bgstim = (wait)
/ trials = [1 = selectnumber]
/ recorddata = false
</block>

<trial checksequence>
/ ontrialbegin = [
    if (contains(values.sequence, "1111") || contains(values.sequence, "2222")) {
        values.sequence = "";
        values.index = 0;
        values.reset = 1;
    } else values.reset = 0;
]
/timeout = 0
/recorddata = false
/ branch = [
    if(values.reset) trial.selectnumber;
]
</trial>


<text thesequence>
/ items = ("Length: <%length(values.sequence)%>
~nN(Cat1) = <%length(replaceall(values.sequence, ~"1~", ~"~"))%>
~nN(Cat2) = <%length(replaceall(values.sequence, ~"2~", ~"~"))%>
~nSequence:~n<%values.sequence%>")
/ size = (50%, 50%)
</text>



**************************************************************************************************************
                                                End of File
**************************************************************************************************************



**************************************************************************************************************
                    END OF FILE
**************************************************************************************************************

**** Anpassen Sequenz
**** exp condition: alc ranziehen 1; neutral 2

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Reading This Topic

Explore
Messages
Mentions
Search