First guess is static 01234...
This commit is contained in:
parent
10c52ebec9
commit
5dbaa7444f
2 changed files with 13 additions and 0 deletions
12
solver.cpp
12
solver.cpp
|
@ -18,6 +18,18 @@ Solver::Solver(int _N, int _M) : N(_N), M(_M) {
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<int> Solver::guess() {
|
vector<int> Solver::guess() {
|
||||||
|
if(possible.size() == pow(M, N)) {
|
||||||
|
cout << "Picking first\n";
|
||||||
|
vector<int> pick(0);
|
||||||
|
|
||||||
|
int times = N / M + 1;
|
||||||
|
for(int i = 0; i < times; i++)
|
||||||
|
for(int j = 0; j < M && pick.size() < N; j++)
|
||||||
|
pick.push_back(j);
|
||||||
|
|
||||||
|
return pick;
|
||||||
|
}
|
||||||
|
|
||||||
return minimax({}).guess;
|
return minimax({}).guess;
|
||||||
}
|
}
|
||||||
void Solver::learn(vector<int> guess, Response response) {
|
void Solver::learn(vector<int> guess, Response response) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <cmath>
|
||||||
#include "global.hpp"
|
#include "global.hpp"
|
||||||
|
|
||||||
using std::set;
|
using std::set;
|
||||||
|
|
Loading…
Reference in a new issue