Description Usage Arguments Details Value
Agents are constructed with a bias on their binary decision (constant over time) and a set of weights governing how seriously the advice of other agents is taken (modified over time).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | makeAgents(
n_agents = n_agents,
n_decisions = n_decisions,
bias_mean = 0,
bias_sd = 1,
sensitivity_mean = 1,
sensitivity_sd = 1,
trust_volatility_mean = 0.05,
trust_volatility_sd = 0.01,
bias_volatility_mean = 0.05,
bias_volatility_sd = 0.01,
confidence_slope_mean = 1,
confidence_slope_sd = 0,
weighted_sampling_mean = 0,
weighted_sampling_sd = 0,
starting_graph = NULL
)
|
n_agents |
number of agents to create |
n_decisions |
number of decisions |
bias_mean |
the mean for the agents' bias distribution (agents' biases are drawn from normal distributions with mean +/- bias_mean). Fed into a sigmoid function and the capped to between 0 and 1. Represents the prior probability that the answer is 1. |
bias_sd |
standard deviation for the bias distribution |
sensitivity_mean |
mean for agents' sensitivity |
sensitivity_sd |
standard deviation for distribution of agents' sensitivity (mean is 1) |
trust_volatility_mean |
the mean volatility of agents' trust |
trust_volatility_sd |
standard deviation |
bias_volatility_mean |
the mean volatility of agents' biases (move this proportion towards the final decision value from current bias at each step) |
bias_volatility_sd |
standard deviation |
confidence_slope_mean |
the mean of the distribution from which agents take their slopes for the sigmoid function mapping continuous evidence to a probability of a categorical decision. |
confidence_slope_sd |
standard deviation |
weighted_sampling_mean |
a non-zero value means agents choose who to seek advice from according to how likely they are to trust the advice. The weights are raised to the power of this value (so values > 1 make source selection more pronounced than advice weighting, and values < 1 make source selection less pronounced than advice weighting). Negative values will make agents actively seek out those they do not trust for advice. |
weighted_sampling_sd |
standard deviation |
starting_graph |
single number, vector, or n_agents-by-n_agents matrix of starting trust weights between agents. Coerced to numeric. Can also be a function taking the first generation of the agents tbl as an input and returning an n-by-n matrix of trust values between 0 and 1, where n is the number of agents, 0 represents completely untrustworthy, .5 random, and 1 completely trustworthy. |
the agents
tibble is an n_agents*n_decisions by 12 table with
"id"The agent's identifier
"decision"The decision number
"sensitivity"The agent's ability to do the task
"trust_volatility"How quickly the agent's trust updates
"bias_volatility"How quickly the agent's bias updates
"weighted_sampling"How heavily trust governs advice sampling behaviour
"bias"The agent's (initial) bias
"truth"The true state of the world (same for a given decision for all agents)
"initial"The agent's initial estimate of the truth
"advisor"ID of the agent whose advice is received
"weight"The weight assigned to the advice by the agent
"final"The final decision of the agent
list(
agents = tibble of agents' decisions, advice, etc. at each time point
graphs = list of agents' trust matrix for each time point
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.