print best actions in current state

This commit is contained in:
Maximilian Keßler 2023-08-11 17:05:52 +02:00
parent c77215ed14
commit 6ae9244fa6
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -23,6 +23,16 @@ namespace Hanabi {
std::cout << "Probability with optimal play: " << res << std::endl;
std::cout << "Enumerated " << game->enumerated_states() << " states" << std::endl;
std::cout << "Visited " << game->position_tablebase().size() << " unique game states. " << std::endl;
for (const auto &[action, probability] : game->get_reasonable_actions()) {
std::cout << action;
if(probability.has_value()) {
std::cout << " " << probability.value();
} else {
std::cout << " unknown";
}
std::cout << ", ";
}
std::cout << std::endl;
unsigned long biggest_key = 0;
for(const auto& [key, prob] : game->position_tablebase()) {
biggest_key = std::max(biggest_key, key);
@ -107,7 +117,7 @@ void check_games(unsigned num_players, unsigned max_draw_pile_size, unsigned fir
int main(int argc, char *argv[]) {
#ifndef NDEBUG
test();
// test();
#endif
if(argc == 3) {
std::string game(argv[1]);