Free cookie consent management tool by TermsFeed Policy Generator

Opened 11 years ago

Closed 11 years ago

#1996 closed defect (done)

IslandGA does not work with stochastic evaluator

Reported by: mkommend Owned by: abeham
Priority: medium Milestone: HeuristicLab 3.3.8
Component: Algorithms.GeneticAlgorithm Version: 3.3.8
Keywords: Cc:

Description (last modified by mkommend)

The reason is that every island has a local RNG which is initialized in the IslandGAMainLoop. However, the first call to the evaluator happens outside the main loop directly in the SolutionsCreator and hence throws an exception as the RNG is not initialized. Using the global RNG is not a solution as this would lead to race conditions if a parallel engine is used.

Change History (18)

comment:1 Changed 11 years ago by mkommend

  • Description modified (diff)
  • Status changed from new to accepted

comment:2 Changed 11 years ago by mkommend

r9037: Adapted SymbolicDataAnalysisEvaluator to implement IStochasticOperator.

Last edited 11 years ago by mkommend (previous) (diff)

comment:3 Changed 11 years ago by mkommend

r9038: Added OperatorGraph.Iterate method which returns all reachable operators.

comment:4 Changed 11 years ago by mkommend

r9039: Adapted IslandGA to created local RNG outside of the main loop. Added regions to indicate code that can be removed if the plugin version is increased to 3.4.

comment:5 Changed 11 years ago by mkommend

Currently this is not an issue for the IslandOSGA as the modifications regarding a local RNG for every island were not performed.

comment:6 Changed 11 years ago by mkommend

  • Description modified (diff)

comment:7 Changed 11 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from accepted to reviewing

comment:8 Changed 11 years ago by abeham

  • Owner changed from abeham to mkommend
  • Status changed from reviewing to assigned
  • Is backwards compatibility maintained?

The backwards compatibility region in r9039 cannot simply be removed as stated. The graph would break. I would just put a comment at the beginning of the code explaining the backwards compatibility and telling that ussp0 and ussp1 should be merged putting LocalRandomCreator before SolutionsCreator and removing RandomCreator.

In the mainloop the local random creator should also have a note that it can be removed from the graph when we'd go to 3.4.

Finally, a small thing: I would mark the Iterate() method in OperatorGraph virtual.

Otherwise the changes look good to me.

comment:9 Changed 11 years ago by mkommend

r9075: Changed access modifier from OperatorGraph.Iterate() to public virtual`.

comment:10 Changed 11 years ago by mkommend

r9076: Updated comments for backwards compatibility regions in IslandGA and IslandGAMainLoop.

comment:11 Changed 11 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from assigned to reviewing

comment:12 Changed 11 years ago by abeham

  • Status changed from reviewing to readytorelease

ok

comment:13 Changed 11 years ago by mkommend

  • Owner changed from abeham to mkommend
  • Status changed from readytorelease to assigned

The OperatorGraph.Iterate (r9038) does not take AlgorithmOperators into account and so the parts of the OperatorGraph are ignored.

comment:14 Changed 11 years ago by mkommend

  • Status changed from assigned to accepted

comment:15 Changed 11 years ago by mkommend

r9178: Corrected OperatorGraph.Iterate to include AlgorithmOperators.

comment:16 Changed 11 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from accepted to reviewing

Please review r9178 (all other changes have already been reviewed). I am not really happy with the name IOperatorGraphOperator, but could not come up with a better one.

comment:17 Changed 11 years ago by abeham

  • Status changed from reviewing to readytorelease

ok, let's discuss the name at the next meeting. Interface names changes are not breaking changes anyway.

comment:18 Changed 11 years ago by swagner

  • Resolution set to done
  • Status changed from readytorelease to closed
  • Version changed from 3.3.7 to 3.3.8
Note: See TracTickets for help on using tickets.