tensorflow_chessbot
tensorflow_chessbot copied to clipboard
Use characters to show chessboard instead of fen-to-image.com
Found this on the Sunfish readme
8 ♖ ♘ ♗ ♕ ♔ ♗ · ♖
7 ♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
6 · · · · · ♘ · ·
5 · · · · · · · ·
4 · · · · ♟ · · ·
3 · · · · · · · ·
2 ♟ ♟ ♟ ♟ · ♟ ♟ ♟
1 ♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
a b c d e f g h
Could potentially draw the notation out in-comment instead of as an image, not sure if encoding is visible to all/majority of /r/chess users. Perhaps also link fen-to-image as a fallback?
Could also do a table
| a | b | c |
|---|---|---|
| ♙ | ♙ | ♙ |
| . | ||
| ♜ | ♛ | ♚ |
...
A table would be better. The chess unicode characters tend to be slightly wider than usual, even for a monospace font. Even on my computer the example you provided doesn't look right:

By the way, I'm working on an alternative to fen-to-image.com which is
- fast, serves a 15 KiB SVG or 25 KiB PNG image for typical chess positions from behind Cloudflare
- uses familiar set of pieces by CBurnett, also seen on Wikipedia and Lichess
- isn't full of glitches such as

Example: https://chess.dllu.net/2kr3r/1p1n1ppp/2pR4/5b2/2B1n3/5NB1/PP3PPP/2K4R.png

Example: https://chess.dllu.net/black/2kr3r/1p1n1ppp/2pR4/5b2/2B1n3/5NB1/PP3PPP/2K4R.png

Good point on the table. How would you be hosting the generator? I'd like the bot to be using something that should be running reasonably consistently for the next few years. Is there a way to choose the bg color to be different, such as grayscale?
It's running on a $5 Linode instance behind a cloudflare free tier.
I can change the colour or you could just fork the project and run your own one (you could run it on the same machine that the bot runs on).
I'm probably going to keep working on puppyfen so it might not be that stable for the next few weeks. I'm planning to add threading, cache purging (so that my VPS doesn't get filled up with PNG images), fen validation (to avoid people spamming the server with bad fens like /qqqqqqqqqqqqqqqqqqqqqqqqqqq...), and maybe new features such as a homepage and adding the coordinates to the chessboard.