|
fmcs
v3.0.0
|
Game-theoretic distributions. The solved game is represented as a distribution over joint pure action profiles; the equilibrium selection rule is the logit quantal response equilibrium (QRE). More...
#include <algorithm>#include <array>#include <cmath>#include <limits>#include <memory>#include <random>#include <sstream>#include <string>#include <tuple>#include <utility>#include <vector>#include <distributions.hpp>#include <distribution_traits.hpp>#include <domains.hpp>Classes | |
| struct | arity< DynamicGame > |
| struct | arity< NormalFormGame > |
| struct | DynamicGame |
| struct | input_types< DynamicGame > |
| struct | input_types< NormalFormGame > |
| struct | Node |
| struct | NormalFormGame |
| A two-player normal form game with QRE equilibrium selection. More... | |
| struct | output_domain< DynamicGame > |
| struct | output_domain< NormalFormGame > |
Typedefs | |
| using | dynamic_play_t = std::vector< std::pair< int, std::string > > |
| using | nfg_profile_t = std::array< unsigned long, 2 > |
| Value type of a two-player normal form game node: the joint pure action profile. value[0] = row player's action index, value[1] = column player's action index. | |
Functions | |
| std::vector< double > | annotate (const std::shared_ptr< Node > &n) |
| std::vector< std::pair< int, std::string > > | eq_path (const std::shared_ptr< Node > &root) |
| static void | print_rec (const std::shared_ptr< Node > &n, const std::string &prefix, const std::string &conn, bool on_eq, bool is_last) |
| void | print_tree (const std::shared_ptr< Node > &root) |
| void | nfg_detail::softmax (double lam, const std::vector< double > &u, std::vector< double > &out) |
| Stabilized softmax: out[a] = exp(lam * (u[a] - max u)) / Z. Max-shift prevents overflow at high precision. | |
| std::vector< double > | solve (const std::shared_ptr< Node > &n, std::vector< std::string > *path) |
| template<> | |
| std::string | stringify (dynamic_play_t t) |
| double | nfg_detail::supnorm_diff (const std::vector< double > &x, const std::vector< double > &y) |
Game-theoretic distributions. The solved game is represented as a distribution over joint pure action profiles; the equilibrium selection rule is the logit quantal response equilibrium (QRE).
This file is part of fmcs. Copyright David Rushing Dewhurst, 2026 - present. Some rights reserved.