Skip to main content

gshogi - John Cheetham - http://www.johncheetham.com/projects/gshogi

Description

gshogi is a program to play Shogi (Japanese Chess). It has a builtin engine and can also use USI engines. It is written in python3 and C and runs on GTK3 (PyGI) desktops.

It’s licensed under the GPL v3+ (see the file named LICENSE).

It uses python for the gui and C for the engine code.

See the project homepage for more information on gshogi and USI engines.

Linux Installation

Prerequisites

You need to install these prerequisites first:

  • python

  • python-cairo

  • python-gobject

You need the python3 versions. These will have different names depending on your Linux.

On Debian/Mint/Ubuntu
  • python3-gi-cairo

  • gir1.2-rsvg-2.0

On Fedora
  • python3-cairo

  • python3-gobject

On Arch
  • python-cairo

  • python-gobject

Install gshogi

Installing from source

Use this method if you are using the latest development version from github.

Install gcc, python3-devel in addition to the above prerequisites.

Then enter ‘python3 setup.py build’ to build it.
Then ‘python3 run.py’ to run it from within the source folder.

You can also install it on the system.

To do this enter ‘python setup.py install’ (as root user).

Note if installing on the system:

gshogi should now be installed on your system. You can launch it from the gnome menu (under games) or type ‘gshogi’ in any terminal window.

There is no uninstall (setuptools doesn’t have one). If you need to uninstall you have to make a note of the file names and then delete them manually.

If running the build/install multiple times it’s best to delete the build folder each time.

Installing from the Python Package Index with pip

If you want to install the last release you can install wheels from PyPI using pip.

pip3 install gshogi

Or install it into a virtual env:

python3 -m venv –system-site-packages testvenv
source testvenv/bin/activate
pip install gshogi

Note you still need to install the python-gobject and python-cairo prerequisites listed above.

Windows Installation

The best method for windows is to use the all in one installer from the project website.

You can also use pip to install it but you will need to install pygobject for windows first.

You can also build it yourself (see the file Readme-windows.txt).

Usage

You play black (the pieces at the bottom of the board). The computer plays white (the pieces at the top of the board). Press the green go button to start the clock. To move a piece click on it and then click on the square you want to move it to (or drag it and drop it).

Also you can play one engine against another which is good for comparing USI engines.

Adding a USI engine

To add a USI engine to play against click on Options, engines then click the ‘Add’ button to add a new engine. Navigate to the engine executable and add it. Then click the OK button.

If the USI engine has parameters (eg. ‘java -jar enginename’ or ‘enginename -usi’) then you can set up a shell script (or bat file in windows) to start the engine and then add the shell script in gshogi.

command line options

You can specify some options on the command line.

If you want to see the USI commands then start it from a terminal with:

gshogi -vusi (or ./run.py -vusi if not installed)

For full debugging output use the command:

gshogi -v (or ./run.py -v if not installed)

You can specify a game file to open:

gshogi /path/to/gamefile.psn

Use -m to show moves and comments in the main window:

gshogi -m /path/to/gamefile.psn

Use -h to show header of loaded files:

gshogi -h /path/to/gamefile.psn

Use -mh to show both:

gshogi -mh /path/to/gamefile.psn

See http://en.wikipedia.org/wiki/Shogi for the rules of Shogi.

File Support

You can load/save games in PSN format or in gshog format. It is recommended to use PSN format.

gshogi can also read multi-game PSN files.

Edit Board Function

When edting the board position you can increase the count of a piece in the komadai by right-clicking on it. Left-click on it to decrease the count.

To add a white piece to the main board right-click on the square you want to add the piece to then select the piece from the pop-up menu. To add a black piece left-click on the square.

Time control/Level support

Examples of time controls that can be used with gshogi.

These were tested with the gse 0.1.4 engine. Note that not all USI engines will work with all time controls. Most engines work OK with byoyomi so use that if you have problems.

Note that times on the go command are in milliseconds.

byoyomi

e.g. 60 minutes game time plus 30 seconds byoyomi This means the player can make as many or as few moves as they like in the 30 minutes and after that they will have 30 seconds per move.

go btime 3600000 wtime 3600000 byoyomi 30000

If you want a fixed time of 10 seconds per move: go btime 0 wtime 0 byoyomi 10000

see http://en.wikipedia.org/wiki/Byoyomi

classical

e.g. 5 moves in 10 minutes

go btime 300000 wtime 300000 movestogo 40

Incremental

e.g. 30 minutes game time and 10 seconds bonus time per move This means the basic time for the game is 30 minutes and after each move a bonus of 10 seconds is added to the clock.

go btime 1800000 wtime 1800000 binc 10000 winc 10000

Fixed Time Per Move

e.g. 20 seconds per move go movetime 20000

Fixed Search Depth

e.g. Terminate the search when a depth of 8 is reached.

go depth 8

Infinite search

The search will go on indefinitely and will only terminate if a stop command (move now) is sent from the gui.

go infinite

Fixed No. of Nodes

The search will terminate after a fixed no. of nodes has been searched.

go nodes 10000000

Note that byoyomi is not part of the original USI specification (See http://www.glaurungchess.com/shogi/usi.html) but it is supported in most USI engines.

Custom Pieces

You can load custom pieces using the ‘Load Custom Pieces’ button on the ‘set pieces’ menu.

To set up your own custom pieces you must provide images with these filenames. You can use either png or svg files. If you use png change the file extension from svg to png.

Black Pieces:

Piece

Filename

King

kingB.svg

Rook

rookB.svg

Bishop

bishopB.svg

Gold General

goldB.svg

Silver General

silverB.svg

Knight

knightB.svg

Lance

lanceB.svg

Pawn

pawnB.svg

Promoted Rook

rookPB.svg

Promoted Bishop

bishopPB.svg

Promoted Silver General

silverPB.svg

Promoted Knight

knightPB.svg

Promoted Lance

lancePB.svg

Promoted Pawn

pawnPB.svg

The black piece images are mandatory. You can optionally provide images for the white pieces as well. If you provide white piece images gshogi will use them. If you don’t it will use the black piece images and rotate them through 180 degress.

White Pieces:

Piece

Filename

King

kingW.svg

Rook

rookW.svg

Bishop

bishopW.svg

Gold General

goldW.svg

Silver General

silverW.svg

Knight

knightW.svg

Lance

lanceW.svg

Pawn

pawnW.svg

Promoted Rook

rookPW.svg

Promoted Bishop

bishopPW.svg

Promoted Silver General

silverPW.svg

Promoted Knight

knightPW.svg

Promoted Lance

lancePW.svg

Promoted Pawn

pawnPW.svg

See the project homepage to download an example.

Acknowledgements

gshogi uses C engine code and includes some board pieces from GNU Shogi (version 1.3.2).

Metadata

Release files for gshogi 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gshogi 0.5.1
File Size Uploaded Provenance
gshogi-0.5.1.tar.gz 749.1 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for gshogi 0.5.1
File
gshogi-0.5.1-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
gshogi-0.5.1-cp36-cp36m-manylinux1_i686.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32 Details
gshogi-0.5.1-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
gshogi-0.5.1-cp35-cp35m-manylinux1_i686.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32 Details
gshogi-0.5.1-cp34-cp34m-win_amd64.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-64 Details
gshogi-0.5.1-cp34-cp34m-win32.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-32 Details
gshogi-0.5.1-cp34-cp34m-manylinux1_x86_64.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64 Details
gshogi-0.5.1-cp34-cp34m-manylinux1_i686.whl CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-32 Details
gshogi-0.5.1-cp33-cp33m-manylinux1_x86_64.whl CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-64 Details
gshogi-0.5.1-cp33-cp33m-manylinux1_i686.whl CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-32 Details

Total release size: 8.7 MB

Release files / gshogi-0.5.1.tar.gz

Download URL gshogi-0.5.1.tar.gz
Size 749.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ef8e91ef95dd131be024522810af83ccb59b2b10bd9f81a436f0eabaacf98380
BLAKE2b-256 checksum
How to use checksums
33a03c3237b052a8a7e637c480e42bad7141268b69d399950390bcf51e7df1ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp36-cp36m-manylinux1_x86_64.whl

Download URL gshogi-0.5.1-cp36-cp36m-manylinux1_x86_64.whl
Size 831.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
3413e5324049c7f3eebf05fe079005af3acf25bacb17151b834b035799120a62
BLAKE2b-256 checksum
How to use checksums
5666ab4256fbc0c3009d6de2c09b79ebdb4d2e0ac36b9875212dcc4d14c9fe57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp36-cp36m-manylinux1_i686.whl

Download URL gshogi-0.5.1-cp36-cp36m-manylinux1_i686.whl
Size 819.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
61b0410951a05985d32d0bb2b715574d15915d729831573d930f6dba0fa87b88
BLAKE2b-256 checksum
How to use checksums
f12d24dbeb3eb885a2f7a081f149ffec794a30b1b319cfc59f5cfcc1d8d5b066
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp35-cp35m-manylinux1_x86_64.whl

Download URL gshogi-0.5.1-cp35-cp35m-manylinux1_x86_64.whl
Size 831.3 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f000f0f2ac69bcbd2498f8d0dc4e131d2208e03ca98924829c2587fc94e0a1e8
BLAKE2b-256 checksum
How to use checksums
3d2b5693f24bf902d22dc52ad634db9cec153cf4753e5dcea32a8f68844a96f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp35-cp35m-manylinux1_i686.whl

Download URL gshogi-0.5.1-cp35-cp35m-manylinux1_i686.whl
Size 819.4 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
ccd4fd39bf80892b24944d1067d1cdc1329a3e4829ecf0d64986636cdd62e18c
BLAKE2b-256 checksum
How to use checksums
e0b43b33e58c9e2fa1a1b00449338fd840e11302b02ef10ade178c56668fc557
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp34-cp34m-win_amd64.whl

Download URL gshogi-0.5.1-cp34-cp34m-win_amd64.whl
Size 683.6 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
a2a73c2d2f4aec9a9dc713535fd1a165b9673ace6ddfc267f1d27dab24c79407
BLAKE2b-256 checksum
How to use checksums
e6ec10b0193497521d9d4566ae8f3dffe1d7f891059ce173dc8e98cda2f1a2a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp34-cp34m-win32.whl

Download URL gshogi-0.5.1-cp34-cp34m-win32.whl
Size 677.7 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
5029bbbb219703f9ada9fbc5f9be3ce2c3140b7e5fd3529ff335647a4c7f304f
BLAKE2b-256 checksum
How to use checksums
63dfb813d944755d45b11667786a6eea012f136f92207895d4ea1115b3fd2f56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp34-cp34m-manylinux1_x86_64.whl

Download URL gshogi-0.5.1-cp34-cp34m-manylinux1_x86_64.whl
Size 831.1 kB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
2886114e80e5ac6b3e08468c05bfb4c81ead3b135fb47f038bb65117a4f5ef53
BLAKE2b-256 checksum
How to use checksums
25ae260e7643e0202865e3bc04c387764bb26ecba16a06beb008cd57c10998cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp34-cp34m-manylinux1_i686.whl

Download URL gshogi-0.5.1-cp34-cp34m-manylinux1_i686.whl
Size 819.2 kB
Tags CPython 3.4 CPython 3.4 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
7a1cccde80583edd061d606a617accfff1a5306962cabf06bc847056303828e2
BLAKE2b-256 checksum
How to use checksums
de2fa0afedb83da1e23cbd94bc0f1df1d2295e3c2dbc6371b63eddd476aedaf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp33-cp33m-manylinux1_x86_64.whl

Download URL gshogi-0.5.1-cp33-cp33m-manylinux1_x86_64.whl
Size 831.1 kB
Tags CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b2dfbe6612653b55ec2e9caa11660496468ef6297e5fe409d53fbe760551fe94
BLAKE2b-256 checksum
How to use checksums
4634c1ffd59e378a0597dcf76a53d443285a72db3ce141b01b5a933e45aee86e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gshogi-0.5.1-cp33-cp33m-manylinux1_i686.whl

Download URL gshogi-0.5.1-cp33-cp33m-manylinux1_i686.whl
Size 819.2 kB
Tags CPython 3.3 CPython 3.3 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
85355fd4db661846ec036a71bdd8e1eecdc1eb798b4b897ee93b728b2663e25a
BLAKE2b-256 checksum
How to use checksums
6053a4dcade63ce489ef11ef951898e94ddc83bbd48dfe7a0ca05649802d1b90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for gshogi 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.1 This release

11 release files No provenance

0.4.5

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page