thartbm / PyVMEC

A Python-based GUI to create and run visuo-motor experiments.
GNU General Public License v3.0
1 stars 3 forks source link

add speed "reward" counter to tasks #122

Open thartbm opened 5 years ago

thartbm commented 5 years ago

[Non-preferred enhancement]

In cursor and error-clamp tasks, a score counter could be shown in the upper right corner of the screen. How many points are collected on each trial within the task depends on how fast the target is reached. This is to motivate participants or test the effects of reward on learning.

There should be (at least, but using very little screen space) three possible levels for scores, defined by the user. For example 3 points if you're under 150 ms, 2 points if you're under 400 ms, and 1 point in any other case. Both the number scored and the exact time limits for scoring them should be set by the experimenter. Each level of reward can also be associated with color feedback given by changing the color of the cursor, target or both. And this could be done as soon as one of the reward deadlines is passed, or simply at the end of the reach, when the target has been acquired (a radio menu with two options, only one of which can be picked). Finally, the total score should be kept somewhere in memory (perhaps also in the JSON so it survives crashes) and keep being increased throughout any tasks in the experiment that give rewards. However, there should be an option for the experimenter to tick a box for a tasks' reward settings that will reset the score to 0 points at the start of that task.

The reward unit can be named in the GUI and is stored in the JSON, so that the text in the upper right corner looks like this: "%s: %d"%(reward_unit, score) and we can name them "gold coins", "score", "goals", "hits", "dollars" or whatever is necessary for the experiment. The scored points are a new column in the data (empty or NaN when not used), and should not interfere with data pre-processing. For tasks that don't have any rewards enabled, just don't show the counter (but still keep the score in memory so it can be used for a future task that does have rewards).

All of these settings should probably be set in a pop-up window as there are too many options to put them all in the main window, while the main window will have a tick box to activate rewards for a task (with standard settings), and also enable pressing a button to access the pop-up window with reward settings. Here's all the stuff that would need to be in the pop-window:

reward: [unit: string] [x] set reward to zero at the start of the task [high points: int] - [cursor color: RGB hex] - [target color: RGB hex] [first cut-off time] [medium points: int] - [cursor color: RGB hex] - [target color: RGB hex] [second cut-off time] [low points: int] - [cursor color: RGB hex] - [target color: RGB hex] ( ) change colors as time passes (*) change colors when target is acquired