RL modified
This commit is contained in:
@@ -26,20 +26,22 @@ float Shin::NeuronNetwork::Learning::Reinforcement::learn(const Shin::NeuronNetw
|
||||
{
|
||||
q.push_back(s[j]);//*((float)(990+(rand()%21))/1000.0));
|
||||
}
|
||||
if(quality <= 0)
|
||||
|
||||
register int i=abs((int)quality);
|
||||
|
||||
if(quality <= 0 && i > 0)
|
||||
{
|
||||
for(register size_t j=0;j<s.size();j++)
|
||||
{
|
||||
q[j]=((float)(100-(rand()%101)))/100.0;
|
||||
}
|
||||
}
|
||||
register int i=abs((int)quality);
|
||||
if(quality != 0.0 && i==0)
|
||||
i+=1;
|
||||
|
||||
for(;i>=0;i--)
|
||||
{
|
||||
p->propagate(q);
|
||||
network.solve(problem); // resolve problem ??? TOTO: should it be here?
|
||||
if(quality < 0)
|
||||
network.solve(problem); // resolve problem ??? TOTO: should it be here?
|
||||
}
|
||||
return quality;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user