loooot of fixes nad SSE enhacement
This commit is contained in:
@@ -9,13 +9,13 @@ class X: public Shin::NeuronNetwork::Problem
|
||||
{
|
||||
public:
|
||||
X(const X& a) :q(a.q) {}
|
||||
X(const std::vector<bool> &a):q(a) {}
|
||||
std::vector<bool> representation() const
|
||||
X(const std::vector<float> &a):q(a) {}
|
||||
std::vector<float> representation() const
|
||||
{
|
||||
return q;
|
||||
}
|
||||
protected:
|
||||
std::vector<bool> q;
|
||||
std::vector<float> q;
|
||||
};
|
||||
|
||||
int main()
|
||||
@@ -24,15 +24,16 @@ int main()
|
||||
|
||||
std::vector<X> p;
|
||||
|
||||
p.push_back(X(std::vector<bool>({0,0})));
|
||||
p.push_back(X(std::vector<float>({0,0})));
|
||||
|
||||
p.push_back(X(std::vector<bool>({1,1})));
|
||||
p.push_back(X(std::vector<float>({1,1})));
|
||||
|
||||
Shin::NeuronNetwork::FeedForwardNetworkQuick q({2,6,2});
|
||||
Shin::NeuronNetwork::Learning::Reinforcement b(q);
|
||||
b.getPropagator().setLearningCoeficient(1);
|
||||
int i=0;
|
||||
b.setQualityFunction(
|
||||
[&i](const Shin::NeuronNetwork::Solution &s)->double
|
||||
[&i](const Shin::NeuronNetwork::Problem &,const Shin::NeuronNetwork::Solution &s)->float
|
||||
{
|
||||
if(i%2==0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user