PayoffMatrix.hpp

A simple game theory payoff matrix.

class PayoffMatrix
#include <PayoffMatrix.hpp>

Public Types

using move_t = size_t

Public Functions

inline PayoffMatrix(size_t _moves = 2)
inline void Reset()
inline void SetVal(size_t self, size_t other, double value)
inline double &operator()(size_t A, size_t B)
inline double operator()(size_t A, size_t B) const
inline void SetupPD(double u)
inline void SetupSnowdrift(double cost)
inline std::unordered_map<int, double> AsInput(size_t player_id) const

Private Functions

inline constexpr size_t to_index(size_t A, size_t B) const

Private Members

vector<double> payoff
size_t num_moves