Create PDF Kifus With SGF2PDF

Czech developer Daniel Maslo has created a handy web application that converts SGFs into PDF kifus. Called SGF2PDF, Maslo’s program generates one-page game records that are easy to share and print, making it ideal for offline game reviews. I have tested SGF2PDF and it functions as advertised.

SGF2PDF works in a simple two-step process: users select the target SGF file, then click “create PDF kifu.” The converter then automatically downloads the PDF to the user’s computer. Behind the scenes, things get a little more complex. SGF2PDF is written in PHP and its logic runs on the server side. When a game file is uploaded, the application parses the SGF tree and separates information about moves. The resulting data is drawn by SVG into PDF.

According to Maslo, “Almost no baduk software produces valid [i.e. standardized] SGF.” This has necessitated the development of “some tricks” to handle different SGF types.

The PDF kifu looks like a traditional game record. Moves appear on a grid diagram marked by numbers up to three digits in length. The players’ information, game location, and result appear in a table at the bottom of the page. I noted only that the web address of my game ran across cells within the information table.

sgf2pdf

SGF2PDF does have a few limitations and bugs, and Maslo is open about these shortcomings. SGF2PDF will convert only single branch SGFs played on a 19×19 goban, and it can output only a single sheet PDF. Data within complicated games – that is, for example, those with extensive ko fights and drawbacks – will overflow onto the information table at the bottom of the page. Most users will find, however, that SGF2PDF does exactly what is asked of it: no-frills conversion of single tree SGFs into PDF files.

Maslo solicits both feature requests and suggestions on how to improve SGF2PDF from users. He wrote that the most sought after change is the ability to split kifus across multiple pages. My own request is for the addition of a grid coordinates toggle. Unfortunately, Maslo notes, there hasn’t been much feedback from the baduk community, although some servers are now posting links to the application. “SGF2PDF is here for all of you,” he writes, “Reporting errors and posting feedback will…push me to improve it.”

Disappointment with existing SGF converters sparked the development of SGF2PDF. Available software produced output that Maslo complains was “weird” and “ugly,” so he started to think about building his own program. Writing SGF2PDF, he noted, is a “pretty good way how to train your PHP skills.” Maslo has been playing baduk for nearly four years “for fun” and “brain training.”

Daniel Maslo has distinguished himself by bringing SGF2PDF to the baduk community. I am pleased to recommend this application, because it performs its singular task quite well. I hope players everywhere find SGF2PDF to their satisfaction.

Embrace the Suck

Leo Babauta caught my attention with a recent post about “embracing the suck.” In it Babauta talks about how a person can get over sucking at something they’re trying to learn and get good at it. His something was running, mine is baduk.

Baduk sucks when you first start. The goban feels so empty, and the moves make little sense. Placing stones on the board feels (for me at least) like stepping onto an ice rink: I move with an obvious discomfort, all wobbly and unstable. I often fall on my ass. Kids half my age or younger run circles around me!

All of this produces frustration, but I do not think of this as a bad thing because it is borne of a desire to improve. In considering that thought further, isn’t that precisely what frustration is? A desire to become better at something (or see somebody choose something better for themselves). Frustration in this instance is humbling because it makes me admit that I’m not very good at this yet.

So how do I get better? I embrace the suck.

One dimension of embracing “the suck,” according to Babauta, is turning towards the feeling and becoming curious about it. I notice, for example, that I am often tempted to read the solutions of tsumego before reading out the problems. Why? Because seeing the answer is simpler than discovering it. In a game I know it is impossible to look up the answer, yet I still cheat while practicing. As I think further I recognize that my struggle is really a reluctance to put in the requisite mental effort.

Unlike running which requires physical exertion, baduk is a mind game. One must think in order to win. It was clear from my actions while practicing that I was trying to avoid putting in the energy necessary to read out problems. Unsurprisingly I found it difficult to accurately assess positions on a 19×19 goban!

In a recent lesson with Zhou Yuan, my shifu, we noted this exact characteristic in my games. Positions would develop and I would fail to exploit weakness or secure my own stones. Shifu would ask why I made a particular move and I would respond “I don’t know.” (For the record, this is the wrong answer.) Yet he did not rebuke me, that was unnecessary—I was shamed by my defeat and because I played without thinking.

Since that experience I have devoted more attention to developing my reading ability, which is the fundamental skill required for baduk. No longer do I cheat with life-and-death problems. Instead I read out the solutions as best I can mentally and then check with the key. If I still get the problem wrong I jot the problem down and return to it the next day. I hope through this system to discipline my mind into putting the effort needed to win games.

Babauta describes sucking as a consequence of stepping outside of our comfort zones. The point is to survive and learn from this experience, and in this respect I have made some progress. If I stay with it I know that I can get over sucking at baduk and enjoy being good at it. The road to shodan is 1000 games.