// // Created by maximilian on 7/13/23. // #include #include #include #include #include #include "game_state.h" #include "download.h" #include "myassert.h" namespace Hanabi { void download(int turn) { auto game = Download::get_game("1004116", turn); std::cout << "Analysing state: " << *game << std::endl; auto res = game->backtrack(1); std::cout.precision(10); std::cout << "Probability with optimal play: " << res << std::endl; std::cout << "Enumerated " << game->enumerated_states() << " states" << std::endl; } void print_sizes() { std::cout << "size of card -> hand map: " << sizeof(HanabiState<5, 3, 4>) << std::endl; unsigned exp = 32; std::cout << "Pair size: " << sizeof(std::pair) << std::endl; std::cout << sizeof(boost::rational) << std::endl; std::cout << (1ul << exp) << std::endl; } } int main(int argc, char *argv[]) { // Hanabi::test_game(); if(argc == 2) { std::string turn (argv[1]); Hanabi::download(std::stoi(turn)); } return 0; }