Unknown guesses

This commit is contained in:
Matúš Púll 2024-12-12 13:20:51 +01:00
parent 26394d7c29
commit 4c6018bf3c
3 changed files with 12 additions and 0 deletions

View file

@ -91,6 +91,9 @@ int main(int argc, char* argv[]) {
cout << "History\n";
for(auto guess : history)
cout << format_guess_history(sequence, guess) << '\n';
cout << "Info left:\n";
bot.print_unknown();
cout << '\n';
// Loss
if(history.back() != sequence) {

View file

@ -56,6 +56,14 @@ vector<int> Solver::guess() {
void Solver::print() {
known.print();
}
void Solver::print_unknown() {
for(auto hist : history) {
auto cleaned = clean(hist);
for(int pos : cleaned.guess)
cout << pos << " ";
cout << "[" << cleaned.response.somewhere << "/" << cleaned.response.correct << "]\n";
}
}
// Clean guess and response from info we know
Historic_guess Solver::clean(Historic_guess hist) {

View file

@ -21,6 +21,7 @@ public:
vector<int> guess();
void print();
void print_unknown();
void learn(vector<int> guess, Response response);
private: