in csrc/liars_dice/recursive_eval.cc [28:53]
void report_regrets(const Game& game,
const std::vector<TreeStrategy>& strategy_list,
bool print_regret, bool print_regret_summary, int depth) {
auto full_tree = unroll_tree(game);
auto regrets = compute_immediate_regrets(game, strategy_list);
if (print_regret) {
std::cout << "\tRegrets: ";
for (int node = 0; node < 20; ++node) {
for (auto i : regrets[node]) std::cout << i << " ";
std::cout << "| ";
}
std::cout << "\n";
}
if (print_regret_summary) {
double top_regret = 0, bottom_regret = 0;
for (size_t node_id = 0; node_id < full_tree.size(); ++node_id) {
if (full_tree[node_id].depth < depth) {
top_regret += vector_sum(regrets[node_id]);
} else {
bottom_regret += vector_sum(regrets[node_id]);
}
}
std::cout << "\tRegrets (depth<=" << depth << ")/rest: " << top_regret
<< "/" << bottom_regret;
}
}