Miloslav Ciz aa7911f532 Add test | 2 роки тому | |
---|---|---|
tools | 2 роки тому | |
LICENSE.txt | 4 роки тому | |
README.md | 2 роки тому | |
TODO.txt | 2 роки тому | |
convertPieces.c | 3 роки тому | |
pieces.ppm | 3 роки тому | |
smallchesslib.h | 2 роки тому | |
smolchess.c | 2 роки тому | |
test.c | 2 роки тому | |
testSpeed.c | 2 роки тому |
A tiny public domain suckless chess library and engine for the benefit of all living beings.
Smallchesslib is a small/suckless/KISS single header chess library that comes with functions for playing the game, manipulating standard chess formats, and even comes with a basic AI. The repository also includes a simple chess engine built with the library.
The philosophy here is not to be the best, the fastest, to offer the strongest AI or completely comply with all the standards, but rather to offer something simple and very portable to people who want to create simple chess software. There are many strong engines and complex libraries, but few that try to keep it simple and portable in pursuit of understandability, maximum freedom and friendliness to smaller projects. The library is completely in the public domain under CC0 so as to serve everyone equally. This isn't made for any profit but purely for the benefit of everyone.
A B C D E F G H
8 ▒♜░♞▒▒[][♛░░▒♚░♝
7 ░♟▒♝░♟▒♟░░▒♟░░▒♟
6 ▒▒░♟▒▒░░▒▒░░▒♟░░
5 ░░▒▒░░▒♙░░▒♜░░▒▒
4 ▒♙░░▒♗░░▒▒░♙▒▒░░
3 ░░▒♙░♙▒▒░♗▒▒░♙▒♙
2 ▒▒░░▒▒░░▒♘░░▒♕░░
1 ░♖▒▒░░▒▒░♔▒▒░░▒♖
black played d8e8
white to move
ply number: 34
FEN: rn2q1kb/pbpp1p1p/1p4p1/3P1r2/P1B2P2/1PP1B1PP/4N1Q1/R3K2R w kq - 1 18
board static evaluation: -0.125000 (-32)
board hash: 461096787
phase: midgame
en passant: 0
50 move rule count: 1
PGN: 1. h3 b6 2. e4 e5 3. Nc3 Nf6 4. b3 Bb4 5. Nd5 Nxd5 6. exd5 O-O 7. c3 Bd6 8. d4 Re8 9. Be3 Bb7 10. dxe5 Rxe5 11. Bc4 Qh4 12. Qf3 g6 13. g3 Qd8 14. Ne2 Rf5 15. Qg2 Be5 16. f4 Bh8 17. a4 Qe8*
Simply include smallchesslib.h
, all code is in this one file, no need for linking. All functions and
other resources are also documented in this file, so take a look at it to see the library's API. For a
typical use you want to focus on the SCL_Game
struct and its associated functions starting with
SCL_game*
.
tl;dr: everything in this repository is CC0 + a waiver of all rights, completely public domain as much as humanly possible, do absolutely anything you want
I, Miloslav Číž (drummyfish), have created everything in this repository.
This work's goal is to never be encumbered by any exclusive intellectual property rights, it is intended to always stay completely and forever in the public domain, available for any use whatsoever.
I therefore release everything in this repository under CC0 1.0 (public domain, https://creativecommons.org/publicdomain/zero/1.0/) + a waiver of all other IP rights (including patents), which is as follows:
Each contributor to this work agrees that they waive any exclusive rights, including but not limited to copyright, patents, trademark, trade dress, industrial design, plant varieties and trade secrets, to any and all ideas, concepts, processes, discoveries, improvements and inventions conceived, discovered, made, designed, researched or developed by the contributor either solely or jointly with others, which relate to this work or result from this work. Should any waiver of such right be judged legally invalid or ineffective under applicable law, the contributor hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to this right.
I would like to ask you, without it being any requirement at all, to please support free software and free culture by sharing at least some of your own work in a similar way I do with this project.
If you'd like to support me or just read something about me and my projects, visit my site: www.tastyfish.cz.