Reply
Page 1 of 2:  1  2  
Thread Tools  
Felipe Corchs
Junior Member
 
Join Date: Feb 2015
Felipe Corchs is on a distinguished road Posts: 14
Help with Active Avoidance experiment, Posted February 9th, 2017 #1
Dear team,

I'm developing an experiment in which the subject has to learn to shuttle from one side to the other of a grid every two seconds in order to avoid a punishment (that is represented in my experiment by a brief sound that I named 'shock').

So far, I was able to develop the grid and the programming for the virtual subject, represented by a red circle, to move around. I'm having a hard time to combine this with the 'shock' every two seconds, or the restart of the 2-sec interval if 'subject' shuttle from one side of the grid to the other.

I tried to create a tag named 'last side touched touched' (right or left) and if it is set to right 'shock timer' (a parameter I created) resets. Another trial ('Shock') is set to be presented if 'shock timer' is > 1999ms.

I was hoping that this configuration would reset 'shock timer' every shuttle the subject did and, therefore, 'Shock' would never be presented if a shuttle was emitted every 2 seconds or less.

However, I can shuttle and move around the grid just fine, but all the rest is not working...

Would it be possible to give me a hand, please?

I'm attaching the files and the experiment here to make it easier to understand. Also attaching a paper with a similar methodology.
Attached Images
File Type: png translucid Grid.png (12.1 KB, 4 views)
File Type: png Virtual subject (translucid).png (12.1 KB, 4 views)
Attached Files
File Type: sl5 Unsignaled Sidman Avoidance.sl5 (42.0 KB, 1 views)
File Type: wav beep-01a.wav (85.5 KB, 2 views)
File Type: pdf Collins-2014-Taking action in the face of thre.pdf (898.5 KB, 1 views)
Reply With Quote
Arman
Support
 
Join Date: Jun 2016
Arman is on a distinguished road Posts: 148
Posted February 9th, 2017 #2
Your avoidance and shock rules are never evaluated because every time a movement key is pressed, the Shuttle trial repeats itself. To fix this:

- remove your Avoidance and Shock trials but have Shuttle absorb their rules.

- remove the Repeat Trial action from all of your movement rules.

- create a single rule that always repeats the trial; it should be the last rule in the list.

As an aside, any constant action should be placed on its own to avoid duplication. Otherwise, it will take longer to make fixes.
Reply With Quote
Arman
Support
 
Join Date: Jun 2016
Arman is on a distinguished road Posts: 148
Posted February 9th, 2017 #3
Other notes that may be important down the line:

- In order for SuperLab to check for time even without participant response, you may want to set a small time limit on the Virtual Subject event.

- Consider checking for successful shuttles before setting them.

- Currently in your design, pressing the space bar ends your experiment.
Reply With Quote
Felipe Corchs
Junior Member
 
Join Date: Feb 2015
Felipe Corchs is on a distinguished road Posts: 14
Posted February 9th, 2017 #4
Thanks, Arman.
I just followed your instructions, but now the subject moves 'unpredictably' through the grid instead of going to the next position I commanded it to.
I also couldn't repeat the 'shock' for the second time...
Here is the second (corrected) version of the experiment.
Best,
Felipe
Attached Files
File Type: sl5 Unsignaled Sidman Avoidance v2.sl5 (40.8 KB, 2 views)
Reply With Quote
Arman
Support
 
Join Date: Jun 2016
Arman is on a distinguished road Posts: 148
Posted February 10th, 2017 #5
See the attachment for the changes that I've made.

The shock is only heard once because although your timer is reset, it is never started again. I have done so in the rule that repeats the trial.

As for the unpredictable movements, I have created a parameter that keeps track if the circle has moved within that particular trial. After moving, it is set to "yes" and no other movement rules will be initiated. This is also reset to "no" in the rule that repeats the trial.
Attached Files
File Type: zip Unsignaled Sidman Avoidance v2.zip (80.4 KB, 5 views)
Reply With Quote
Felipe Corchs
Junior Member
 
Join Date: Feb 2015
Felipe Corchs is on a distinguished road Posts: 14
Posted February 10th, 2017 #6
This is great, Arman. Although, I'm not being able to reset 'shock timer' if the subject successfully shuttle from side to side (to the right side if it is initially on the left or to the right if is initially at the left) so that the subject will never be shocked provided that he/she keeps shuttling from one side to the other. But they will if they do not shuttle within 2 seconds.

I'm also not sure how many 'shocks' I'll allow for each 'trial', maybe twice. I'll probably have to write to you again with further questions. Sorry about that, but the experiment seems so complex for my level of knowledge of programming! Also sorry about the English, I hope I'm being able to express myself clearly.

Thanks a lot!
Reply With Quote
Arman
Support
 
Join Date: Jun 2016
Arman is on a distinguished road Posts: 148
Posted February 14th, 2017 #7
You cannot check against multiple values within a single field. See the image below for an example of where you have tried to do so:



Fortunately, you do not have to create a separate rule for each value. Instead, create another tag set called "Current Side Touched" (CST) to accommodate "Last Side Touched" (LST).

The flow of your experiment as it pertains to successful shuttles should be like so:

- Start the experiment with LST set to "left" and CST set to "none".

- Check for position and set position tag appropriately.

- Check position tag and set CST to "left" or "right" appropriately.

- Check CST against LST for a successful shuttle.

- If CST is either "left" or "right", transfer the value to LST and set CST back to "none".
Reply With Quote
Felipe Corchs
Junior Member
 
Join Date: Feb 2015
Felipe Corchs is on a distinguished road Posts: 14
Posted February 15th, 2017 #8
Thanks! It worked perfectly.
I'm working on the additional parameters and probably will have to ask for help every now and then.
For now, I'm trying to set the first subject position randomly, which was easy -- I just set the 'subject location' level in the 'start initial position' rule to 'random'.
However, I have to tag this first position that was defined randomly. Is it possible?
Reply With Quote
Arman
Support
 
Join Date: Jun 2016
Arman is on a distinguished road Posts: 148
Posted February 15th, 2017 #9
It is possible, but you have to use more rules after the randomization of the initial trial level.

Example: If trial variable Subject Location is Level 1 (A3), set trial's tag to A3, and etc.
Reply With Quote
Felipe Corchs
Junior Member
 
Join Date: Feb 2015
Felipe Corchs is on a distinguished road Posts: 14
Posted February 15th, 2017 #10
Great. I'll do that and get back if I need sth else. Thanks.
Reply With Quote
Reply « Previous Thread - SuperLab 5 Support - Next Thread »
Page 1 of 2:  1  2  
Tags
active avoidance
Thread Tools
Posting Rules
Forum Jump:
Copyright Cedrus Corporation, 1991-2014.
All times are GMT -7. The time now is 07:46 PM.