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

Fix while loop to create a random program in stochastic algorithms #89

Open
nicolaefilat opened this issue May 3, 2024 · 0 comments
Open

Comments

@nicolaefilat
Copy link
Contributor

The issues lies here:

dmap = mindepth_map(grammar)
sampled_program = rand(RuleNode, grammar, iter.sym, max_depth) #TODO: replace iter.sym with a domain of valid rules
substitute!(solver, Vector{Int}(), sampled_program)
while !isfeasible(solver)
#TODO: prevent infinite loops here. Check max_time and/or max_enumerations.
sampled_program = rand(RuleNode, grammar, iter.sym, max_depth) #TODO: replace iter.sym with a domain of valid rules
substitute!(solver, Vector{Int}(), sampled_program)
end
return (sampled_program, IteratorState(sampled_program, iter.initial_temperature,dmap))

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