#pragma once #include #include namespace NeuralNetwork { namespace ProblemSets { typedef std::pair, std::vector> TrainingPattern; std::vector Chess3X3(float min, std::size_t patterns) { std::vector ret; std::mt19937 _generator(rand()); std::uniform_real_distribution<> _distribution(min,1); float step = (1.0-min)/3.0; for(std::size_t i=0;i((x-min)/step) + static_cast((y-min)/step)) % 2; if(classX == 0) { ret.push_back({{x,y},{min}}); } else { ret.push_back({{x,y},{1.0}}); } } return ret; } } }