File:TUROCHAMP vs Glennie, 1952.gif

原始文件(800 × 800像素,文件大小:2.89 MB,MIME类型:image/gif、​循环、​61帧、​1分32秒)


摘要

描述
English: Chess game between TUROCHAMP (with its moves calculated by Alan Turing) and Alick Glennie in 1952. After 29 moves, TUROCHAMP is in a lost position and resigns.
日期
来源 自己的作品
作者 Morn
GIF开发
InfoField
 
本GIF 位图使用Python创作。
源代码
InfoField

Python code

Source code
#!/usr/bin/env python3

# Plot the TUROCHAMP-Glennie game using python-chess and ImageMagick

import os
import chess.pgn
import chess.svg

pgn = open('glennie.pgn')
game = chess.pgn.read_game(pgn)
board = game.board()

def svg(i):
    lm = board.peek()
    a = [(lm.from_square, lm.to_square)]
    s = chess.svg.board(board, arrows = a, size = 800)

    f1 = "g_%04u.svg" % i
    f2 = "g_%04u.png" % i

    with open(f1, 'w') as f:
        f.write(s)
    os.system("convert %s %s" % (f1, f2))

i = 1

for m in game.mainline_moves():
    board.push(m)
    svg(i)
    i += 1

# pause animation at the end:
for j in range(3):
    svg(i)
    i += 1

# Now you can create the GIF animation with:
# convert -delay 150 g_*.png -loop 0 g.gif

PGN

Here is the "glennie.pgn" input file required by the Python code above:

[Event "Friendly game"]
[Site "Manchester, England"]
[Date "1952.??.??"]
[Round "?"]
[White "TUROCHAMP"]
[Black "Alick Glennie"]
[Result "0-1"]
[ECO "C26"]
[PlyCount "58"]

1.e4 e5 2.Nc3 Nf6 3.d4 Bb4 4.Nf3 d6 5.Bd2 Nc6 6.d5 Nd4 7.h4 Bg4 8.a4 Nxf3+ 9.gxf3 Bh5 10.Bb5+ c6 11.dxc6 O-O 12.cxb7 Rb8 13.Ba6 Qa5 14.Qe2 Nd7 15.Rg1 Nc5 16.Rg5 Bg6 17.Bb5 Nxb7 18.O-O-O Nc5 19.Bc6 Rfc8 20.Bd5 Bxc3 21.Bxc3 Qxa4 22.Kd2 Ne6 23.Rg4 Nd4 24.Qd3 Nb5 25.Bb3 Qa6 26.Bc4 Bh5 27.Rg3 Qa4 28.Bxb5 Qxb5 29.Qxd6 Rd8 0-1

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
Creative Commons CC-Zero 本作品采用知识共享CC0 1.0 通用公有领域贡献许可协议授权。
采用本宣告发表本作品的人,已在法律允许的范围内,通过在全世界放弃其对本作品拥有的著作权法规定的所有权利(包括所有相关权利),将本作品贡献至公有领域。您可以复制、修改、传播和表演本作品,将其用于商业目的,无需要求授权。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2020年12月14日 (一) 12:212020年12月14日 (一) 12:21版本的缩略图800 × 800(2.89 MB)MornUploaded own work with UploadWizard

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: