Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

tosh1ki/pyogi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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