Package teamwork :: Package examples :: Package Games :: Module PublicGood
[hide private]
[frames] | no frames]

Module PublicGood

source code

Classes [hide private]
  DonateAction
Domain-specific class that includes an 'amount' field.
  PublicGoodAgents
Domain-specific class that sets up the game stages
  PublicGoodAgent
  PublicGoodShell
  PublicGoodTerminal
Functions [hide private]
 
agentCount()
Returns the number of agents in the total population
source code
 
genWealthDyn(amountLost=-1.) source code
 
genDisburseDyn(scale)
Generates the wealth dynamics for the disbursement of the public pool of wealth
source code
 
genGoodDyn() source code
 
createGoals(uWealth) source code
 
makeDonateEntry(lo, hi, label='', depth=1) source code
 
makePunishPolicy(punishmentThreshold) source code
 
makeDonatePolicy(actions, threshold=0.) source code
 
createPolicy(threshold)
Creates a policy for the pooler/disburser, with the threshold the cost of the public good (ignored if there is no explicit public good
source code
 
initialize(args={})
Set the dynamic parameters of the class hierarchy.
source code
 
usage(value=-1) source code
Variables [hide private]
  __GOOD__ = None
  __PUNISH__ = 1
  population = {'OptOptDonor': 0, 'OptPesDonor': 0, 'PesOptDonor...
  donations = [.001,.003,.005,.007,.01]
  fines = [.01]
  namePrefix = 'agent'
  neighborSpacing = 1
  __count__ = -1
Variables Details [hide private]

population

Value:
{'OptOptDonor': 0, 'OptPesDonor': 0, 'PesOptDonor': 0, 'PesPesDonor': \
0}