The main loop looks simple:
def generate_complete(text, montecarlo):
text = llm.generate(text, 1)[0]
score = score_func(text)
if score is not None:
if score < 0:
return None
else:
if can_be_solution(text, min_lines, check_fun):
montecarlo.solution = text
return text
else:
return generate_complete(text, montecarlo)
...but, the heart of it (1) just basically checks if the dafny syntax is valid by posting to https://dafny.livecode.ch/checkHow is 'syntax is valid' a valid scoring mechanism here?
If you look at the output examples (2), all I can see if generating functions and lemmas; this is equivalent to generating a function a bunch of tests for it.
I'm not sure I see what value the MCTS is bringing here.
Anyone get this and care to explain?
[1] - https://github.com/namin/llm-verified-with-monte-carlo-tree-...
[2] - https://github.com/namin/llm-verified-with-monte-carlo-tree-...