1
0
Fork 0
cartesi-python-chess/README.md

78 lines
1.5 KiB
Markdown
Raw Normal View History

2021-11-17 11:47:22 -07:00
# Cartesi python-chess
Crufty scripts to build disk images to run under the Cartesi
RISC-V machine emulator that verify a chess game. Similar
to the Cartesi example, but this is in python using python-chess,
not javascript.
2021-11-17 11:52:32 -07:00
# Output
2021-11-17 11:55:16 -07:00
## Good pgn
```
cartesi-python-chess$ ./build-cartesi-cartesi-python-chess ; ./run-cartesi-cartesi-python-chess
copying from directory cartesi-python-chess-cartesi-img
.
/ \
/ \
\---/---\ /----\
\ X \
\----/ \---/---\
\ / CARTESI
\ / MACHINE
'
+ /mnt/cartesi-python-chess/python-chess-validate.py
Errors: []
+ exit
Halted
Cycles: 1201049708
```
## Illegal pgn
2021-11-17 11:52:32 -07:00
```
cartesi-python-chess$ ./run-cartesi-cartesi-python-chess
.
/ \
/ \
\---/---\ /----\
\ X \
\----/ \---/---\
\ / CARTESI
\ / MACHINE
'
+ /mnt/cartesi-python-chess/python-chess-validate.py
Errors: [ValueError("illegal san: 'Nc8' in rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2")]
+ exit
Halted
Cycles: 1102514408
```
2021-11-17 11:47:22 -07:00
# Upstream
## Python Chess
* https://python-chess.readthedocs.io/en/latest/
* https://github.com/niklasf/python-chess/
2021-11-17 11:52:32 -07:00
## Cartesi
2021-11-17 11:47:22 -07:00
* https://cartesi.io/docs/intro
* https://github.com/cartesi/poker/tree/master/blockchain/verifier/chess
* https://medium.com/cartesi/how-cartesi-is-changing-the-game-showcasing-chess-9f4e39d5cea0
2021-11-17 11:52:32 -07:00
# Contact
```
y@deepcrayon.fish or jebba/jebbam on discord/lichess/etc.
```