Page 1 of 1

Scoresheet To PGN

Posted: Sat Nov 27, 2021 4:06 pm
by Joey Stewart
I am sure most of us have a draw somewhere stuffed with hundreds of old scoresheet that will "one day" get digitised but growing ever larger without the job being done.
It got me thinking though, there are now apps which can scan paper and turn them into digital text and I wondered if anyone has experimented with them and had any success in copying a chess scoresheet.

Re: Scoresheet To PGN

Posted: Sat Nov 27, 2021 4:35 pm
by Matt Mackenzie
I still copy my games into score books - over 1100 in all now. Digitising them would be a challenge, especially given my handwriting :)

Re: Scoresheet To PGN

Posted: Sat Nov 27, 2021 5:41 pm
by David Clayton
Joey Stewart wrote:
Sat Nov 27, 2021 4:06 pm
I am sure most of us have a draw somewhere stuffed with hundreds of old scoresheet that will "one day" get digitised but growing ever larger without the job being done.
It got me thinking though, there are now apps which can scan paper and turn them into digital text and I wondered if anyone has experimented with them and had any success in copying a chess scoresheet.
An app that could translate a scoresheet to a pgn file would be useful, especially if it can work out moves that players fail to record, so you end up with the black moves on the white side and the white on the black side. Also those moves where players fail to record which Knight or Rook that has moved when there is a choice of two, plus when they record a move on the d file when it is actually on the e file.

Of course that is when you can read a clear scoresheet, but trying to distinguish an 'e from a 'c' can be difficult, K and R is sometimes written very similar, b's and h's is another that are sometime difficult to distinguish. Of course players sometimes write h4 instead of a4, or the same with g and b files.

The list goes on, so an app that could work it all out would be really useful.

Re: Scoresheet To PGN

Posted: Sat Nov 27, 2021 6:17 pm
by jholyhead
I spent a fair chunk of time trying to build such a tool - it is not straightforward.

Re: Scoresheet To PGN

Posted: Sat Nov 27, 2021 8:20 pm
by Reg Clucas
I've spent time trying to use OCR in the past, and it sometimes has trouble with typewritten text, never mind the typical scrawl from a handwritten scoresheet. You will save yourself a lot of frustration, and have some fun along the way, by simply playing through the games one by one in your chosen chess engine. I did this a few years ago when I first got engine software, taking several months, just doing a few at a time. It was good to review these old games, and I discovered a few gems along the way in the form of brilliant engine demonstrations of missed wins, etc.

Re: Scoresheet To PGN

Posted: Sat Nov 27, 2021 10:32 pm
by LawrenceCooper
No idea of the merits of this site but a friend sent me the link recently: https://www.reinechess.com/?fbclid=IwAR ... thQVB43vCE

Re: Scoresheet To PGN

Posted: Sun Nov 28, 2021 10:24 am
by jholyhead
You need to transcribe your scoresheet onto one of their custom sheets for that software to work - that's probably more arduous than putting the game into Chessbase or equivalent.

Re: Scoresheet To PGN

Posted: Sun Nov 28, 2021 12:15 pm
by Ian Thompson
jholyhead wrote:
Sun Nov 28, 2021 10:24 am
You need to transcribe your scoresheet onto one of their custom sheets for that software to work - that's probably more arduous than putting the game into Chessbase or equivalent.
"Work" being used rather loosely used as the instructions say "Do not indicate checks, mates or promotions at all.", so presumably it can't cope with promotions other than to a Queen.

I don't think there's much chance of ever reliably scanning and converting handwritten scoresheets. You'd always need to go through the result and check it, so you've gained little compared to manually entering the game. The way to go would be electronic input while the game is being played. If that's not using an electronic board it could either be a Monroi type of device if they were available at a reasonable price or a digital notepad that OCRs moves as they're entered and allows immediate correction of mistakes.

Re: Scoresheet To PGN

