SGF Komi, the `KM` property and Chinese Rules
Posted: Tue Oct 01, 2019 10:51 am
I've been doing some hacking on some SGF files. I found a bug in my code: I have always assumed that Komi is always a whole multiple of 0.5 which causes it to panic when given a file from SmartGo's collection (from the iOS) version that contains:
as the Komi value. The file also contains
so this, presumably, is actually supposed to be 7.5 Komi.
Is it usual or the norm to encode Komi values in this way for Chinese rule SGF files? I.e. to record half the real Komi value in the `KM` property?
Would it make sense to detect that the Komi is a multiple of 0.25 and not a multiple of 0.5 and to correct the value by doubling it (for Chinese rules only) or would it make more sense to just ignore the value, use it in its incorrect form, and relax my sanity checks which reject values that are not whole multiples of 0.5?
The SGF FF[4] "Spec." (https://www.red-bean.com/sgf/go.html#KM) is not helpful as far as resolving this conundrum is concerned so I'm interested to know how everyone else deals with these oddities.
Code: Select all
KM[3.75]Code: Select all
RU[Chinese]Is it usual or the norm to encode Komi values in this way for Chinese rule SGF files? I.e. to record half the real Komi value in the `KM` property?
Would it make sense to detect that the Komi is a multiple of 0.25 and not a multiple of 0.5 and to correct the value by doubling it (for Chinese rules only) or would it make more sense to just ignore the value, use it in its incorrect form, and relax my sanity checks which reject values that are not whole multiples of 0.5?
The SGF FF[4] "Spec." (https://www.red-bean.com/sgf/go.html#KM) is not helpful as far as resolving this conundrum is concerned so I'm interested to know how everyone else deals with these oddities.