attackingordefending / pydraughts Goto Github PK
View Code? Open in Web Editor NEWA draughts (checkers) library for Python with move generation, PDN reading and writing, engine communication and balloted openings
License: MIT License
A draughts (checkers) library for Python with move generation, PDN reading and writing, engine communication and balloted openings
License: MIT License
Add Example Scripts like https://github.com/niklasf/python-chess/tree/master/examples
Parsing moves in hub format might fail, if the move has the captures unordered.
I use this definition of the hub protocol, which says the captures can be ordered arbitrarily: https://github.com/rhalbersma/scan/blob/master/protocol.txt
In the example below, first move is parsed correctly and the second one raises an error.
import draughts
g2 = draughts.Game(variant='brazilian', fen='Bbbbbebbbbbwbeeeewweeweeewwewwwww')
move_ok = draughts.Move(board=g2, hub_move='8x13x11x17x18')
move_bad = draughts.Move(board=g2, hub_move='8x13x11x18x17')
The Russian draughts have rule that if you have started to capture a sequence of enemy pieces that you need to finish it, you cannot ignore it and do not finish the multiple capture jump.
For example, this position should have only one valid move, not two
fen="W:Wh6:Bg7,c5,d2"
nice to have feature :
to visualize the board (svg or another image format)
thanks and best regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.