tensorflow_chessbot icon indicating copy to clipboard operation
tensorflow_chessbot copied to clipboard

Use characters to show chessboard instead of fen-to-image.com

Open Elucidation opened this issue 9 years ago • 3 comments

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
.

...

Elucidation avatar Feb 19 '16 05:02 Elucidation

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:

pic

By the way, I'm working on an alternative to fen-to-image.com which is

  1. fast, serves a 15 KiB SVG or 25 KiB PNG image for typical chess positions from behind Cloudflare
  2. uses familiar set of pieces by CBurnett, also seen on Wikipedia and Lichess
  3. isn't full of glitches such as image

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

example

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

example

dllu avatar Jan 10 '19 03:01 dllu

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?

Elucidation avatar Jan 10 '19 03:01 Elucidation

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.

dllu avatar Jan 10 '19 04:01 dllu