We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
HerbSearch.jl/src/sampling_grammar.jl
Line 75 in 004f8c6
The sampling function is buggy and doesn't really do what we want to do here. (See discussion in #36 (comment))
The text was updated successfully, but these errors were encountered:
I ran a few examples and the sampling seems to quite skewed. It either generates very large or very small trees. Intermediate sizes barely happen.
julia> arithmetic_grammar = @cfgrammar begin X = X * X X = X + X X = X - X X = |(1:4) end ... julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 4, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 6, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 5, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 2{1{3{3{2{1{5,2{4,3{4,6}}}6}1{6,7}}2{1{1{4,3{6,7}}3{7,3{6,3{5,6}}}}3{3{7,2{6,1{5,6}}}1{4,2{5,2{1{6,6}4}}}}}}4}4} julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 4, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 6, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 6, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 2{3{5,1{7,4}}1{4,3{1{4,1{4,4}}7}}} julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 5, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 1{7,5} julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 6, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 5, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 3{6,6} julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 3{2{7,3{5,6}}3{3{6,3{1{1{2{2{2{1{1{4,1{6,1{4,4}}}6}7}5}1{2{3{6,6}3{4,4}}4}}7}6}5}}2{2{1{1{3{7,1{1{2{7,1{6,2{4,3{7,2{6,5}}}}}4}4}}2{2{3{6,5}2{2{3{1{5,3{4,2{6,4}}}6}2{4,1{1{2{5,5}7}6}}}1{4,1{4,4}}}}6}}5}6}6}}} julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 6, julia> expression_generated = rand(RuleNode, arithmetic_grammar, :X, 15) 3{1{2{7,4}7}6}
Sorry, something went wrong.
nicolaefilat
piotr-cichon
No branches or pull requests
HerbSearch.jl/src/sampling_grammar.jl
Line 75 in 004f8c6
The sampling function is buggy and doesn't really do what we want to do here. (See discussion in #36 (comment))
The text was updated successfully, but these errors were encountered: