#pragma once #include #include "global.hpp" using std::set; // For deciding the best guess struct Weighed_guess { int weight; vector guess; Weighed_guess(int _w, vector _g) : weight(_w), guess(_g) {} Weighed_guess() {} }; // Solving the game class Solver { int N, M; set> possible; bool first_pick = true; public: Solver(int N, int M); vector guess(); void learn(vector guess, Response response); private: void generate_set(vector carry); int get_weight(vector guess); Weighed_guess minimax(vector carry); Weighed_guess choose_possible(); };