A basic chess model to imports/export FEN & finds moves.
Project description
Chessnut is a simple chess board model written in Python. Chessnut is not a chess engine – it has no AI to play games, and it has no GUI. It is a simple package that can import/export games in Forsyth-Edwards Notation (FEN), generate a list of legal moves for the current board position, intelligently validate & apply moves (including en passant, castling, etc.), and keep track of the game with a history of both moves and corresponding FEN representation.
Chessnut is not written for speed, it is written for simplicity (there are only two real classes, and only about 200 lines of code). By adding a custom move evaluation function, Chessnut could be used as a chess engine. The simplicity of the model lends itself well to studying the construction of a chess engine without worrying about implementing a chess model, or to easily find the set of legal moves for either player on a particular chess board for use in conjunction with another chess application.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file chessnut-0.4.1.tar.gz
.
File metadata
- Download URL: chessnut-0.4.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
033fd120eca1b0ebb0b48236df95d3e30e791cf52c4c7cd7f29a71b6a0dd7c85
|
|
MD5 |
02319383178cdbf340f553c231ae07b3
|
|
BLAKE2b-256 |
e554ff05eb5403373d28754d2f8175cfc88f669a6364f7fed67385ba1dcc9d62
|
Provenance
The following attestation bundles were made for chessnut-0.4.1.tar.gz
:
Publisher:
python-publish-release.yml
on cgearhart/Chessnut
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
chessnut-0.4.1.tar.gz
-
Subject digest:
033fd120eca1b0ebb0b48236df95d3e30e791cf52c4c7cd7f29a71b6a0dd7c85
- Sigstore transparency entry: 152155407
- Sigstore integration time:
-
Permalink:
cgearhart/Chessnut@8af90b93f8a10437495c65733c25cde94b615bb7
-
Branch / Tag:
refs/tags/v0.4.1
- Owner: https://github.com/cgearhart
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
python-publish-release.yml@8af90b93f8a10437495c65733c25cde94b615bb7
-
Trigger Event:
release
-
Statement type:
File details
Details for the file Chessnut-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: Chessnut-0.4.1-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0c65f19e4e88a40a0372d646521754e44dd97be017e0814029ae42566bd3f7ea
|
|
MD5 |
fa1ed0784d5a638ac9823a588150aabb
|
|
BLAKE2b-256 |
4384c8078b302aba6225614a4893824b661fdaeb76514870fac2cf0767da0391
|
Provenance
The following attestation bundles were made for Chessnut-0.4.1-py3-none-any.whl
:
Publisher:
python-publish-release.yml
on cgearhart/Chessnut
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
chessnut-0.4.1-py3-none-any.whl
-
Subject digest:
0c65f19e4e88a40a0372d646521754e44dd97be017e0814029ae42566bd3f7ea
- Sigstore transparency entry: 152155410
- Sigstore integration time:
-
Permalink:
cgearhart/Chessnut@8af90b93f8a10437495c65733c25cde94b615bb7
-
Branch / Tag:
refs/tags/v0.4.1
- Owner: https://github.com/cgearhart
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
python-publish-release.yml@8af90b93f8a10437495c65733c25cde94b615bb7
-
Trigger Event:
release
-
Statement type: