跳至內容

File:Deep Blue versus Kasparov, 1996, Game 1.gif

頁面內容不支援其他語言。
這個檔案來自維基共享資源
維基百科,自由的百科全書

原始檔案(800 × 800 像素,檔案大小:3.4 MB,MIME 類型:image/gif、​循環、​76 畫格、​1分54秒)


摘要

描述
English: Animation of Deep Blue versus Kasparov
日期
來源 自己的作品
作者 Morn
GIF開發
InfoField
 
本GIF graphic使用Python創作。
原始碼
InfoField

Python code

Source code
#!/usr/bin/env python3

# Plot a PGN game using python-chess and ImageMagick

import os
import chess.pgn
import chess.svg

pgn = open('deep_blue_kasparov_1996_1.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))
    os.system("rm %s" % f1)

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

# create animation with
# convert -delay 150 g_*.png -loop 0 g.gif

PGN

[Event "Match"]
[Site "Philadelphia, PA USA"]
[Date "1996.02.10"]
[Round "1"]
[Result "1-0"]
[White "Deep Blue (Computer)"]
[Black "Garry Kasparov"]
[ECO "B22"]
[PlyCount "73"]

1.e4 c5 2.c3 d5 3.exd5 Qxd5 4.d4 Nf6 5.Nf3 Bg4 6.Be2 e6 7.h3
Bh5 8.O-O Nc6 9.Be3 cxd4 10.cxd4 Bb4 11.a3 Ba5 12.Nc3 Qd6
13.Nb5 Qe7 14.Ne5 Bxe2 15.Qxe2 O-O 16.Rac1 Rac8 17.Bg5 Bb6
18.Bxf6 gxf6 19.Nc4 Rfd8 20.Nxb6 axb6 21.Rfd1 f5 22.Qe3 Qf6
23.d5 Rxd5 24.Rxd5 exd5 25.b3 Kh8 26.Qxb6 Rg8 27.Qc5 d4 28.Nd6
f4 29.Nxb7 Ne5 30.Qd5 f3 31.g3 Nd3 32.Rc7 Re8 33.Nd6 Re1+
34.Kh2 Nxf2 35.Nxf7+ Kg7 36.Ng5+ Kh6 37.Rxh7+ 1-0

授權條款

我,本作品的著作權持有者,決定用以下授權條款發佈本作品:
Creative Commons CC-Zero 此檔案在創用CC CC0 1.0 通用公有領域貢獻宣告之下分發。
在此宣告之下分發本作品者,已依據各國著作權法,在全世界放棄其對本作品所擁有的著作權及所有相關相似的法律權利,從而將本作品貢獻至公有領域。您可以複製、修改、分發和演示該作品,用於任何商業用途,所有這些都不需要請求授權。

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

西洋棋對局 中文 (已轉換拼寫)

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸使用者備⁠註
目前2020年12月20日 (日) 20:44於 2020年12月20日 (日) 20:44 版本的縮圖800 × 800(3.4 MB)MornUploaded own work with UploadWizard

下列頁面有用到此檔案:

全域檔案使用狀況