Posted: Mon Nov 29, 2021 9:34 am
by MartinCarpenter
Ian Thompson wrote:
Sun Nov 28, 2021 12:15 pm
jholyhead wrote:
Sun Nov 28, 2021 10:24 am
You need to transcribe your scoresheet onto one of their custom sheets for that software to work - that's probably more arduous than putting the game into Chessbase or equivalent.
"Work" being used rather loosely used as the instructions say "Do not indicate checks, mates or promotions at all.", so presumably it can't cope with promotions other than to a Queen.

I don't think there's much chance of ever reliably scanning and converting handwritten scoresheets. You'd always need to go through the result and check it, so you've gained little compared to manually entering the game. The way to go would be electronic input while the game is being played. If that's not using an electronic board it could either be a Monroi type of device if they were available at a reasonable price or a digital notepad that OCRs moves as they're entered and allows immediate correction of mistakes.
That's a nice idea a proiri but has the basic issue in that either you let people bring their own devices (with the obvious cheating issues) or the organisers have to provide a large number of them. That would obviously need to be really quite cheap.

OCR has got quite a bit better recently with neural nets advancing so fast, and it would probably be a perfectly plausible project to take a score sheet photo on a phone then convert it to PGN. Some effort though, and I suspect you'd need to specifically train it to deal with the chess specific quirks. Likely simply not worth the bother.

I'd also worry about training one on a large sample of chess players handwriting producing a nervous breakdown :)

Re: Scoresheet To PGN

Posted: Mon Nov 29, 2021 1:36 pm
by jholyhead
Reading handwriting isn't really a problem anymore, the issue is how do you deal with ambiguous/incorrect/missing moves, different score sheet formats etc? That's the point at which I threw in the towel.

Re: Scoresheet To PGN

Posted: Mon Nov 29, 2021 3:01 pm
by Joey Stewart
I think you have got to just be ruthless with incorrect/indecipherable scoresheets and scrap ones that require any sort of guesswork - I certainly would be if I had to type up hundreds of them by hand.

Re: Scoresheet To PGN

Posted: Mon Nov 29, 2021 7:37 pm
by MartinCarpenter
jholyhead wrote:
Mon Nov 29, 2021 1:36 pm
Reading handwriting isn't really a problem anymore, the issue is how do you deal with ambiguous/incorrect/missing moves, different score sheet formats etc? That's the point at which I threw in the towel.
That might depend on the handwriting :) I'd think you'd ideally want a domain specific recognition network, which knows that everything resolves into one a of a few chess notation things rather than freeform language. That would definitely help with limiting ambiguities.

A lot of (not all!) the remaining ambiguities might well repeat themselves over time/people, so you'll have chances. You've also got the rest of the score sheet to use to resolve them - you can use the game to date & game after the gap which should combine to pin even an entirely missing move down a very long way. 2/3 options in the worst case, perhaps?

But it would take a lot of effort to create, which I can't imagine you easily getting back given a realistic workload!

Re: Scoresheet To PGN

Posted: Mon Nov 29, 2021 8:11 pm
by MartinCarpenter
Off topic slightly but it would be mildly intriguing to see how many moves you could randomly remove from a typical complete game before it became impossible to unambiguously reconstruct. Feels like it might be quite a high percentage?

You could probably tighten it a bit further by running a simple engine check and taking the choice which didn't involve pieces left end prise for moves on end etc.

Re: Scoresheet To PGN

Posted: Thu Jan 18, 2024 10:01 pm
by Arnav Sud
Joey Stewart wrote:
Sat Nov 27, 2021 4:06 pm
I am sure most of us have a draw somewhere stuffed with hundreds of old scoresheet that will "one day" get digitised but growing ever larger without the job being done.
It got me thinking though, there are now apps which can scan paper and turn them into digital text and I wondered if anyone has experimented with them and had any success in copying a chess scoresheet.
There is research done on the same problem and they provide datasets for free - you can write code to have a simple python program train on this dataset! https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8879196/