New learning implemented
This commit is contained in:
parent
2ab571db24
commit
cfbe716587
1 changed files with 6 additions and 2 deletions
|
@ -21,9 +21,13 @@ Solver::Solver(int _N, int _M) : N(_N), M(_M) {
|
|||
vector<int> Solver::guess() {
|
||||
return {};
|
||||
}
|
||||
// TODO
|
||||
void Solver::learn(vector<int> guess, Response response) {
|
||||
|
||||
vector<vector<int>> next_possible(0);
|
||||
for(int i = 0; i < possible.size(); i++)
|
||||
if(validate(possible[i], guess) == response)
|
||||
next_possible.push_back(possible[i]);
|
||||
|
||||
possible = next_possible;
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
|
Loading…
Reference in a new issue