pasky/michi

No error on invalid `boardsize` GTP request

Closed this issue · 3 comments

This brings db3108/michi-c#9 here where it belongs.

I hope to have time to address this over the next weekend.

Note that michi already writes a warning that boardsize set the size to an incompatible size. Just turning this warning as a fatal error and quitting michi could maybe solve the issue.

michi.py main objective is to provide an example of a very simple and concise code that help new people in the field to understand how to program a simple, but powerful, MCTS program. Making it more complicated in order to cope with every possible user error would fight against this main objective, I think.

Noted.

This is in the IO code. I think handling errors properly will not add significantly to the code.

I'll develop both options and see what they look like. Sending an error is more proper as the process at the other end of the GTP connection will not know what happened. However, just exiting in the existing handler block would have much cleaner code.

This change addresses the original report.

This only adds a single line to the code. Detecting errors in the response to komi or play commands looked to be very non-trivial, so I didn't attempt to include that effort in this fix. Errors there are unlikely from well-behaved GTP controllers. The original error is triggered by a reasonable request from the GTP controller. This fix handles this situation gracefully.