Opened 7 weeks ago

Last modified 5 weeks ago

#2740 new defect

Multi encoding operators are not parameterized correctly

Reported by: abeham Owned by: architects
Priority: medium Milestone: HeuristicLab 3.3.15
Component: Optimization Version: 3.3.14
Keywords: Cc:

Description

Please bear with me, the problem requires some understanding of the implemented algorithms, encodings and the parameter lookup and wiring. I'll try to explain:

The problem surfaces when using a multi-encoded problem with ALPS. An exception will be thrown, that the random number generator is not found. ALPS doesn't have a "Random" parameter, but uses a "LocalRandom" RNG instance for each layer in addition to a "GlobalRandom" RNG instance. Algorithms are responsible to scan all of the problem's operators that implement the IStochasticOperator interface and parameterize them accordingly, ALPS does this as well. However, if the operator is never seen by the algorithm wiring will not occur. All that ALPS sees is e.g. the MultiEncodingSolutionCreator, but not the solution creator of each encoding.

The solution would be to implement IStochasticOperator on all multi encoding operators. Then the algorithms would parameterize these and the name translation would work to identify the right RNG to use. This would work for random parameters. ALPS would then correctly parameterize the operators with LocalRandom. But the general problem of not being able to parameterize individual operators remains. A general solution however cannot be to return all operators of the embedded encodings as a concatenation as this would cause, e.g. individual crossovers to appear in the crossover parameter as well.

This problem has never surfaced earlier, because every other algorithms calls the RNG instance Random which is the default name in all operators and which thus find it "by chance".

Change History (1)

comment:1 Changed 7 weeks ago by mkommend

A possible solution for this would be to extend the IMultiEncodingOperator interface with a method IEnumerable<IOperator> GetOperators() that returns all possible operators that can be used (e.g. ISolutionCreators for the MultiEncodingSolutionCreator). This would enable algorithms that wire certain parameters to handle MultiEncodingOperators specifically by wiring the operators returned by GetOperators instead of the MultiEncodingOperator.

This might not be the most elegant solution and requires every algorithm that is able to handle MultiEncodings and wires parameters to be adapted. An advantage however is, that no side-effects could possibly occur, because of the new code necessary to utilize this method.

Last edited 5 weeks ago by mkommend (previous) (diff)
Note: See TracTickets for help on using tickets.