Skip to main content

Doubutsu shogi AI

Project description

DOUBUTSUSHOGI

Open in Streamlit

A doubutsushogi (animal chess) analyzer.

Install

# from pypi
pip3 install doubutsushogi

# or from github
git clone https://github.com/kota7/doubutsushogi-py.git
pip3 install -U ./doubutsushogi-py

Some usage

from doubutsushogi.game import State

# game state at the beginning
s = State.initial_state()
print(s)
#  ------- 
# | k l z |
# | . h . |
# | . H . |
# | Z L K |
#  ------- 
# H: 0 Z: 0 K: 0
# h: 0 z: 0 k: 0
# Player 1's turn
from doubutsushogi.evaluate import evaluate_states

# Numeric evalutation of the state
# The first run takes some time (typically a few minutes) to downloading database from https://github.com/kota7/doubutsushogi-solve/releases
evaluate_states([s])
#[-4612]
# Note: positive value indicates that the first player is winning, 
#       negative the second player,
#       and zero means a tie.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doubutsushogi-0.0.5.tar.gz (109.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doubutsushogi-0.0.5-py3-none-any.whl (112.6 kB view details)

Uploaded Python 3

File details

Details for the file doubutsushogi-0.0.5.tar.gz.

File metadata

  • Download URL: doubutsushogi-0.0.5.tar.gz
  • Upload date:
  • Size: 109.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for doubutsushogi-0.0.5.tar.gz
Algorithm Hash digest
SHA256 3a230dca5572cb5470eebe1126f46f2e7c2149f98766e890567d3ff6a916c0e3
MD5 5e998fd9bcceec3fd29ae8823e105da8
BLAKE2b-256 7c95f699ee8b1c93391e32e6d752f7d60fbc1716702bf6d7ebb8daeca5e6450d

See more details on using hashes here.

File details

Details for the file doubutsushogi-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: doubutsushogi-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 112.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for doubutsushogi-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e5e9912c2c4a71581268be3ec1bf7f9517f402de3b383425d0f74b70b3b0fe73
MD5 99312f833c0c835ccd6a788256550df1
BLAKE2b-256 e98398740100f0de64f6de98d2583e810db3d08e6d8ca1fb1f78be76202fd732

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page