Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

Dobutsu Shogi WDL Databases

Strongly solved Dobutsu Shogi (どうぶつしょうぎ) WDL tablebases for boards from 4×3 through 8×3. The tables contain exact win/draw/loss values under perfect play, plus a reachability (K) plane identifying positions reachable from the initial position.

The tables are generated by the reference solver in jh85/smallgames. This README shows how to download, verify, and query them.

Quick start: query a position with C++

Clone and build the reference solver:

git clone https://github.com/jh85/smallgames.git
cd smallgames/smallgames/dobutsushogi
make

Download wdl_4x3_lr.bin from this dataset and run:

./dobutsu probe \
  --board 4x3 \
  --symmetry lr \
  --table /path/to/wdl_4x3_lr.bin \
  b e l g . c . . C . G L E - -

The example describes the standard 4×3 initial position:

  • b or w: side to move (b = Sente/Black, w = Gote/White)
  • next ROWS × 3 arguments: board cells in row-major order
  • .: empty square
  • uppercase L E G C H: Sente/Black pieces
  • lowercase l e g c h: Gote/White pieces
  • final two arguments: Sente's hand and Gote's hand
  • -: an empty hand; otherwise use letters from E, G, and C, such as EC

The command reports the exact value for the side to move, whether the position is reachable, and the value of every legal move.

Values are interpreted as follows:

Value Meaning
1 the side to move can force a win
0 draw with perfect play
-1 the side to move loses with perfect play

The solver's complete command-line documentation is in the source README.

Python usage

The source repository also contains a Python reader for this exact binary format. It memory-maps the table instead of loading the entire file into a Python object.

git clone https://github.com/jh85/smallgames.git
cd smallgames
python3 -m pip install numpy
from az_dobutsu.game import initial_state
from az_dobutsu.tablebase import WDLTable

table = WDLTable("/path/to/wdl_4x3_lr.bin")
state = initial_state()

print(table.value(state))       # -1 = loss, 0 = draw, 1 = win
print(table.reachable(state))   # True or False

The Python reader is configured for 4×3 by default. For another board height, set AZ_DOBUTSU_ROWS before Python imports az_dobutsu:

AZ_DOBUTSU_ROWS=5 python3 your_script.py

The Python package also exposes table.code(state), table.rank(state), table.value_at_rank(rank), and reachability queries by rank.

Published files

All published tables use version-3 left/right-reflection-reduced indexing and include both the WDL and K planes.

Board File layout Size (bytes) SHA-256
4×3 single file 220,516,424 3b28fcf677567f81f904d58b64d078f44b8002fd8848a7942ea109794815c2f1
5×3 single file 2,247,527,576 692ec9297bd028eb9b1e419a1670327c8a2db1773bdea57353ee9e62b8db7562
6×3 single file 13,670,959,464 3e60fdd7c61873d98c8f0ed8d3a11445f3a2c80a4fcfb860cb027fb3715eaad1
7×3 3 parts 59,744,279,544 7dbfc5c2132268b3bf9f03a886bbd846ea3aee1d0d43a1ec6efdf53d7a93dd3f
8×3 10 parts 207,674,217,632 b40ffd55b2d7c77334e5957f5e5b3003c76bf0d5120cc058924511a0c90d8b8c

Verify a downloaded single-file table with:

sha256sum wdl_4x3_lr.bin

For the split tables, download every part into the same directory and reconstruct them in lexical order:

cat wdl_7x3_lr.bin.part* > wdl_7x3_lr.bin
cat wdl_8x3_lr.bin.part* > wdl_8x3_lr.bin
sha256sum wdl_7x3_lr.bin wdl_8x3_lr.bin

Binary format

Each table contains:

  1. an 8 KiB header;
  2. a packed 2-bit WDL value for every indexed position;
  3. a packed 1-bit K reachability value for every indexed position.

The WDL plane uses these two-bit codes:

0 = draw
1 = win
2 = loss

The files are not ordinary NumPy arrays. Use the reference C++ solver or the Python WDLTable reader so that the header, packed bits, ZDD rank mapping, and left/right reflection reduction are handled correctly.

The K plane is present in every published table. A set K bit means that the corresponding reflection orbit is reachable from the initial position. In a reflection-reduced table, the bit describes the orbit rather than each left/right orientation separately.

Checksums and file locations

The files in this dataset are stored under data/:

data/wdl_4x3_lr.bin
data/wdl_5x3_lr.bin
data/wdl_6x3_lr.bin
data/wdl_7x3_lr.bin.parts/wdl_7x3_lr.bin.part000 ... part002
data/wdl_8x3_lr.bin.parts/wdl_8x3_lr.bin.part000 ... part009

The published hashes above are SHA-256 hashes of the reconstructed complete tables, not hashes of the individual split parts.

Downloads last month
14