#pragma once #include "global.hpp" // 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 { Game known; int N, M; vector history = {}; public: Solver(int N, int M); vector guess(); void print(); void learn(vector guess, Response response); private: Historic_guess clean(Historic_guess hist); vector extract_info(Historic_guess hist); bool all_are_consistent(vector supposed_sequence); vector brute_force(vector> *possibilities, vector *chosen, int index); int get_weight(vector guess); Weighed_guess minimax(vector> *possibilities, vector *chosen, int index); };