updating points total


Author
Message
charlottebooth
charlottebooth
Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)
Group: Forum Members
Posts: 45, Visits: 249
Dave - Wednesday, October 4, 2017
charlottebooth - Wednesday, October 4, 2017
I need to make a simple passive avoidance learning task where participants learn to Go or No-Go to different numbers by trial and error, as half the numbers cause a loss in points and the other half cause a gain in points when a Go response is made.

I need to show a running points total so the participant knows whether they made a correct or incorrect response, but I'm not sure what stimulus type this would come under, as it is text (e.g. "10,000") but this points total needs to change according to performance.

I guess I need to use the branch attribute for each trial, but need some help as how exactly to do this, so if correct response add 1000 points, but if incorrect response lose 1000 points (for example).

I'm at the very basic starting stages of this script so any advice most welcome :)

You need to create a variable in the <values> element:

<values>
/ pointstotal = 10000
</values>

You can display this variable via a standard <text> element

<text points>
/ items = ("Points: <%values.pointstotal%>")
/ erase = false
/ position = (50%, 10%)
</text>

in your <trial>s and update it there as needed /ontrialend

<trial exampletrial>
/ stimulustimes = [0=points, ....]
...
/ ontrialend = [if (trial.exampletrial.correct) values.pointstotal += 1000;]
/ ontrialend = [if (trial.exampletrial.error) values.pointstotal -= 1000;]
...
</trial>

Thank you it worked a treat :) 
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: 104K
charlottebooth - Wednesday, October 4, 2017
I need to make a simple passive avoidance learning task where participants learn to Go or No-Go to different numbers by trial and error, as half the numbers cause a loss in points and the other half cause a gain in points when a Go response is made.

I need to show a running points total so the participant knows whether they made a correct or incorrect response, but I'm not sure what stimulus type this would come under, as it is text (e.g. "10,000") but this points total needs to change according to performance.

I guess I need to use the branch attribute for each trial, but need some help as how exactly to do this, so if correct response add 1000 points, but if incorrect response lose 1000 points (for example).

I'm at the very basic starting stages of this script so any advice most welcome :)

You need to create a variable in the <values> element:

<values>
/ pointstotal = 10000
</values>

You can display this variable via a standard <text> element

<text points>
/ items = ("Points: <%values.pointstotal%>")
/ erase = false
/ position = (50%, 10%)
</text>

in your <trial>s and update it there as needed /ontrialend

<trial exampletrial>
/ stimulustimes = [0=points, ....]
...
/ ontrialend = [if (trial.exampletrial.correct) values.pointstotal += 1000;]
/ ontrialend = [if (trial.exampletrial.error) values.pointstotal -= 1000;]
...
</trial>
charlottebooth
charlottebooth
Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)
Group: Forum Members
Posts: 45, Visits: 249
I need to make a simple passive avoidance learning task where participants learn to Go or No-Go to different numbers by trial and error, as half the numbers cause a loss in points and the other half cause a gain in points when a Go response is made.

I need to show a running points total so the participant knows whether they made a correct or incorrect response, but I'm not sure what stimulus type this would come under, as it is text (e.g. "10,000") but this points total needs to change according to performance.

I guess I need to use the branch attribute for each trial, but need some help as how exactly to do this, so if correct response add 1000 points, but if incorrect response lose 1000 points (for example).

I'm at the very basic starting stages of this script so any advice most welcome :)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search