encog-java-core icon indicating copy to clipboard operation
encog-java-core copied to clipboard

ParallelScoreTask Does Not Check For Null (like encog-dotnet-core does)

Open deriven opened this issue 6 years ago • 0 comments

First of all, encog is wonderful!

When running the HyperNEAT example, gradle runNEATBoxes, from the encog-java-examples, I kept getting a NullException error. But in the .NET version, it works fine. Doing a line-by-line comparison, I found that the ParallelScoreTasks are slightly different and that the .NET version is actually better.

https://github.com/encog/encog-java-core/blob/master/src/main/java/org/encog/ml/ea/score/parallel/ParallelScoreTask.java

https://github.com/encog/encog-dotnet-core/blob/master/encog-core-cs/ML/EA/Score/Multi/ParallelScoreTask.cs

The Java version does not check for null phenotype and therefore errors later in the run method. Also the Java version traps the error and sends it to the owner which doesn't help. Whereas the .NET version skips the code if it can't get a phenotype.

Side question: which version would you think is more stable and maintained? .NET or Java?

deriven avatar Apr 01 '18 01:04 deriven