[PYTHON] Implementation of game theory-Prisoner's dilemma-

https://qiita.com/kobayu0902art/items/782d373b6706457670d8 Than

Try to implement

like this 2x2 game with 2 players and 2 choices Let's implement an algorithm in Python that selects rational actions in.

Implementation example 1

First of all, the gain matrix of this game WS000001.jpg 2D array

[ [-4,-4] , [0,-10],
  [-10,0] , [-7,-7] ]

Expressed in.

At this time, what should be compared

Player A eyes -[0] [0] or [1] [0] Which is larger -[2] [0] or [3] [0] Which is larger

When

Player B eyes -[0] [1] or [2] [1] Which is larger -[1] [1] or [3] [1] Which is larger

Is.

-------------------- Writing ---------------------------- ------

Recommended Posts

Implementation of game theory-Prisoner's dilemma-
Implementation of life game in Python
Implementation of Fibonacci sequence
Quantum computer implementation of quantum walk 2
Implementation of TF-IDF using gensim
Implementation of MathJax on Sphinx
Explanation and implementation of SocialFoceModel
Implementation of independent component analysis
Quantum computer implementation of quantum walk 3
Python implementation of particle filters
Implementation of quicksort in Python
Quantum computer implementation of quantum walk 1
Deep reinforcement learning 2 Implementation of reinforcement learning
Implementation of Scale-space for SIFT
Implementation of Bulk Update with mongo-go-driver
Explanation and implementation of PRML Chapter 4
Introduction and Implementation of JoCoR-Loss (CVPR2020)
Explanation and implementation of ESIM algorithm
Introduction and implementation of activation function
Qiskit: Implementation of quantum Boltzmann machine
Python implementation of self-organizing particle filters
Implementation of a simple particle filter
Implementation of a two-layer neural network 2
Implementation of login function in Django
Qiskit: Implementation of Quantum Hypergraph States
Quantum computer implementation of 3-state quantum walk
Einsum implementation of value iterative method
Explanation and implementation of simple perceptron
Life game with Python! (Conway's Game of Life)
Implementation of desktop notifications using Python
An implementation of ArcFace for TensorFlow
implementation of c / c ++> RingBuffer (N margins)
Python implementation of non-recursive Segment Tree
Implementation of Light CNN (Python Keras)
Qiskit: Implementation of QAOA without Qiskit Aqua
Implementation of original sorting in Python
Implementation of Dijkstra's algorithm with python