Unknown guesses
This commit is contained in:
parent
26394d7c29
commit
4c6018bf3c
3 changed files with 12 additions and 0 deletions
3
main.cpp
3
main.cpp
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -21,6 +21,7 @@ public:
|
|||
|
||||
vector<int> guess();
|
||||
void print();
|
||||
void print_unknown();
|
||||
void learn(vector<int> guess, Response response);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue