Jump to content

File:Kasparov vs ChessGenius, 1994.gif

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (800 × 800 pixels, file size: 4.92 MB, MIME type: image/gif, looped, 123 frames, 3 min 5 s)

Summary

Description
English: Kasparov vs ChessGenius game, 1994
Date
Source Own work
Author Morn
GIF development
InfoField
 
This GIF graphic was created with Python.
Source code
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('kasparov_chess_genius_1994.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 "London PCA/Intel-GP"]
[Site "London ENG"]
[Date "1994.08.31"]
[EventDate "?"]
[Round "1"]
[Result "0-1"]
[White "Garry Kasparov"]
[Black "ChessGenius"]
[ECO "D11"]
[PlyCount "120"]

1.c4 c6 2.d4 d5 3.Nf3 Nf6 4.Qc2 dxc4 5.Qxc4 Bf5 6.Nc3 Nbd7
7.g3 e6 8.Bg2 Be7 9.O-O O-O 10.e3 Ne4 11.Qe2 Qb6 12.Rd1 Rad8
13.Ne1 Ndf6 14.Nxe4 Nxe4 15.f3 Nd6 16.a4 Qb3 17.e4 Bg6 18.Rd3
Qb4 19.b3 Nc8 20.Nc2 Qb6 21.Bf4 c5 22.Be3 cxd4 23.Nxd4 Bc5
24.Rad1 e5 25.Nc2 Rxd3 26.Qxd3 Ne7 27.b4 Bxe3+ 28.Qxe3 Rd8
29.Rxd8+ Qxd8 30.Bf1 b6 31.Qc3 f6 32.Bc4+ Bf7 33.Ne3 Qd4
34.Bxf7+ Kxf7 35.Qb3+ Kf8 36.Kg2 Qd2+ 37.Kh3 Qe2 38.Ng2 h5
39.Qe3 Qc4 40.Qd2 Qe6+ 41.g4 hxg4 42.fxg4 Qc4 43.Qe1 Qb3+
44.Ne3 Qd3 45.Kg3 Qxe4 46.Qd2 Qf4+ 47.Kg2 Qd4 48.Qxd4 exd4
49.Nc4 Nc6 50.b5 Ne5 51.Nd6 d3 52.Kf2 Nxg4+ 53.Ke1 Nxh2 54.Kd2
Nf3+ 55.Kxd3 Ke7 56.Nf5+ Kf7 57.Ke4 Nd2+ 58.Kd5 g5 59.Nd6+ Kg6
60.Kd4 Nb3+ 0-1

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

10 November 2021

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:45, 10 November 2021Thumbnail for version as of 15:45, 10 November 2021800 × 800 (4.92 MB)MornUploaded own work with UploadWizard

The following page uses this file: