lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Apr 23, 2017 at 9:06 AM, Martin <eden_martin_fuhrspam@gmx.de> wrote:
> Concerning pseudocode, how it will handle "(()()" string? Looks like
> it will return "()()" instead of first "()".

Yes. If that's wrong, that's my misunderstanding of the intended
behavior rather than a fundamental issue with the strategy.

> I think this may be fixed by expanding left each turn when <depth> was
> zero at start of turn. Also we should save <lastGoodRight> and
> <lastGoodLeft> each time when <depth> was zero at start of turn.

Yep, that's the way I'd do it too.

/s/ Adam