kaorahi / lizgoban

Leela Zero & KataGo visualizer
GNU General Public License v3.0
169 stars 28 forks source link

Open exercise in match mode automatically #109

Closed qcgm1978 closed 7 months ago

qcgm1978 commented 7 months ago

When you select "Open exercise" from the "Tool" menu after saving an exercise, it does not automatically enter match mode. You must first click on "Exercise" in the "Tool" menu to enter it. This seems to be not good, because the AI engine will automatically recommend the next step in non-match mode, which is contrary to the purpose of exercise. This can be achieved by calling the relevant methods, as shown in the code and video below:

function open_exercise_dir(win) {
    open_sgf_etc_in(exercise_dir(), file => {
        start_match(win, 'reset_param'); 
        load_as_exercise(file)
    })
}

https://github.com/kaorahi/lizgoban/assets/3024299/6885cb71-73e0-4af6-8e69-ab8748eee675

kaorahi commented 7 months ago

Thanks for checking various features. I'll make the change as you suggested.

This behavior was actually intentional. I use the "Open exercise" menu not to challenge exercises in match mode, but to find incorrectly registered exercises in normal mode. However, I've changed my mind now. Switching to match mode will be more natural for most users.