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";
|
cout << "History\n";
|
||||||
for(auto guess : history)
|
for(auto guess : history)
|
||||||
cout << format_guess_history(sequence, guess) << '\n';
|
cout << format_guess_history(sequence, guess) << '\n';
|
||||||
|
cout << "Info left:\n";
|
||||||
|
bot.print_unknown();
|
||||||
|
cout << '\n';
|
||||||
|
|
||||||
// Loss
|
// Loss
|
||||||
if(history.back() != sequence) {
|
if(history.back() != sequence) {
|
||||||
|
|
|
@ -56,6 +56,14 @@ vector<int> Solver::guess() {
|
||||||
void Solver::print() {
|
void Solver::print() {
|
||||||
known.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
|
// Clean guess and response from info we know
|
||||||
Historic_guess Solver::clean(Historic_guess hist) {
|
Historic_guess Solver::clean(Historic_guess hist) {
|
||||||
|
|
|
@ -21,6 +21,7 @@ public:
|
||||||
|
|
||||||
vector<int> guess();
|
vector<int> guess();
|
||||||
void print();
|
void print();
|
||||||
|
void print_unknown();
|
||||||
void learn(vector<int> guess, Response response);
|
void learn(vector<int> guess, Response response);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue