Opened 2 years ago
Closed 23 months ago
#2472 closed enhancement (done)
Create HeuristicLab.Problems.GeneticProgramming
Reported by: | gkronber | Owned by: | gkronber |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.13 |
Component: | Problems.GeneticProgramming | Version: | 3.3.12 |
Keywords: | Cc: |
Description (last modified by gkronber)
This plugin should hold GP problems such as the aritificial ant or the lawn mower problem.
This ticket replaces individual tickets #2421, #2422, and #2469
For integration into stable merge the following changesets:
- ticket #2430 (in particular r12846) must be merged first
- r12895:12906 (Encoding, ArtificialAnt-3.5 (deleted), LawnMower-3.4 (deleted)
- r12911:12912, r12915:12918
Change History (32)
comment:1 Changed 2 years ago by gkronber
- Component changed from ### Undefined ### to Problems.GeneticProgramming
- Status changed from new to accepted
comment:2 Changed 2 years ago by gkronber
comment:3 Changed 2 years ago by gkronber
r12912: svn:ignore
comment:4 Changed 2 years ago by gkronber
- Description modified (diff)
comment:5 Changed 2 years ago by gkronber
- include Problems.GeneticProgramming in solution
- use Problems.GeneticProgramming from Problems.GrammaticalEvolution (only ArtificialAnt part)
- simplified GEArtificialAntProblem by using BasicProblem<IntegerVectorEncoding>
comment:6 Changed 2 years ago by gkronber
- deleted unused files
- removed createable attribute from outdated implementation of GrammaticalEvolution problems
comment:7 Changed 2 years ago by gkronber
- Description modified (diff)
r12917:12918: removed deleted projects from solution
comment:8 Changed 2 years ago by gkronber
- Description modified (diff)
comment:9 Changed 2 years ago by gkronber
I left the SymbolicExpressionTreeProblem in the encoding plugin because I believe it fits better there (as a potential base class for all problems using the symbolic expression tree encoding). It is not strictly necessary to include a reference to Problems.GeneticProgramming.
comment:10 Changed 2 years ago by gkronber
r12921: update best solution only if a solution with a better best quality is found
comment:11 Changed 2 years ago by gkronber
r12936:12937 added an implementation of Koza-style symbolic regression as BasicProblem to Problems.GeneticProgramming
comment:12 Changed 2 years ago by gkronber
r12938: added even parity and multiplexer problems (GP)
comment:13 Changed 2 years ago by gkronber
r12940: minor fix in multiplexer problem
comment:14 Changed 2 years ago by gkronber
r12947: removed unnecessary Filename property
comment:15 Changed 2 years ago by gkronber
- Owner changed from gkronber to mkommend
- Status changed from accepted to reviewing
comment:16 Changed 2 years ago by gkronber
- Owner changed from mkommend to gkronber
- Status changed from reviewing to assigned
The samples (artificial ant, lawn mower, and multiplexer) should be updated. (Done)
comment:17 Changed 2 years ago by gkronber
comment:18 Changed 2 years ago by gkronber
r13057: changed lawn mower sample to use the new implementation and added assertions for the results of the unit test (let's see if they work on the builder...)
comment:19 Changed 2 years ago by gkronber
r13058: fixed lawn mower sample
comment:20 Changed 23 months ago by gkronber
r13163 (sorry this commit messages incorrectly references #2069, but it was not possible to edit the svn log message afterwards)
- adapted the multiplexer sample to use the specific implementation of the multiplexer problem instead of symbolic regression.
- Added best known solutions for the Boolean benchmark problems
comment:21 Changed 23 months ago by gkronber
- Owner changed from gkronber to mkommend
- Status changed from assigned to reviewing
all changesets mentioned in the comments are relevant but probably it is best to review the code in
- HeuristicLab.Problems.GeneticProgramming and
- HeuristicLab.Problems.GeneticProgramming.Views
comment:22 follow-up: ↓ 28 Changed 23 months ago by mkommend
Reviewed the SymbolicExpressionTreeProblem and HL.Problems.GP and the according views and unit test for sample creation.
Comments:
- Odd source code organization (cloning and persistence in a region at the EOF)
- BasicSymbolicRegression
- Recreates constants every time the problem is changed => not reproducible
- Couldn't the solution be transformed to a standard data analysis tree (simplify, optimize?
- Why are the boolean problems restricted (number of bits) and why is this done in the evaluation function?
Overall pretty cool and easy to implement problems. I am especially impressed on how easy tree evaluation can be performed for the boolean and regression problems.
comment:23 Changed 23 months ago by mkommend
r13267: Minor code improvements in HL.Problems.GP (typos, code organization, code unification).
comment:24 Changed 23 months ago by mkommend
- Owner changed from mkommend to gkronber
- Status changed from reviewing to assigned
comment:25 Changed 23 months ago by mkommend
- Owner changed from gkronber to mkommend
- Status changed from assigned to reviewing
r13269: Moved cloning and persistence code near the default ctor for all new GP problems.
comment:26 Changed 23 months ago by mkommend
- Owner changed from mkommend to gkronber
- Status changed from reviewing to readytorelease
comment:27 Changed 23 months ago by gkronber
Thanks for code reorganization. I'm going to create tickets for your remaining remarks from the review.
comment:28 in reply to: ↑ 22 Changed 23 months ago by gkronber
Replying to mkommend:
Reviewed the SymbolicExpressionTreeProblem and HL.Problems.GP and the according views and unit test for sample creation.
Comments:
- Odd source code organization (cloning and persistence in a region at the EOF)
Fixed with r13269.
- BasicSymbolicRegression
- Recreates constants every time the problem is changed => not reproducible
- Couldn't the solution be transformed to a standard data analysis tree (simplify, optimize?
Might be fixed in the future (-> separate tickets #2515, #2517)
- Why are the boolean problems restricted (number of bits) and why is this done in the evaluation function?
In the case of the even-parity problem the restriction stems from the fact that only digits are used as terminal symbols and there are only 10 digits. Would be easy to extend this.
In the case of the mux-problem I don't remember the exact reason but I believe this is an artifact from an earlier implementation where only digits and characters were used as terminal symbols. In any case the limit of 37 bits input is rather large and would mean that a single evaluation would have to iterate over 2^{37} different input cases... I'm going to create a ticket for this (#2516).
Overall pretty cool and easy to implement problems. I am especially impressed on how easy tree evaluation can be performed for the boolean and regression problems.
comment:29 Changed 23 months ago by gkronber
r13278: merged r12895:12906 from trunk to stable
comment:30 Changed 23 months ago by gkronber
r13279: merged r12911:12912, r12915:12918 from trunk to stable
comment:31 Changed 23 months ago by gkronber
r13280: merged r12921,r12936:12938,r12940,r12947,r13055:13058,r13163,r13267,r13269 from trunk to stable
comment:32 Changed 23 months ago by gkronber
- Resolution set to done
- Status changed from readytorelease to closed
changesets originally commited to #2469: r12897: added SymbolicExpressionTreeProblem base class r12904: implemented override for Analyze(...) method in SymbolicExpressionTreeProblem
r12911: created project structure for HeuristicLab.Problems.GeneticProgramming and added implementations of ArtificialAnt and LawnMower