domingo, 18 de fevereiro de 2007

42 - Como criar um arquivo em formato SGF

Em muitos sites são publicadas partidas de Go. Algumas partidas podem ser baixadas já em formato SGF (Smart Game Format). Porém, muitas são apresentadas em formato texto (ou seja, é publicado apenas a codificação SGF) e precisam ser convertidas para SGF. O procedimento para gravar um texto em formato SGF é muito simples. Abaixo, instruções sobre como gravar uma partida em formato SGF utilizando o processador de texto Word, da Microsoft.

Texto de exemplo:

PW[Huang Longshi]
PB[Zhou Donghou]
DT[Late 17th century]
RU[Old Chinese]
SO[Huang's Collected Games, #1]
C[Zhou Donghou once said that when players are evenly matched and the
other side has first move, it is impossible to achieve victory by using orthodox
moves. It is necessary to use unorthodox moves to seek complications. On the
whole this is not a sound theory. The double attack on the corner with C6 instead
of defending at N3 is an example of this.]
C[Not especially severe, but versatile. Once he sees how Black responds, he can
prepare ways to press on either side. Good.]
C[Ineffectual. He should block off the corner at D17.]
C[Impetuous, just like C6.]
C[This and White's next two moves show great insight.]
C[Black feels unable to pull back to B5. This is the problem with the
double-wing attack on the corner. He should still play N3.]
C[Now Black will find it troublesome to look after both his outside groups.]
C[Once he played B6, Black left himself no option but to capture these two stones.]
;W[ek]C[Now this is White's privilege, and it is all because of the foresight of E2
and the impetuosity of C3.]
C[Steadier and more careful would be the solid connection at F9.]
C[Should be at A6 to seek life.]
C[White has foreseen all of this and the next twenty moves. Black's replies may be
considered forced.]
C[Should be at R5 first. Then there are even more variations.]
C[Both players play the ensuing moves correctly.]
C[White is like the proverbial butcher who skilfully wields his knife with room to spare.]
C[Insufferable. He should block at S3.]
C[Start of a brilliant 20-move sequence. He bides his time and shows no anxiety about
taking the corner.]
C[Seals White in before playing the ko. But White's group has already established a base
and Black must get three moves before he can settle the ko. Yet Black has no option but
to play the ko in earnest.]
C[With J17, Q14 and this, White has gained double what he lost in the ko. He has extracted
the utmost from all the complications. But J17 should really have been the peep at F16.
Having reassured himself that he can give up the lower right corner, he could have freely
forced White by making more ko threats and so acted even more decisively. Moreover, he
ought not to have left his weak group in the botton centre in doubt. He cannot be totally
C[Steady and careful.]
C[Best under the circumstances, his attack having lost time.]
C[Resolutely denies Black the connection along the edge.]
C[This and his next are overplays. He should seal off his territory with L16.]
C[Once he cuts here, White must play N14 and later go back to L16. There will be a ko
for the group on the outside, and so he cannot yet settle the game. It ought not to
have come to this.]
C[A mistake. It is too weak, and should be K11. He should start the ko in order to
seek a trade, and of course to turn a lost game into victory. He should certainly do this,
because both the top right and top left corners still have potential.]
C[With J11 and this, Black's corner group is already doomed.]
C[Sets up a ko, but Black cannot win it because of White's large group below.]
C[No option, even though it means losing the corner - this is all because of the hasty M10.]
C[White won. With such imprecise calculations it may seem this game is not worthy of
selection as a masterpiece, but it keeps its place because White's moves were deeply
significant and brilliant, and the way he played when he leisurely ignored the ko in the
bottom right was wonderful.])

Procedimento para gravar um texto em formato SGF

  1. Abra o processador de texto e crie um “Novo documento em branco”.
  2. Acesse a página Web da partida.
  3. Selecione o texto de exemplo - de (;SZ até wonderful.]) - e execute o comando de cópia Ctrl + C (ou clique em Editar e selecione copiar).
  4. Em “Novo documento em branco”; clique em Editar e selecione: Colar especial... /Texto não formatado. E execute a cópia não formatada.
  5. Clique em Arquivo, Salvar como e defina os parâmetros:
    a) indique onde o arquivo será salvo;
    b) nome do arquivo - que deve ser colocado entre aspas seguido de .SGF, exemplo: “partidateste.sgf”;
    c) salvar como tipo – escolha somente texto: Texto sem formatação (*.txt);
    d) confirme a conversão Windows (padrão).
  6. Salve o arquivo.
  7. Ao executar o comando de salvar, o processador cria o arquivo partidateste.sgf, no microcomputador.

Pronto! Utilize um leitor de SGF e reproduza a partida. Não possui nenhum programa que permita a leitura de arquivo SGF? Então baixe e instale o MultiGo. No site GOBR você poderá obter mais informações sobre a instalação do MultiGo.