Hello,
When I'm running genetic evolution with initial population, strategy generation stops almost instantly.
Here is an error I found in logs.
Plus see attached config and initial population
21:16:10.341 [Nonblocking computeThread - 0 - GPIslandJob_0] ERROR c.s.g.c.p.MultithreadComputePerformer - Error while running task: GPIslandJob_0(e1ce93))
com.strategyquant.tradinglib.generator.GenerateException: Cannot find block with key LWMA
at com.strategyquant.tradinglib.blocks.random.ReplacementConfig.getBlockByKey(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.blocks.random.ReplacementConfig.generateMutatedRandomBlock(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.generator.StrategyGenerator.generateMutatedRandomBlock(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.strategies.NodeFactory.generateRandomBlock(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.strategies.GeneratedObject.mutateParam(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.strategies.GeneratedObject.mutate(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.strategies.NodeMutation.mutate(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.strategies.NodeMutation.apply(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.EvolutionPipeline.apply(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPGenerationalEngine.nextEvolutionStep(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPGenerationalEngine.gpEvolution(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPGenerationalEngine.evolve(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPIslandJob.call(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPIslandJob.call(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.gridlib.compute.performer.MultithreadComputePerformer$1.run(Unknown Source) ~[SQGridLib2.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
11:40:18.408 [Nonblocking computeThread - 7 - GPIslandJob_0] ERROR c.s.g.c.p.MultithreadComputePerformer - Error while running task: GPIslandJob_0(af03ef))
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.TimSort.mergeHi(TimSort.java:903) ~[na:na]
at java.base/java.util.TimSort.mergeAt(TimSort.java:520) ~[na:na]
at java.base/java.util.TimSort.mergeCollapse(TimSort.java:448) ~[na:na]
at java.base/java.util.TimSort.sort(TimSort.java:245) ~[na:na]
at java.base/java.util.Arrays.sort(Arrays.java:1515) ~[na:na]
at java.base/java.util.ArrayList.sort(ArrayList.java:1749) ~[na:na]
at java.base/java.util.Collections.sort(Collections.java:177) ~[na:na]
at com.strategyquant.tradinglib.gp.GPGenerationalEngine.sortEvaluatedPopulation(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPGenerationalEngine.nextEvolutionStep(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPGenerationalEngine.gpEvolution(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPGenerationalEngine.evolve(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPIslandJob.call(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.tradinglib.gp.GPIslandJob.call(Unknown Source) ~[SQTradingLib.jar:na]
at com.strategyquant.gridlib.compute.performer.MultithreadComputePerformer$1.run(Unknown Source) ~[SQGridLib2.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Status changed from New to Fixed
As for error "Comparison method violates its general contract!" - do youy experience it regularly? I have never seen it and as I checked the code I don't know how it could have happened.
If you see it often, can you create a new task for it and attach your build config? I'm closing this task.