QuantumPrisonersDilemmaModel.QPDMType
QPDM{T<:Real} <: AbstractQPDM

A model object for the Quantum Prisoner's Dilemma Model. The QPDM has four basis states:

  1. opponent defects and you defect
  2. opponent defects and you cooperate
  3. opponent cooperates and you defect
  4. opponent cooperates and you cooperate

The bases are orthonormal and in standard form. The model assumes three conditions:

  1. Player 2 is told that player 1 defected
  2. Player 2 is told that player 1 cooperated
  3. Player 2 is not informed of the action of player 1

Model inputs and outputs are assumed to be in the order above.

Fields

  • μd: utility for defecting
  • μc: utility for cooperating
  • γ: entanglement parameter for beliefs and actions

Example

using QuantumPrisonersDilemmaModel
model = QPDM(;μd=.51, γ=2.09)

References

Pothos, E. M., & Busemeyer, J. R. (2009). A quantum probability explanation for violations of ‘rational’decision theory. Proceedings of the Royal Society B: Biological Sciences, 276(1665), 2171-2178.

source
Base.randMethod
rand(dist::AbstractQPDM, n::Int; t = π / 2)

Generates simulated data for the following conditions:

  1. Player 2 is told that player 1 defected
  2. Player 2 is told that player 1 cooperated
  3. Player 2 is not informed of player 1's action

Arguments

  • dist::AbstractQPDM
  • n: the number of trials per condition

Keywords

  • t = π / 2: time of decision

Example

using QuantumPrisonersDilemmaModel 
model = QPDM(;μd=.51, γ=2.09)
data = rand(model, 100)
source
Distributions.logpdfMethod
logpdf(dist::AbstractQPDM, n::Int, n_d::Vector{Int}; t = π / 2)

Returns the joint log density given data for the following conditions:

  1. Player 2 is told that player 1 defected
  2. Player 2 is told that player 1 cooperated
  3. Player 2 is not informed of player 1's action

Arguments

  • dist::AbstractQPDM
  • n: the number of trials per condition
  • n_d: the number of defections in each condition

Keywords

  • t = π / 2: time of decision

Example

using QuantumPrisonersDilemmaModel 
model = QPDM(;μd=.51, γ=2.09)
n_trials = 100
data = rand(model, n_trials)
logpdf(model, n_trials, data)
source
Distributions.pdfMethod
pdf(dist::AbstractQPDM, n::Int, n_d::Vector{Int}; t = π / 2)

Returns the joint probability density given data for the following conditions:

  1. Player 2 is told that player 1 defected
  2. Player 2 is told that player 1 cooperated
  3. Player 2 is not informed of player 1's action

Arguments

  • dist::AbstractQPDM
  • n: the number of trials per condition
  • n_d: the number of defections in each condition

Keywords

  • t = π / 2: time of decision
source
QuantumPrisonersDilemmaModel.predictMethod
predict(dist::AbstractQPDM; t = π / 2)

Returns predicted response probability for the following conditions:

  1. Player 2 is told that player 1 defected
  2. Player 2 is told that player 1 cooperated
  3. Player 2 is not informed of player 1's action

Arguments

  • dist::AbstractQPDM

Keywords

  • t = π / 2: time of decision

Example

using QuantumPrisonersDilemmaModel 
model = QPDM(;μd=.51, γ=2.09)
predict(model)
source