summaryrefslogtreecommitdiffstats
path: root/ai/Node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ai/Node.cpp')
-rw-r--r--ai/Node.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ai/Node.cpp b/ai/Node.cpp
index c95d6eae..9fc723d6 100644
--- a/ai/Node.cpp
+++ b/ai/Node.cpp
@@ -40,7 +40,7 @@ void PokeGen::NeuralNetwork::Node::UpdateWeights(int n)
{
if (n < 0)
{
- weights.push_back((abs(std::rand())%201)/100.0);
+ weights.push_back((abs(std::rand()) % 201) / 100.0);
weightChanges.push_back(0);
}
else if (n < ownerLayer->child->GetNumNodes())
@@ -87,7 +87,7 @@ void PokeGen::NeuralNetwork::Node::RandomizeWeights()
weights.clear();
int i = 0;
for (; i < ownerLayer->child->GetNumNodes(); ++i)
- weights.push_back((abs(std::rand())%201)/100.0);
+ weights.push_back((abs(std::rand()) % 201) / 100.0);
weightChanges.clear();
weightChanges.resize(i - 1, 0);
}
@@ -208,5 +208,5 @@ void PokeGen::NeuralNetwork::Node::CalculateValue()
void PokeGen::NeuralNetwork::Node::DumpData(const std::string &f)
{
-
+ // TODO (Ben#1#): Dump NeuralNode data
}