Giter Site home page Giter Site logo

chs's Introduction

✨ Hey-o 👋

I'm Nick. I like plants, discrete math, chess, programming language theory, playing soccer, going for casual runs (only when it's nice out), taking photos, and spamming my friends with tiktoks.

I currently work at Notion building cool enterprise features.

chs's People

Contributors

bachoseven avatar eoakley avatar jeremyh avatar jn64 avatar nickzuber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chs's Issues

Custom board size

Would it be possible to customize the board size? On a high-res screen the board looks too small.

Request for a 'save' command

Thank you for making chs !

This is just a quick request for a 'save' command that would allow a game to be saved at its current state, and then continued at some point in the future (possibly from a different machine).

Thanks again,
Nicholas

DLL load failed: The specified module could not be found

Hi. Im having this problem on Windows 10.
Thanks.

C:\WINDOWS\system32>chs Traceback (most recent call last): File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\program files\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Program Files\Python37\Scripts\chs.exe\__main__.py", line 4, in <module> File "c:\program files\python37\lib\site-packages\chs\__main__.py", line 6, in <module> from chs.client.runner import Client File "c:\program files\python37\lib\site-packages\chs\client\runner.py", line 3, in <module> import editdistance File "c:\program files\python37\lib\site-packages\editdistance\__init__.py", line 1, in <module> from .bycython import eval ImportError: DLL load failed: The specified module could not be found.

Install error "Could not find version"

After running the install command, I get the following error:

"Collecting chs
Downloading https://files.pythonhosted.org/packages/4e/5c/47a35d4975ed166fd1b28800cde9cd8c469cf9b5a39fe1fee70741af2bb8/chs-2.2.0.tar.gz
Collecting editdistance (from chs)
Downloading https://files.pythonhosted.org/packages/77/67/2b1fe72bdd13ee9ec32b97959d7dfbfcd7c0548081d69aaf8493c1e695f9/editdistance-0.5.3-cp36-cp36m-manylinux1_x86_64.whl (178kB)
100% |████████████████████████████████| 184kB 282kB/s
Collecting python-chess (from chs)
Downloading https://files.pythonhosted.org/packages/38/47/dfebc06e589530691d33c71bc7b3d8d311252b58ae338980fd4327fe77f2/python_chess-1.999-py3-none-any.whl
Collecting chess<2,>=1 (from python-chess->chs)
Could not find a version that satisfies the requirement chess<2,>=1 (from python-chess->chs) (from versions: )
No matching distribution found for chess<2,>=1 (from python-chess->chs)"

Installation notes for python3.9 / Fedora 33

Ran into some issues with editdistance due to it not having wheels for python >3.7, this is the solution.

sudo dnf install gcc-c++ python3-devel
CFLAGS="-Wno-sign-compare" python3 -m pip install chs

That's all.


Details in case it helps anyone searching:

gcc errors make build editdistance python3.8 python3.9 linux

warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]

Solution: set or export CFLAGS="-Wno-sign-compare"

editdistance/bycython.cpp:24:10: fatal error: Python.h: No such file or directory

Solution: install python3-devel (might be called python-dev or python3-dev on Ubuntu/Debian etc).

Chess pieces do not appear in console tty linux mode.

Hello,
As said in the title and as shown in this screenshot (taken with the fbgrab tool), the chess pieces do not appear in console mode (ctrl+alt+Fx); there are dots instead.
However, it works on the terminal in graphic mode (Gnome Terminal & Kitty).
PSCEaS.jpg

How I can resolve this ? Thanks in advance.

Play as black

Hi, wanted to confirm if there is a way currently to play as black instead of the default white. As I'm not able to find any indication of this in the command help or README here. Thanks

Want to output user and stockfish moves to oled

Hi would like to output the moves on the oled for both player and stockfish .Also would like to know how can i extract stockfish moves to communicate to arduino using serial communication for automatic chess without any terminal

FileNotFoundError

When I try to run chs it only comes back with a "Uncaught error "FileNotFoundError", exiting the app.

fuzzy search legal moves

Instead of having the user type out the entire move, generate all the legal moves for the current position and then use the user's input string to fuzzy search against that. This will greatly enhance usability.

custom user flags

objective
the program can simulate =

human vs human
human vs engine
engine vs engine

nice to have custom user flags before run the program, e.g.

chs -w human -b human
chs -w human -b engine --engine_path_b /bin/fruit
chs -w engine --engine_path_w /bin/sjaakii -b human
chs -w engine --engine_path_w /bin/crafty -b engine --engine_path_b /bin/sjeng

support more engines

objective
support more engines both uci, xboard / winboard

already tested in osx by edit
~/Downloads/chs/lib/python*/site-packages/chs/engine/stockfish.py

1. tested engine path that work with popen_uci() and 'Skill level' active :
uci :

brainfish, fairy_stockfish, stockfish, stockfish_mv

2. tested engine path that work with popen_uci() and 'Skill level' inactive / commented :
uci :

asmfish, bikjump, brainfish, cinnamon, combusken, critter, deephiarcs, defenchess, drofa, ethereal, fairy_stockfish, fruit, gfruit, glaurung, hiarcs, komodo, laser, senpai, shredder_classic, smaug, stash, stockfish, stockfish_mv, tiny, toga2, wasp, winter, wyldchess, xiphos

uci_xboard :
cheng, gnuchessu, greko, k2, sjaakii

3. tested engine path that work with popen_xboard() and 'Skill level' inactive / commented :
uci_xboard :

gaviota, greko, sjaakii

xboard :
crafty, sjeng

the engines works can be more than tested above, perhaps due to python-chess module version updated, e.g.
chessdblet, dreamer, fairymax, leonidas, phalanx, polyglot, pulsar, pychess, scidlet

chess figures look weird

I really like the program, but i use powerlevel-10k and the patched nerd font meslo, which is specifically for powerlevel10k, yet my chess figures look weird, do you know why? As Terminal i use guake.
image

Command 'chs' not found

I am a Linux user. I was installed chs with pip and followed the install instructions. I typed "chs" (without the quotes) into the terminal, as was instructed, but the terminal states that there is no such command. How do I fix this? Can it be fixed?

Blindfold

Is there an option to turn the board off during the game? stokfish played moves should be announced in pgn fromat

OSError on launch

Hi, got the following error after running on Ubuntu Server 18.04. Installation was ok.

Uncaught error "OSError", exiting the app.

Solutions for issues on Windows 10

I had to fix these issues to get it working on Windows 10.

chs


Installation

Command Prompt

cd C:\Users\Matt\AppData\Local\Programs\Python\Python39\Scripts
pip install chs

I had to first install the Visual C++ 14.0 Build Tools or it would give an error.

http://go.microsoft.com/fwlink/?LinkId=691126
or
https://visualstudio.microsoft.com/visual-cpp-build-tools


pwd Module Not Found

Error

ModuleNotFoundError: No module named 'pwd'

Fix
C:\Users\Matt\AppData\Local\Programs\Python\Python39\Lib\site-packages\chs\ui\board.py

Change import pwd to import getpass.


Stockfish File Not Found

Error

Uncaught error "FileNotFoundError", exiting the app.

Fix
C:\Users\Matt\AppData\Local\Programs\Python\Python39\Lib\site-packages\chs\engine\stockfish.py

Full path to stockfish needs to be specified:

if 'Windows' in platform.system():
  engine_path = 'C:\\Program Files\\Stockfish\\stockfish.exe'

Rank Name Error

Error

Uncaught error "NameError", exiting the app.

Fix
C:\Users\Matt\AppData\Local\Programs\Python\Python39\Lib\site-packages\chs\ui\board.py

In def _generate(), rank_i = rank_i - 1, when rank_i reaches 1 in the loop it causes an error in def get_meta_section().

Error with self.get_user().

if rank == 1:
      return '  {}'.format(self.get_user())

to

if rank == 1:
      return '  {}'.format(getpass.getuser())

Chess Pieces displaying as question marks

Change Command Prompt font to DejaVu Sans Mono.

ModuleNotFoundError: No module named 'pwd'

Hi.
Thanks for your work.

Im having this trouble when running:

chs
Traceback (most recent call last):
  File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python37\Scripts\chs.exe\__main__.py", line 5, in <module>
  File "c:\program files\python37\lib\site-packages\chs\__main__.py", line 6, in <module>
    from chs.client.runner import Client
  File "c:\program files\python37\lib\site-packages\chs\client\runner.py", line 8, in <module>
    from chs.ui.board import Board
  File "c:\program files\python37\lib\site-packages\chs\ui\board.py", line 2, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'

What can i do?
This is a Windows 10.
Thanks.

Borrowing ideas from EdChess

Just discovered chs a few minutes ago and love what you've done so far!

Back in the day I used to play EdChess on DOS all the time. I haven't found a similar console chess client anywhere else. I wanted to post a link to it here in case it might give you ideas for future directions.

https://classicreload.com/ed-chess.html

Request for a resign command

I tried to resign using "resign", then "exit", eventually just said screw it, and tried Ctrl+C, which it registered as resignation. Using a more intuitive command such as "resign" would be better (and then maybe "new" to start a new game, rather than running the application again); or if not, at least add the fact that Ctrl+C resigns to the readme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.