WAlterTask¶
- class hive.implementation.w_alter_task.WAlterTask(action, trigger, sequence: Optional[List[int]] = None)¶
Bases:
AbstractSequenceTaskProtocol for W Alternation Task
In this protocol, we put an animal in 3-arms maze called Center, Right and Left arms. Each experiment arm changed their position in the sequence.
Valid sequences are: - C-R-C-L - C-L-C-R - R-C-L-C - L-C-R-C
Fail conditions and consequences on the next steps
Re-enter in the same arm Example : C-R-R = fail + next expected steps: C-R-R]-C-L
Enter in wrong arm instead of C Example : R-C-L-R = fail + next expected steps: R-C-L-R]-C-L
Use in config file
Task: mode : WAlterTask options: max_trial: 250 # (int) maximal number the animal can visit. time_out: 3600 # 1hr # (int): maximal duration the task can perform. time_stay: 600 # 10 min # (int): maximal duration the animal can stay on a platform. sequence: - 1 # Left arm id is 1 - 2 # Center arm id is 2 - 3 # Right arm id 3 trigger : - name: Keyboard or Tracking - name: Timer - name: Server
Devices used
Food_delivery devices named in F1, index from 1 to 3.
Attributes Summary
sequence [Left, Center, Right]
No doors are automatically used in this protocol
Use F1, F2, F3 as food devices.
Methods Summary
give_food(visit_arm, result)invoked when the animal visit the arm.
logging_result_visit_arm(visit_arm)Alternation protocol on W-maze.
Attributes Documentation
- sequence¶
sequence [Left, Center, Right]
- use_door_devices¶
No doors are automatically used in this protocol
- use_food_devices¶
Use F1, F2, F3 as food devices.
Needs to be added as virtual id in the config file.
Methods Documentation
- give_food(visit_arm: int, result: SequenceStepResult)¶
invoked when the animal visit the arm.
This function purpose to send commands to food/door devices.
- Parameters
visit_arm – where the animal visiting
result – the result of this visiting
- logging_result_visit_arm(visit_arm)¶
- new_seq_control() SequenceControl¶
Alternation protocol on W-maze.
Check the local history for valid sequence. If it fails, the local history is changed to match the future valid sequence. The first step is always a success. If the first step is C, the second step can be R or L. After that the sequence is to switch between R and L with always passing by C between.