tasks.balltask module¶
pyhpdm version of the balltask task TODO: describe tasks
-
class
tasks.balltask.Balltask(nbr_of_bags=6, bag_colors=[u'red', u'green', u'blue'], balls_per_bag=3)[source]¶ Bases:
tasks.taskTemplate.Task-
feedback()[source]¶ Responds to the action from the participant balltask has no rewards so we return None
-
next()[source]¶ Produces the next stimulus for the iterator
Returns: - stimulus (None)
- nextValidActions ((0, 1, 2) representing red, green, blue in default case) – but can be many colors. it’s assumed this always goes in same order left to right as bag_colors parameter
Raises: StopIteration
-
receiveAction(action)[source]¶ Receives the next action from the participant
Parameters: action (int or string) – The action taken by the model
-
-
class
tasks.balltask.RewardBalltaskDirect(**kwargs)[source]¶ Bases:
model.modelTemplate.RewardsProcesses the reward for models expecting just the reward
-
class
tasks.balltask.StimulusBalltaskSimple(**kwargs)[source]¶ Bases:
model.modelTemplate.StimulusProcesses the stimulus cues for models expecting just the event