Skip to content

Commit 0911d7e

Browse files
committed
add some details
1 parent 38ec4d2 commit 0911d7e

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

iblrig_custom_tasks/nate_adaptiveTimeoutChoiceWorld/task.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,24 @@
2121

2222

2323
class AdaptiveTimeoutStateMachine(StateMachine):
24+
25+
def __init__(
26+
self,
27+
bpod,
28+
adaptive_delay_nogo,
29+
adaptive_delay_error
30+
):
31+
super().__init__(bpod)
32+
self.adaptive_delay_nogo = adaptive_delay_nogo
33+
self.adaptive_delay_error = adaptive_delay_error
34+
35+
2436
def add_state(self, **kwargs):
37+
match kwargs['state_name']:
38+
case 'nogo':
39+
pass
40+
case 'error':
41+
pass
2542
super().add_state(**kwargs)
2643

2744

@@ -38,9 +55,11 @@ def __init__(
3855
self.adaptive_delay_nogo = adaptive_delay_nogo
3956
self.adaptive_delay_error = adaptive_delay_error
4057
super().__init__(*args, **kwargs)
58+
assert len(self.adaptive_delay_nogo) == len(self.task_params.CONTRAST_SET)
59+
assert len(self.adaptive_delay_error) == len(self.task_params.CONTRAST_SET)
4160

4261
def _instantiate_state_machine(self, trial_number=None):
43-
return AdaptiveTimeoutStateMachine(self.bpod)
62+
return AdaptiveTimeoutStateMachine(self.bpod, self.adaptive_delay_nogo, self.adaptive_delay_error)
4463

4564
@staticmethod
4665
def extra_parser():
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
# define delays for the following contrasts: [1.0, 0.25, 0.125, 0.0625, 0.0]
2-
'ADAPTIVE_FEEDBACK_NOGO_DELAY_SECS': [5.0, 4.0, 3.0, 2.0, 2.0]
3-
'ADAPTIVE_FEEDBACK_ERROR_DELAY_SECS': [5.0, 4.0, 3.0, 2.0, 2.0]
1+
'ADAPTIVE_GAIN': True
2+
'ADAPTIVE_REWARD': True
3+
'AG_INIT_VALUE': 8.0 # Adaptive Gain init value. Once the mouse completes 200 response trials whithin a session, this reverts to STIM_GAIN
4+
'CONTRAST_SET_PROBABILITY_TYPE': skew_zero # uniform, skew_zero
5+
'DEBIAS': True # Whether to use debiasing rule or not by repeating error trials
6+
'REWARD_AMOUNT_UL': 3.0 # Reward amount (uL), will oscillate between 1.5 and 3 uL depending on previous sessions if adaptive_reward is True
7+
8+
'CONTRAST_SET': [1.0, 0.5, 0.25, 0.125, 0.0625, 0.0]
9+
'ADAPTIVE_FEEDBACK_NOGO_DELAY_SECS': [6.0, 5.0, 4.0, 3.0, 2.0, 2.0]
10+
'ADAPTIVE_FEEDBACK_ERROR_DELAY_SECS': [6.0, 5.0, 4.0, 3.0, 2.0, 2.0]

0 commit comments

Comments
 (0)