Code Monkey home page Code Monkey logo

opencv-chess-bot's Introduction

OpenCV Chess Bot

a proof of concept implementation of visual chessboard recognition
and automated move making on the screen using Python, OpenCV and PyAutoGUI

Demo video

IMAGE ALT TEXT HERE

How it works

  1. Makes a board screenshot
  2. Detects chess pieces and stores it's coordinates
  3. Generates FEN string based on piece coordinates
  4. Passes FEN to the UCI engine
  5. Converts best move to square coordinates on screen
  6. Moves a mouse to coordinates associated with the source square then mimics a click,
    moves a mouse to coordinates associated with the target square then mimics a click
  7. Repeats until the game is over

Disclaimer

Because of a cheating being a big issue nowadays
I didn't put any effort to adapt this project to be
easily used out of the box by end users, e.g. chess cheaters.
This project is intended for programmers with a tinkering purposes in mind.
Before asking any questions or opening issues make sure to follow
the tutorials below - they are short and full of the timestamps
so you can watch only those parts you're interested in

How to use it - YouTube tutorials

IMAGE ALT TEXT HERE

opencv-chess-bot's People

Contributors

maksimkorzh avatar

Stargazers

Aditya Pachpande avatar

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.