Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree initialisation operators sometimes don't achieve stated depth #142

Open
jmmcd opened this issue Nov 9, 2021 · 0 comments
Open

Tree initialisation operators sometimes don't achieve stated depth #142

jmmcd opened this issue Nov 9, 2021 · 0 comments

Comments

@jmmcd
Copy link
Collaborator

jmmcd commented Nov 9, 2021

While investigating #140, I have seen both rhh and PI_grow returning individuals with depth less than min depth. For example I'm using:

<solution> ::= <rule>
<rule> ::= <rule> and <bool-expr>|<bool-expr>
<bool-expr> ::= p<idx> > p<idx>|p<idx> < p<idx>
<idx> ::= 0|1|2|3|4|5|6|7|8|9|10|11|12

and python ponyge.py --population_size 100 --grammar ../grammars/test.bnf --min_init_tree_depth 8 --max_init_tree_depth 10.

When generating with depth 9 I get some individuals of depth 7, when generating depth 10 I get some individuals of depth 8.

I guess in other cases there could be grammar constraints that eg allow depth 8 but prevent depth 7, or vice versa, but I think with this grammar there aren't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant