Bot#

class psynet.bot.Bot(*args, **kwargs)[source]#

Bases: Participant

assignment_id#

A String, the assignment id of the participant.

base_pay#

The amount the participant was paid for finishing the experiment.

bonus#

the amount the participant was paid as a bonus.

creation_time#

the time at which the Network was created.

details#

a generic column for storing structured JSON data

end_time#

The time at which the participant finished.

entry_information#

column containing structured data from the recruiter

failed#

boolean indicating whether the Network has failed which prompts Dallinger to ignore it unless specified otherwise. Objects are usually failed to indicate something has gone wrong.

failed_reason#

an optional reason the object was failed. If the object is failed as part of a cascading failure triggered from another object, the chain of objects will be captured in this field.

fingerprint_hash#

A String, the fingerprint hash of the participant.

hit_id#

A String, the id of the hit the participant is working on

id#

a unique number for every entry. 1, 2, 3 and so on…

mode#

live, sandbox or debug.

Type:

A String, the mode in which Dallinger is running

property1#

a generic column that can be used to store experiment-specific details in String form.

property2#

a generic column that can be used to store experiment-specific details in String form.

property3#

a generic column that can be used to store experiment-specific details in String form.

property4#

a generic column that can be used to store experiment-specific details in String form.

property5#

a generic column that can be used to store experiment-specific details in String form.

recruiter_id#

A String, the nickname of the recruiter used by this participant.

status#

String representing the current status of the participant, can be:

  • working - participant is working

  • overrecruited - number of recruited participants exceed number required for the experiment, so this participant will not be used

  • submitted - participant has submitted their work

  • approved - their work has been approved and they have been paid

  • rejected - their work has been rejected

  • returned - they returned the hit before finishing

  • abandoned - they ran out of time

  • did_not_attend - the participant finished, but failed the attention check

  • bad_data - the participant finished, but their data was malformed

  • missing_notification - this indicates that Dallinger has inferred that a Mechanical Turk notification corresponding to this participant failed to arrive. This is an uncommon, but potentially serious issue.

take_experiment(time_factor=0, render_pages=False)[source]#
Parameters:
  • time_factor – Determines how long the bot spends on each page. If 0, the bot spends no time on each page. If 1, the bot spends time_estimate time on each page.

  • render_page – Whether to run page rendering code (default: False). This is generally only useful for testing.

time_of_death#

the time at which failing occurred

type#

a String giving the name of the class. Defaults to “participant”. This allows subclassing.

unique_id#

A String, a concatenation of worker_id and assignment_id

vars#
worker_id#

A String, the worker id of the participant.

class psynet.bot.BotResponse(*, raw_answer=<class 'psynet.utils.NoArgumentProvided'>, answer=<class 'psynet.utils.NoArgumentProvided'>, metadata=<class 'psynet.utils.NoArgumentProvided'>, blobs=<class 'psynet.utils.NoArgumentProvided'>, client_ip_address=<class 'psynet.utils.NoArgumentProvided'>)[source]#

Bases: object

Defines a bot’s response to a given page.

Parameters:
  • raw_answer – The raw_answer returned from the page.

  • answer – The (formatted) answer, as would ordinarily be computed by format_answer.

  • metadata – A dictionary of metadata.

  • blobs – A dictionary of blobs returned from the front-end.

  • client_ip_address – The client’s IP address.