creativity  v1.3.0
Agent-based model of creativity and piracy
CreativitySettings.hpp
1 #pragma once
2 #include "creativity/Policy.hpp"
3 #include <eris/types.hpp>
4 #include <cstdint>
5 #include <array>
6 
7 namespace creativity {
8 
12  uint32_t readers = 100;
13 
15  uint32_t dimensions = 2;
16 
22  double boundary = 5.0;
23 
34  double book_distance_mean = 0.0;
35 
43  double book_quality_sd = 1.0;
44 
54  double reader_step_mean = 0.5;
55 
61 
68 
73 
79  uint32_t creation_time = 3;
80 
84  double creation_fixed = 100.0;
85 
88  double cost_market = 10.0;
89 
97  double cost_unit = 1.0;
98 
101  double cost_piracy = 1.0;
102 
106  double income = 1000.0;
107 
112  eris::eris_time_t piracy_begins = 101;
113 
134 
138  eris::eris_time_t policy_begins = 201;
139 
145 
150 
160 
164  double policy_catch_tax = 10.0;
165 
172  double policy_catch_cost = 10.0;
173 
188  std::array<double, 3> policy_catch_fine{{25., 12.5, 12.5}};
189 
213  std::array<double, 3> policy_catch_mu{{10., -.08, 0.}};
214 
221  std::array<double, 3> policy_catch_sigma{{3., -.02, 0.}};
222 
235 
239  double prior_scale = 1.02;
240 
244  double prior_scale_piracy = 2;
245 
249  double prior_scale_policy = 2;
250 
255  double prior_scale_burnin = 1.5;
256 
258  uint32_t burnin_periods = 20;
259 
263  uint32_t prediction_draws = 100;
264 
272  struct {
274  double prob_write = 0.1;
278  double l_min = 0;
282  double l_range = 100.0;
286  double p_min = 4.0;
288  double p_range = 30.0;
290  double prob_keep = 0.5;
295  double keep_price = 0.5;
310  int32_t belief_threshold = 5;
311  } initial;
312 
313 };
314 
315 }
316 
double piracy_link_proportion
The number of sharing/friendship links as a proportion of the maxinum number of sharing links possibl...
Definition: CreativitySettings.hpp:234
double p_range
Initial book prices are distributed cost_unit + Uniform[p_min, p_min+p_range].
Definition: CreativitySettings.hpp:288
double prob_write
The probability that a reader writes a book.
Definition: CreativitySettings.hpp:274
double income
The per-period external income readers receive.
Definition: CreativitySettings.hpp:106
Primary namespace for all Creativity library code.
Definition: config.hpp:4
double book_quality_sd
The standard deviation of a book quality draw.
Definition: CreativitySettings.hpp:43
double prior_scale
The factor by which parameter standard deviations should be multiplied when using it as a prior for a...
Definition: CreativitySettings.hpp:239
double reader_creation_shape
The "shape" parameter of the reader effort.
Definition: CreativitySettings.hpp:60
double reader_creation_scale_range
Reader.creation_scale values are drawn from , where this value is the size of the range b-a...
Definition: CreativitySettings.hpp:72
double policy_public_voting_tax
This is the lump-sum per-reader tax for public sharing with voting.
Definition: CreativitySettings.hpp:149
uint32_t dimensions
The number of dimensions in the simulation.
Definition: CreativitySettings.hpp:15
double cost_market
The fixed cost of keeping a book on the market.
Definition: CreativitySettings.hpp:88
double policy_catch_cost
The utility cost of being accused of piracy.
Definition: CreativitySettings.hpp:172
double cost_piracy
The cost of receiving a pirated copy of a book, incurred by the recipient.
Definition: CreativitySettings.hpp:101
double l_range
Initial book creation effort levels are distributed Uniform[l_min, l_min+l_range].
Definition: CreativitySettings.hpp:282
eris::eris_time_t policy_begins
The period in which the policy response to piracy begins.
Definition: CreativitySettings.hpp:138
std::array< double, 3 > policy_catch_sigma
Like policy_catch_mu, but for the quadratic coefficients of .
Definition: CreativitySettings.hpp:221
static constexpr Policy PublicSharing()
Returns a constexpr Policy value for public sharing.
Definition: Policy.hpp:51
double prior_scale_policy
The factor by which to multiply standard deviations in the first policy response period.
Definition: CreativitySettings.hpp:249
std::array< double, 3 > policy_catch_mu
For the "catch pirates" policy, the probability of being accused of piracy for obtaining copies over...
Definition: CreativitySettings.hpp:213
double book_distance_mean
An authored book will be located at a distance of from the author&#39;s location at the time of writing...
Definition: CreativitySettings.hpp:34
double reader_step_mean
Between periods, readers take a random step of length , where this value is and .
Definition: CreativitySettings.hpp:54
double policy_catch_tax
This is the lump-sum tax extracted from each user to fund the policing policy to catch and fine reade...
Definition: CreativitySettings.hpp:164
double creation_fixed
The fixed cost component of initial creation.
Definition: CreativitySettings.hpp:84
double l_min
Initial book creation effort levels are distributed Uniform[l_min, l_min+l_range].
Definition: CreativitySettings.hpp:278
uint32_t prediction_draws
The number of model draws to use for prediction.
Definition: CreativitySettings.hpp:263
eris::eris_time_t piracy_begins
The period in which piracy becomes available.
Definition: CreativitySettings.hpp:112
std::array< double, 3 > policy_catch_fine
A person who gets caught and is guilty of piracy pays a fine of , where is the number of pirated boo...
Definition: CreativitySettings.hpp:188
Policy policy
The policy response(s) used to address piracy.
Definition: CreativitySettings.hpp:133
double prior_scale_burnin
The prior weight to use during the burn-in period; typically much larger than prior_scale so that the...
Definition: CreativitySettings.hpp:255
struct creativity::CreativitySettings::@5 initial
The values in this struct define fixed probabilities and distributions of simulation actions...
Class for interpreting and/or constructing encoded policy values.
Definition: Policy.hpp:12
double p_min
Initial book prices are distributed cost_unit + Uniform[p_min, p_min+p_range].
Definition: CreativitySettings.hpp:286
double prob_keep
The probability of a book being kept on the market for another period.
Definition: CreativitySettings.hpp:290
double reader_creation_scale_min
Reader.creation_scale values are drawn from , where this value is the lower bound.
Definition: CreativitySettings.hpp:67
uint32_t policy_public_voting_votes
The number of votes each reader receives in the public-sharing-with-voting regime.
Definition: CreativitySettings.hpp:159
double cost_unit
The unit cost of selling a copy of a book (note that only copies of books still on the market can be ...
Definition: CreativitySettings.hpp:97
double prior_scale_piracy
The factor by which to multiply standard deviations in the first piracy period.
Definition: CreativitySettings.hpp:244
double boundary
The boundary in each dimension to use for simulation members.
Definition: CreativitySettings.hpp:22
uint32_t creation_time
The average length of time (in simulation periods) it takes to create a book.
Definition: CreativitySettings.hpp:79
uint32_t burnin_periods
The number of "burn-in" periods, during which priors are discounted at a higher rate.
Definition: CreativitySettings.hpp:258
int32_t belief_threshold
The minimum number of observations (relative to k) before a belief is used.
Definition: CreativitySettings.hpp:310
Simulation parameters that are used to configure the simulation when calling setup().
Definition: CreativitySettings.hpp:10
double policy_public_sharing_tax
This is the lump-sum tax extracted from each user at the beginning of the period to fund the public s...
Definition: CreativitySettings.hpp:144
double keep_price
The relative price-above-marginal-cost of a book being kept on the market for another period...
Definition: CreativitySettings.hpp:295
uint32_t readers
The number of readers in the simulation.
Definition: CreativitySettings.hpp:12