tasks.balltask module

pyhpdm version of the balltask task TODO: describe tasks

class tasks.balltask.Balltask(nbr_of_bags=6, bag_colors=['red', 'green', '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

proceed()[source]

Updates the task after feedback

receiveAction(action)[source]

Receives the next action from the participant

Parameters:action (int or string) – The action taken by the model
returnTaskState()[source]

Returns all the relevant data for this task run

Returns:history – A dictionary containing the class parameters as well as the other useful data
Return type:dictionary
storeState()[source]

Stores the state of all the important variables so that they can be output later

class tasks.balltask.RewardBalltaskDirect(**kwargs)[source]

Bases: model.modelTemplate.Rewards

Processes the reward for models expecting just the reward

processFeedback(feedback, lastAction, stimuli)[source]
Returns:
Return type:modelFeedback
class tasks.balltask.StimulusBalltaskSimple(**kwargs)[source]

Bases: model.modelTemplate.Stimulus

Processes the stimulus cues for models expecting just the event

processStimulus(observation)[source]

Processes the decks stimuli for models expecting just the event

Returns:
  • stimuliPresent (int or list of int) – The elements present of the stimulus
  • stimuliActivity (float or list of float) – The activity of each of the elements