BioMotionLab / TUX

A framework for experiments in Unity and VR
https://biomotionlab.github.io/TUX/
Other
29 stars 4 forks source link

Initial Training Trial per Block #36

Closed A-Ivan closed 2 years ago

A-Ivan commented 3 years ago

Hi @AdamBebko ,

Sorry if I missed this in the documentation, but what would be the recommended way to create a "practice/training" trial which would be the first trial of each block?

Say I want participants to train how to do perform part of a task relevant to a block, so each block participants would begin going through a practice/training scene (the same training scene for all blocks) which would have some aspect specific to that block (relative to some independent variable that is changed). This practice/training Unity scene would be different than the scene used for the actual study trials of the block, in order to minimize learning effects.

The practice/training scene could either end with the participant correctly performing what they are being trained on (some trigger is issued to go to the next trial), or until they feel they have trained enough (in which case they would let the researcher know and the researcher would issue some command, for instance a specific key press, to go to the next trial).

An example of this would be in a VR locomotion study where participants are being evaluated on how well they explore a virtual environment (VE) which is larger than their physical environment. The trials require participants to find a number of objects in the VE, which in one block they can use teleportation and another they can use joystick (the locomotion independent variable) to move across the VE, for instance. An initial trial of each block would allow participants to become familiar with either teleportation or joystick, depending on the block. The VE used to practice would be different (i.e., a house) than the one from the actual trial (i.e., a city).

There are three main questions with this:

  1. How would I set a trial to always be the first of a block and having the option to log or not data from it (or at least to flag that it is a practice trial and data should not be used during evaluation).
  2. How could this practice trial be controlled to end (either via the participant correctly performing the practice task or the researcher issuing a command to move onto the actual study trial)?
  3. Is it possible to have a Unity scene for "actual trials" and another scene for "practice/training"? Or would I have to put everything on a single scene and then instantiate/enable the gameobjects and components respective to that type of trial (practice or actual study trial)?

Thank you. Ivan

AdamBebko commented 2 years ago

Hi Ivan see my replies below. What you are asking for is a bit out of scope of the standard what-you-see-is-what-you-get ethos of bmlTUX, but I think there's a way to make it work.

Hi @AdamBebko ,

Sorry if I missed this in the documentation, but what would be the recommended way to create a "practice/training" trial which would be the first trial of each block?

Say I want participants to train how to do perform part of a task relevant to a block, so each block participants would begin going through a practice/training scene (the same training scene for all blocks) which would have some aspect specific to that block (relative to some independent variable that is changed). This practice/training Unity scene would be different than the scene used for the actual study trials of the block, in order to minimize learning effects.

During the PreCoroutine of the block script, you can just have a while loop waiting for some condition, that gets flipped by an event from elsewhere in the program. This same method would have already fired an event saying "LOAD TRAINING!". So now we have the block being started, and it simply waits.

Elsewhere in the program, other scripts are listening to the LOAD TRAINING event.. they load a new scene with the training data in (additively) and run the training. When complete, it fires the event that the PreCoroutine is waiting for. The normal bmlTUX flow continues as normal.

The practice/training scene could either end with the participant correctly performing what they are being trained on (some trigger is issued to go to the next trial), or until they feel they have trained enough (in which case they would let the researcher know and the researcher would issue some command, for instance a specific key press, to go to the next trial).

An example of this would be in a VR locomotion study where participants are being evaluated on how well they explore a virtual environment (VE) which is larger than their physical environment. The trials require participants to find a number of objects in the VE, which in one block they can use teleportation and another they can use joystick (the locomotion independent variable) to move across the VE, for instance. An initial trial of each block would allow participants to become familiar with either teleportation or joystick, depending on the block. The VE used to practice would be different (i.e., a house) than the one from the actual trial (i.e., a city).

There are three main questions with this:

  1. How would I set a trial to always be the first of a block and having the option to log or not data from it (or at least to flag that it is a practice trial and data should not be used during evaluation).

Using the PreMethod / PreCoroutines of the block script accomplishes this. You could also do it in the Pre Experiment script as well if you only wanted it once at the start.

  1. How could this practice trial be controlled to end (either via the participant correctly performing the practice task or the researcher issuing a command to move onto the actual study trial)?

You'd just need to code it to fire the event I spoke of above

  1. Is it possible to have a Unity scene for "actual trials" and another scene for "practice/training"? Or would I have to put everything on a single scene and then instantiate/enable the gameobjects and components respective to that type of trial (practice or actual study trial)?

In my own experiments, I used a whole separate design file and scene for the training. But we just ran it once at the start of the experiment. Then opened the real experiment scene and ran it normally. This worked well for our purposes.

Thank you. Ivan

AdamBebko commented 2 years ago

Closing this since I can't really address it myself.

A-Ivan commented 2 years ago

Thanks for the insights on this Adam, it helps. I will probably use the coroutines method and I may just instantiate a virtual environment specifically for the "practice trial" in the same scene as the "study trial", since I will have multiple practice trials.