Scoresheet To PGN

Discuss anything you like about chess related matters in this forum.
Post Reply
User avatar
Joey Stewart
Posts: 1857
Joined: Wed Apr 11, 2007 2:35 pm
Location: All Of Them
Contact:

Scoresheet To PGN

Post by Joey Stewart » 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.
Lose one queen and it is a disaster, Lose 1000 queens and it is just a statistic.

User avatar
Matt Mackenzie
Posts: 5191
Joined: Tue Mar 31, 2009 11:51 pm
Location: Millom, Cumbria

Re: Scoresheet To PGN

Post by Matt Mackenzie » Sat Nov 27, 2021 4:35 pm

I still copy my games into score books - over 1100 in all now. Digitising them would be a challenge, especially given my handwriting :)
"Set up your attacks so that when the fire is out, it isn't out!" (H N Pillsbury)

David Clayton
Posts: 190
Joined: Mon Jul 16, 2007 7:37 pm

Re: Scoresheet To PGN

Post by David Clayton » Sat Nov 27, 2021 5:41 pm

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.

jholyhead
Posts: 39
Joined: Tue Aug 11, 2020 10:19 am

Re: Scoresheet To PGN

Post by jholyhead » Sat Nov 27, 2021 6:17 pm

I spent a fair chunk of time trying to build such a tool - it is not straightforward.

Reg Clucas
Posts: 598
Joined: Mon May 16, 2011 3:45 pm

Re: Scoresheet To PGN

Post by Reg Clucas » Sat Nov 27, 2021 8:20 pm

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.

LawrenceCooper
Posts: 7167
Joined: Tue Dec 20, 2011 8:13 am

Re: Scoresheet To PGN

Post by LawrenceCooper » Sat Nov 27, 2021 10:32 pm

No idea of the merits of this site but a friend sent me the link recently: https://www.reinechess.com/?fbclid=IwAR ... thQVB43vCE

jholyhead
Posts: 39
Joined: Tue Aug 11, 2020 10:19 am

Re: Scoresheet To PGN

Post by jholyhead » 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.

Ian Thompson
Posts: 3543
Joined: Wed Jul 02, 2008 4:31 pm
Location: Awbridge, Hampshire

Re: Scoresheet To PGN

Post by Ian Thompson » 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.

MartinCarpenter
Posts: 3041
Joined: Tue May 24, 2011 10:58 am

Re: Scoresheet To PGN

Post by MartinCarpenter » Mon Nov 29, 2021 9:34 am

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 :)

jholyhead
Posts: 39
Joined: Tue Aug 11, 2020 10:19 am

Re: Scoresheet To PGN

Post by jholyhead » 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.

User avatar
Joey Stewart
Posts: 1857
Joined: Wed Apr 11, 2007 2:35 pm
Location: All Of Them
Contact:

Re: Scoresheet To PGN

Post by Joey Stewart » Mon Nov 29, 2021 3:01 pm

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.
Lose one queen and it is a disaster, Lose 1000 queens and it is just a statistic.

MartinCarpenter
Posts: 3041
Joined: Tue May 24, 2011 10:58 am

Re: Scoresheet To PGN

Post by MartinCarpenter » Mon Nov 29, 2021 7:37 pm

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!

MartinCarpenter
Posts: 3041
Joined: Tue May 24, 2011 10:58 am

Re: Scoresheet To PGN

Post by MartinCarpenter » Mon Nov 29, 2021 8:11 pm

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.

User avatar
Arnav Sud
Posts: 60
Joined: Tue Apr 26, 2022 7:47 pm

Re: Scoresheet To PGN

Post by Arnav Sud » Thu Jan 18, 2024 10:01 pm

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/
Club Secretary - Bristol Four Knights
https://bristolfourknights.co.uk

Post Reply