Giter VIP home page Giter VIP logo

lichess-with-a-real-board's Introduction

Lichess with a real board

Software that enables you to connect your real life chess board to Lichess.org . Using computer vision it will detect the moves you make on your chess board. After that, if it's your turn to move in the online game, it will send your move to Lichess servers using Lichess Board API . This project is Lichess-only version of my project Play online chess with real chess board .

GUI

You need to run the GUI to do the steps in Setup and Usage sections and customize how you use the software.

Setup

  1. Generate a Lichess API Access Token. Then, enter the token to the GUI.

  2. Place your webcam near to your chessboard so that all of the squares and pieces can be clearly seen by it.

  3. Remove all pieces from your chess board.

  4. Click "Board Calibration" button.

  5. Check that corners of your chess board are correctly detected and press key "q" to save detected chess board corners. You don't need to manually select chess board corners; it should be automatically detected by the program. The upper left square, which is covered by points (0,0), (0,1),(1,0) and (1,1) should be a8. You can rotate the image by pressing the key "r" to adjust that. Example chess board detection result:

Usage

  1. Place pieces of the chess board to their starting position.
  2. Start the Lichess game.
  3. Click "Start Game" button.
  4. Wait until it says "game started".
  5. Make your move if it's your turn, otherwise make your opponent's move.
  6. Notice that it actually makes your move in the Lichess game, if it's your turn. Otherwise, wait until it says the starting and ending squares of the opponent's move.
  7. Go to step 5.

Video

In this section you can find video content related to the software.

Playing a game on Lichess.org, using lichess-with-a-real-board software, created by Alper Karayaman.

SergeiKolupajev vs LastPawn Standing game on Lichess.org

Required libraries

  • opencv-python
  • python-chess
  • numpy
  • pyttsx3
  • scikit-image
  • pygrabber
  • mac-say
  • berserk

lichess-with-a-real-board's People

Contributors

karayaman avatar ornicar 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  avatar  avatar

lichess-with-a-real-board's Issues

OBS Virtual Cam - Can't select Webcam

I have a Cellphone connected to my PC. I'm then using the Droidcam Application with OBS.
OBS has a plugin for a virtual cam.
When i start the Plugin, i usually can select this webcam in Applications like Zoom, Teamviewer, Microsoft Teams, etc.
But in your guy.py at "Webcam to be used:" i can't select anything except "Default".

Can you help with that?
obs_virtual_cam

Accessibility for blind people (e.g. görmeengelli).

    Hello! I am a turkish&russian blind guy who likes chess.
    We use screenreaders on our computers so I want to be able to use this app with screenreader, however the gui application is inaccessible at all.
    buttons are unlabled, they are not navigatable by tab key and they are even not navigatable by more edvanced object navigations.
    Normally we use tab key for navigation in the guis, arrow keys in lists and enter key or spacebar to press buttons, and screenreader says everything we do. But some apps are inaccessible at all and unusable.
    the most accessible gui framework is wxpython, however qt is somewhat accessible in some parts. The more native is gui, the mor accessible it is.
    Now I will tell you why it's very important.
    We use physical chess boards to play online and write uci moves into the text field! Yes, exploring the chess board with arrow keys is quite slow, i'd say really slow. So Lichess made it's own great accessibility mode for blind.
    I don't need a really selfvoiced application that will even work without screenreader, I need just a native gui.
    Thank you Alper for such a great think.

Hayırlı işler!

Using chess board with classic colors

Hi, Alper. Thank you once again for the great app and opportunity to play online chess without buying DGT Chess Board. I have regular classic chess board. Problem is that, what i can't use that in your software. When i use only my table lightning lamp and launch board calibration proccess i see only my chess board without coordinates, but there must be seen coordinates too. But when i use light falling on a chessboard from a lamp on the ceiling i see my chess board without coordinates, but there must be seen coordinates too. And the last option, when i use lightning from the street only, it works like it must be, i mean i see my chess board and coordinates and can rotate image with r button. What i do wrong and how to fix this problem, because i want to play on this board using light from table or ceiling lamp?

https://imageup.ru/img288/3962824/ceiling-lamp.jpg.html

https://imageup.ru/img247/3962825/table-lamp.jpg.html

https://imageup.ru/img91/3962827/street-lightning.jpg.html

P.S. Using modified chess table like in my last videos on youtube https://www.youtube.com/watch?v=W0mohAhS4hI&list=PLCe-Dywn_53tC_ntZLbGo6vKnWaw3lyXn&index=2 is working very good.

Issues with board calibration.

I must say this is a fantastic project. Tools like this and camerachess have so much potential and I'm hoping they develop further. I was having issues with getting my board to calibrate. The squares were always just a bit shifted in on direction and wouldn't allow any moves to register properly.

A feature to manually select corners as an option might b helpful in this case. I experimented with several boards with no luck. As well as lighting and camera angles. I wish nothing but the best for this project. Thank you for your contribution to the community!

Best Regards,
Tyrus

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.