heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
38 stars 16 forks source link

SymbolicExpressionGrammars calculate the min length and depth of expression wrong #2685

Closed HeuristicLab-Trac-Bot closed 7 years ago

HeuristicLab-Trac-Bot commented 8 years ago

Issue migrated from trac ticket # 2685

milestone: HeuristicLab 3.3.15 | component: Encodings.SymbolicExpressionTreeEncoding | priority: medium | resolution: done

2016-10-18 22:58:59: @mkommend created the issue


The calculation for the minimum and maximum expression length and depth based on the restrictions of the grammar (allowed child symbols) returns wrong results if the symbols are nested recursively.

The attached script reproduces the problem. Thanks to sforsten for reporting this problem.

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-18 23:09:54: @mkommend changed status from new to accepted

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-19 11:44:55: @mkommend uploaded file Grammar.png (9.0 KiB)

Visualization of the grammar

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-19 11:45:11: @mkommend uploaded file Script Grammar Expression Length Test.hl (1.4 KiB)

Script to reproduce the problem

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-19 11:46:16: @mkommend edited the issue description

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-19 11:47:50: @mkommend commented


r14340: Added ctor to simple symbol.

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-19 12:11:34: @mkommend commented


r14341: Added unit test for min expression length and depth of configured grammars.

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-19 15:11:49: @mkommend commented


r14342: Refactored calculation of minimum expression length and depth into an separate class. Removed separate initialization code for the grammar caches in the ctor.

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-21 21:14:33: @foolnotion changed status from accepted to assigned

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-21 21:14:33: @foolnotion changed owner from @mkommend to @foolnotion

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-21 21:14:44: @foolnotion changed status from assigned to accepted

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 18:49:35: @foolnotion changed status from accepted to reviewing

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 18:49:35: @foolnotion changed owner from @foolnotion to @mkommend

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 18:49:35: @foolnotion commented


r14352: Refactored length and depth calculation and updated unit tests.

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 18:53:04: @foolnotion changed status from reviewing to assigned

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 18:53:04: @foolnotion changed owner from @mkommend to @foolnotion

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 19:51:45: @foolnotion changed status from assigned to reviewing

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 19:51:45: @foolnotion changed owner from @foolnotion to @mkommend

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 19:51:45: @foolnotion commented


r14353: Accidental commit.

r14354: Revert accidental commit.

r14355: Add correction step to account for grammar cycles. Update unit test.

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-23 19:51:45: @foolnotion

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-24 10:18:01: @foolnotion commented


r14356: Fix exception with symbols with no children (sequence contains no elements), factor out common code in separate methods.

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-24 10:18:01: @foolnotion

HeuristicLab-Trac-Bot commented 8 years ago

2016-10-24 14:20:37: @foolnotion commented


r14357: Minor refactor.

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-14 13:08:51: @mkommend changed status from reviewing to readytorelease

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-14 13:08:51: @mkommend commented


Reviewed r14340, r14341, r14342, r14352, r14353, r14354, r14355, r14356, r14357.

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-10 15:44:22: @mkommend commented


r14958: Merged r14340, r14341, r14342, r14352, r14353, r14354, r14355, r14356, r14357 into stable.

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-10 15:44:52: @mkommend changed status from readytorelease to closed

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-10 15:44:52: @mkommend set resolution to done