creativity
v1.3.0
Agent-based model of creativity and piracy
|
Simulation parameters that are used to configure the simulation when calling setup(). More...
#include <creativity/CreativitySettings.hpp>
Public Attributes | |
uint32_t | readers = 100 |
The number of readers in the simulation. | |
uint32_t | dimensions = 2 |
The number of dimensions in the simulation. | |
double | boundary = 5.0 |
The boundary in each dimension to use for simulation members. More... | |
double | book_distance_mean = 0.0 |
An authored book will be located at a distance of \(mx\) from the author's location at the time of writing, where this value is \(m\) and \(x \sim \chi^2_1\). More... | |
double | book_quality_sd = 1.0 |
The standard deviation of a book quality draw. More... | |
double | reader_step_mean = 0.5 |
Between periods, readers take a random step of length \(mx\), where this value is \(m\) and \(x \sim \chi^2_1\). More... | |
double | reader_creation_shape = 0 |
The "shape" parameter \(\beta\) of the reader effort. More... | |
double | reader_creation_scale_min = 0.0 |
Reader.creation_scale values are drawn from \(U[a,b]\), where this value is the lower bound. More... | |
double | reader_creation_scale_range = 10.0 |
Reader.creation_scale values are drawn from \(U[a,b]\), where this value is the size of the range b-a . More... | |
uint32_t | creation_time = 3 |
The average length of time (in simulation periods) it takes to create a book. More... | |
double | creation_fixed = 100.0 |
The fixed cost component of initial creation. More... | |
double | cost_market = 10.0 |
The fixed cost of keeping a book on the market. | |
double | cost_unit = 1.0 |
The unit cost of selling a copy of a book (note that only copies of books still on the market can be sold), which is also the cost of obtaining a pirated copy (but is then incurred by the recipient, rather than the author). More... | |
double | cost_piracy = 1.0 |
The cost of receiving a pirated copy of a book, incurred by the recipient. | |
double | income = 1000.0 |
The per-period external income readers receive. More... | |
eris::eris_time_t | piracy_begins = 101 |
The period in which piracy becomes available. More... | |
Policy | policy = Policy::PublicSharing() |
The policy response(s) used to address piracy. More... | |
eris::eris_time_t | policy_begins = 201 |
The period in which the policy response to piracy begins. More... | |
double | policy_public_sharing_tax = 10.0 |
This is the lump-sum tax extracted from each user at the beginning of the period to fund the public sharing mechanism of author compensation. More... | |
double | policy_public_voting_tax = 10.0 |
This is the lump-sum per-reader tax for public sharing with voting. More... | |
uint32_t | policy_public_voting_votes = 3 |
The number of votes each reader receives in the public-sharing-with-voting regime. More... | |
double | policy_catch_tax = 10.0 |
This is the lump-sum tax extracted from each user to fund the policing policy to catch and fine readers using piracy. More... | |
double | policy_catch_cost = 10.0 |
The utility cost of being accused of piracy. More... | |
std::array< double, 3 > | policy_catch_fine {{25., 12.5, 12.5}} |
A person who gets caught and is guilty of piracy pays a fine of \(c_0 + c_1 #P + c_2 #P^2\), where \(#P\) is the number of pirated books the person obtained in the caught period. More... | |
std::array< double, 3 > | policy_catch_mu {{10., -.08, 0.}} |
For the "catch pirates" policy, the probability of being accused of piracy for obtaining \(x\) copies over the network equals the CDF of a \(\mathcal{N}(\mu, \sigma^2)\) distribution evaluated at \(x\); that is, \(\Phi\(\frac{x - \mu}{\sigma}\)\). More... | |
std::array< double, 3 > | policy_catch_sigma {{3., -.02, 0.}} |
Like policy_catch_mu , but for the quadratic coefficients of \(\sigma = c_0 + c_1 \tau + c_2 \tau^2\). More... | |
double | piracy_link_proportion = 0.1 |
The number of sharing/friendship links as a proportion of the maxinum number of sharing links possible (which is \(\frac{R(R-1)}{2}\), where \(R\) is the number of readers). More... | |
double | prior_scale = 1.02 |
The factor by which parameter standard deviations should be multiplied when using it as a prior for a subsequent period, after the initial burn-in period. | |
double | prior_scale_piracy = 2 |
The factor by which to multiply standard deviations in the first piracy period. More... | |
double | prior_scale_policy = 2 |
The factor by which to multiply standard deviations in the first policy response period. More... | |
double | prior_scale_burnin = 1.5 |
The prior weight to use during the burn-in period; typically much larger than prior_scale so that the simulation results of pre-belief initial parameters have significantly less weight in readers' beliefs. | |
uint32_t | burnin_periods = 20 |
The number of "burn-in" periods, during which priors are discounted at a higher rate. More... | |
uint32_t | prediction_draws = 100 |
The number of model draws to use for prediction. More... | |
struct { | |
double prob_write = 0.1 | |
The probability that a reader writes a book. More... | |
double l_min = 0 | |
Initial book creation effort levels are distributed Uniform[l_min , l_min+l_range ]. More... | |
double l_range = 100.0 | |
Initial book creation effort levels are distributed Uniform[l_min , l_min+l_range ]. More... | |
double p_min = 4.0 | |
Initial book prices are distributed cost_unit + Uniform[p_min , p_min+p_range ]. More... | |
double p_range = 30.0 | |
Initial book prices are distributed cost_unit + Uniform[p_min , p_min+p_range ]. | |
double prob_keep = 0.5 | |
The probability of a book being kept on the market for another period. More... | |
double keep_price = 0.5 | |
The relative price-above-marginal-cost of a book being kept on the market for another period. More... | |
int32_t belief_threshold = 5 | |
The minimum number of observations (relative to k) before a belief is used. More... | |
} | initial |
The values in this struct define fixed probabilities and distributions of simulation actions. More... | |
Simulation parameters that are used to configure the simulation when calling setup().
int32_t creativity::CreativitySettings::belief_threshold = 5 |
The minimum number of observations (relative to k) before a belief is used.
Before reaching this threshold, actions are governed by the initial
values, above.
This setting also governs the use of the ProfitStream beliefs of different lengths: authors will not use ProfitStream belief models that do not have at least this number of observations. (For example, if this setting equals 2 and there are ProfitStream beliefs for 1-, 2-, and 4-period old books, with 15, 7, and 5 observations, only the 1- and 2-period models will be used.)
Note that partially informative models (i.e. those with fewer than K linearly-independent observations) are never used, so setting this to a value smaller than 0 has no effect, and often the effective minimum threshold is noticeably higher than 0 (particularly when the model contains dummy or other small integer values).
double creativity::CreativitySettings::book_distance_mean = 0.0 |
An authored book will be located at a distance of \(mx\) from the author's location at the time of writing, where this value is \(m\) and \(x \sim \chi^2_1\).
This distance thus has the given mean and a standard deviation of \(\sqrt{2}m\).
The final location is drawn from a uniform distribution over all points with the given distance from the author.
If this value is 0, the book is located exactly at the author's position at the time of writing and no draw is performed.
double creativity::CreativitySettings::book_quality_sd = 1.0 |
The standard deviation of a book quality draw.
When a reader obtains a book, his subjective quality is drawn from \(N(Q, s)\), where \(Q\) is the book's base quality as decided by the author and \(s\) is this setting.
As long as this setting is positive, this means book quality is subjective; if 0, all readers perceive the book as having the same quality.
double creativity::CreativitySettings::boundary = 5.0 |
The boundary in each dimension to use for simulation members.
Must be a positive value. The the exact boundary is calculated from the simulation density at the initialization of the simulation as the density could theoretically change during the simulation, but the boundary defines the world and so is fixed forever.
uint32_t creativity::CreativitySettings::burnin_periods = 20 |
The number of "burn-in" periods, during which priors are discounted at a higher rate.
double creativity::CreativitySettings::cost_unit = 1.0 |
The unit cost of selling a copy of a book (note that only copies of books still on the market can be sold), which is also the cost of obtaining a pirated copy (but is then incurred by the recipient, rather than the author).
Note that, if changing this, it is advisable to also consider changing parameters.initial.p_min
.
double creativity::CreativitySettings::creation_fixed = 100.0 |
The fixed cost component of initial creation.
This plus the expended effort level is incurred to create.
uint32_t creativity::CreativitySettings::creation_time = 3 |
The average length of time (in simulation periods) it takes to create a book.
If 0, books are created instantly; otherwise books take this value -1/+0/+1 with equal probability of each (so that this is still the mean creation time). (The randomness helps avoid strongly cyclical authorship behaviour)
double creativity::CreativitySettings::income = 1000.0 |
The per-period external income readers receive.
Effort spent creating a book in a period is subtracted from this amount.
struct { ... } creativity::CreativitySettings::initial |
The values in this struct define fixed probabilities and distributions of simulation actions.
This is needed because, in the initial simulation periods, readers only have noninformative beliefs which are completely useless for predicting anything in the model.
Instead, readers act randomly until useful beliefs are established, according to the values that follow.
double creativity::CreativitySettings::keep_price = 0.5 |
The relative price-above-marginal-cost of a book being kept on the market for another period.
For example, if this is 0.75, the current price is 3, and parameters.cost_unit
is 1, then the new price will be 1 + 0.75*(3-1) = 2.5.
double creativity::CreativitySettings::l_min = 0 |
Initial book creation effort levels are distributed Uniform[l_min
, l_min+l_range
].
Readers without sufficiently informed quality beliefs use the mean of the resulting quality distribution for initial purchasing decisions.
double creativity::CreativitySettings::l_range = 100.0 |
Initial book creation effort levels are distributed Uniform[l_min
, l_min+l_range
].
Readers without sufficiently informed quality beliefs use the mean of the resulting quality distribution for initial purchasing decisions.
double creativity::CreativitySettings::p_min = 4.0 |
Initial book prices are distributed cost_unit +
Uniform[p_min
, p_min+p_range
].
Note that initial book quality, at default creation shape/scale and l_min/l_range settings, can take a value anywhere from 0 to 46.15, and has a mean of 20.14.
eris::eris_time_t creativity::CreativitySettings::piracy_begins = 101 |
The period in which piracy becomes available.
If 0, piracy is never invented. (Since t=0 is the initial setup (without any actions), set to 1 to having sharing become available immediately).
double creativity::CreativitySettings::piracy_link_proportion = 0.1 |
The number of sharing/friendship links as a proportion of the maxinum number of sharing links possible (which is \(\frac{R(R-1)}{2}\), where \(R\) is the number of readers).
Links as assigned randomly between agents when the simulation is initially set up, with an equal probably of each possible link being selected.
The default is 10% coverage of maximum potential links (rounded to the nearest integer). In the default 100-reader simulation, this is 495 links.
The value must be in \([0, 1]\).
Policy creativity::CreativitySettings::policy = Policy::PublicSharing() |
The policy response(s) used to address piracy.
Supported policies (which may be combined) are:
Other values are reserved for future use.
eris::eris_time_t creativity::CreativitySettings::policy_begins = 201 |
The period in which the policy response to piracy begins.
Which response is used depends on the policy
parameter.
double creativity::CreativitySettings::policy_catch_cost = 10.0 |
The utility cost of being accused of piracy.
This is incurred by everyone who is accused of piracy, regardless of whether or not they are guilty (since the probability of being caught even with no piracy is > 0). If guilty, the reader pays an additional fine, determined by policy_catch_fine
. This component of the cost is simply a cost, it is not a fine being transferred, unlike policy_catch_fine
.
std::array<double, 3> creativity::CreativitySettings::policy_catch_fine {{25., 12.5, 12.5}} |
A person who gets caught and is guilty of piracy pays a fine of \(c_0 + c_1 #P + c_2 #P^2\), where \(#P\) is the number of pirated books the person obtained in the caught period.
Thus a caught individual who obtained 3 pirated copies pays \(c_0 + 3 c_1 + 9 c_2\).
The fine amount is removed from the reader's utility (as a proxy for the reader's wealth, which is outside this model), and is redistributed to the authors of the pirated works. Specifically, the fine is divided into \(#P\) equal shares and each share is transferred to the author of each pirated work. (It is possible for a single author to receive multiple shares, if multiple copies of his works were pirated by the fined reader).
The default is a fine of 50 for the first, +50 for the second, +75 for the third, etc. (so a total fine of 50, 100, 175, 275, ...).
std::array<double, 3> creativity::CreativitySettings::policy_catch_mu {{10., -.08, 0.}} |
For the "catch pirates" policy, the probability of being accused of piracy for obtaining \(x\) copies over the network equals the CDF of a \(\mathcal{N}(\mu, \sigma^2)\) distribution evaluated at \(x\); that is, \(\Phi\(\frac{x - \mu}{\sigma}\)\).
\(\mu\) and \(\sigma\) themselves are quadratic functions of the per-user piracy detection expenditure, i.e., functions of policy_response_tax
.
This array contains the constant, linear, and quadratic coefficients that define \(\mu = c_0 + c_1 \tau + c_2 \tau^2\), where \(\tau\) is the policy_response_tax
value. Note that the probability of detection equals 50% at \(\mu\), 5% at \(\mu - 1.96 \sigma\), 95% at \(\mu + 1.96\). The default is \(\mu = 10 - 0.5 \tau\).
Note that the probability of being caught is never 0, even for an individual who does not pirate; such false accusations can still incur a cost, or can be ignored, depending on the policy_catch_cost
variable.
The default for this an mu are selected with a range of tau of (0, 100] in mind: close to 0, the probability of catching someone who doesn't pirate is very close to 0, the 50% detection is at 10 pirated copies in a period, and the 95% is at 16 (i.e. the probability is the CDF of N(10,3)). At the upper end, the CDF is N(2, 1), i.e. non-pirates are false accussed just under 5% of the time, people pirating 2 are caught 50% of the time, and 95% is hit after pirating 4 copies.
std::array<double, 3> creativity::CreativitySettings::policy_catch_sigma {{3., -.02, 0.}} |
Like policy_catch_mu
, but for the quadratic coefficients of \(\sigma = c_0 + c_1 \tau + c_2 \tau^2\).
The default is \(\sigma = 3 - .02 \tau\). Note that this will fail (immediately) if tau is >= 150.
double creativity::CreativitySettings::policy_catch_tax = 10.0 |
This is the lump-sum tax extracted from each user to fund the policing policy to catch and fine readers using piracy.
Has no effect when the catching policy is not enabled.
double creativity::CreativitySettings::policy_public_sharing_tax = 10.0 |
This is the lump-sum tax extracted from each user at the beginning of the period to fund the public sharing mechanism of author compensation.
Has no effect when public sharing is not enabled. Must be >= 0; if 0, no redistribution happens.
double creativity::CreativitySettings::policy_public_voting_tax = 10.0 |
This is the lump-sum per-reader tax for public sharing with voting.
Has no effect when public sharing with voting is not enabled. Must be strictly greater than 0.
uint32_t creativity::CreativitySettings::policy_public_voting_votes = 3 |
The number of votes each reader receives in the public-sharing-with-voting regime.
Voters cast votes in (rough) proportion to the net utility they received from reading each public book obtained in the current period.
For example, if a reader obtained 4 book copies, and received net utility of 10, 5, 2, 1, if given 4 votes, he would cast 3 votes for book 1, and 1 vote for book 2; with 18 votes he would cast 10, 5, 2, 1.
uint32_t creativity::CreativitySettings::prediction_draws = 100 |
The number of model draws to use for prediction.
Higher values yield more "accurate" predictions, but lower values may be desirable to introduce more random agent behaviour.
double creativity::CreativitySettings::prior_scale_piracy = 2 |
The factor by which to multiply standard deviations in the first piracy period.
This value overrides prior_scale
in the piracy_begins
period.
double creativity::CreativitySettings::prior_scale_policy = 2 |
The factor by which to multiply standard deviations in the first policy response period.
This value overrides prior_scale
in the policy_response_begins
period.
double creativity::CreativitySettings::prob_keep = 0.5 |
The probability of a book being kept on the market for another period.
double creativity::CreativitySettings::prob_write = 0.1 |
The probability that a reader writes a book.
double creativity::CreativitySettings::reader_creation_scale_min = 0.0 |
Reader.creation_scale values are drawn from \(U[a,b]\), where this value is the lower bound.
Defaults to 0.
double creativity::CreativitySettings::reader_creation_scale_range = 10.0 |
Reader.creation_scale values are drawn from \(U[a,b]\), where this value is the size of the range b-a
.
Defaults to 10 (so the values are drawn from U[0,10]).
double creativity::CreativitySettings::reader_creation_shape = 0 |
The "shape" parameter \(\beta\) of the reader effort.
double creativity::CreativitySettings::reader_step_mean = 0.5 |
Between periods, readers take a random step of length \(mx\), where this value is \(m\) and \(x \sim \chi^2_1\).
This value has mean \(m\) and standard deviation \(\sqrt{2} m\). If 0, readers remain at their initial positions forever.
The final location is selected from a uniform distribution over all points with the given distance from the reader's initial position.
The default is 0.5.