Skip to content
Shogi analysis in Python
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci
data
doc
pyogi
.gitignore
.travis.yml
LICENSE
README.md
requirements.txt
setup.py

README.md

pyogi -- Shogi analysis in Python

Build Status Code Health Code Climate

Pyogi (Python syogi) is a Python library for shogi analysis, display kifu, analyse kifu, crawl kifu.

Image generated by pyogi

Feature

  • Classes for representing kifu (pyogi.koma, pyogi.grid, pyogi.board, pyogi.kifu)
    • Pyogi also supports komaochi (駒落ち)
  • Translate a kifu of KI2 format to that of CSA format (pyogi.ki2converter)
  • Crawl kifu data from Shogiwars (pyogi.warscrawler) and 2ch (pyogi.threadcrawler)
  • Plot a state of board like above picture (pyogi.plot)

Installation

python setup.py build & python setup.py install

How to Compile

Execute following command to compile all Cython scripts.

python setup.py build_ext --inplace

Documentation

Kifu included in this repository

Kifu data of KI2 format in kifu/ were copies of kifu data in 2chkifu.zip.

Typo in 2chkifu.zip

Prefer to correct these typos manually.

File path Before After
20000/26161.KI2 まで121手で上手の勝ちx\n まで121手で上手の勝ち\n
30000/39660.KI2 まで116手で下手の勝ち\n銀 まで116手で下手の勝ち\n

Other issue in 2chkifu.zip

  • Special komaochi
    • 左銀落ち: 30000/35402.KI2
    • 右銀落ち: 30000/35641.KI2
  • Special cases
    • 不戦敗: 40000/42991.KI2
    • 反則負け: 40000/43003.KI2
  • KIF format
    • 40000/44479.KIF
    • 40000/50319.kif

Materials

Reference

Kifu data

How to describe kifu

Analysis using pyogi

You can’t perform that action at this time.