Opened 8 years ago
Last modified 7 years ago
#2645 assigned feature request
Analysis of BasicAlgorithms
Reported by: | abeham | Owned by: | abeham |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 4.x Backlog |
Component: | Optimization | Version: | branch |
Keywords: | Cc: |
Description
Stefan and I were talking about making BasicAlgorithms analyzable. We came up with the idea that implementors of such an algorithm must provide an IEnumerable of solutions and their respective quality. As we already have ideas on how to separate the monolithic run method into iterations and allow pausable behavior we would then be able to run most analyzers in between those iterations.
Implementation details are not yet finished and a proof of concept has yet to be created.
Change History (12)
comment:1 Changed 7 years ago by mkommend
- Owner set to abeham
- Status changed from new to assigned
comment:2 Changed 7 years ago by abeham
- Milestone changed from HeuristicLab 3.3.15 to HeuristicLab 3.3.16
comment:3 Changed 7 years ago by abeham
- Version 3.3.14 deleted
comment:4 Changed 7 years ago by abeham
comment:5 Changed 7 years ago by abeham
- Owner changed from abeham to architects
comment:6 Changed 7 years ago by abeham
r15624: created branch
comment:7 Changed 7 years ago by abeham
r15625: implemented generic context-based genetic algorithm
comment:8 Changed 7 years ago by abeham
- Version set to branch
comment:9 Changed 7 years ago by abeham
r15695: renamed branch according to guidelines
comment:10 Changed 7 years ago by abeham
r15696: ignore items by name
comment:11 Changed 7 years ago by abeham
- Milestone changed from HeuristicLab 3.3.16 to HeuristicLab 4.x Backlog
It was decided 4.0 won't contain a new algorithm model
comment:12 Changed 7 years ago by jkarder
- Owner changed from architects to abeham
HL architects: this ticket should get a more appropriate name
I implemented half-way through a proof of concept. I divide an algorithm into two classes:
Classes in B should not contain any logic, just the data and data manipulation methods. Classes in A should perform all the initialization and manipulation.
An example of an algorithm that derives from BasicAlgorithm:
IContext is a generic context that holds basic elements common to all algorithms. The new on Parent is required because I require a setter in the Initialize method above.
A BasicContext implementation could look like this:
A context for population-based algorithms could look as follows:
I would also propose to provide more specific scopes so that variable access becomes easier and doesn't always require a dictionary lookup. Here is a very basic scope for solutions of single-objective problems.
Using this infrastructure we could build algorithms that only execute e.g. Mutation and Crossover in form of operators and have ordinary C# code for counting and branching. Still, further research is required.