Skip to content
Jop3rPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

English | Русский

ChessBot

A local web service for analyzing chess positions using the Stockfish engine.

Description

The project is a Flask application that takes chess positions in FEN format and returns the best move, position evaluation, and principal variations (PV) using the popular chess engine Stockfish.

Requirements

  • Python 3
  • flask
  • chess (python-chess)

Installation and Run

  1. Install the required dependencies:
    pip install flask chess
  2. Download the Stockfish engine and place the executable file (stockfish.exe) in the root directory of the project.
  3. Start the server:
    python app.py
  4. Open your browser and go to http://localhost:5000

Usage (API)

Send a POST request to /calculate with JSON data:

{
  "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
  "time": 1.0
}

Response:

{
  "best_move": "e2e4",
  "score": "+0.45",
  "pv": "e2e4 e7e5 g1f3 b8c6"
}

ChessBot

Локальный веб-сервис для анализа шахматных позиций на базе движка Stockfish.

Описание

Проект представляет собой Flask-приложение, которое принимает шахматные позиции в формате FEN и возвращает лучший ход, оценку позиции и основные варианты (PV), используя популярный шахматный движок Stockfish.

Требования

  • Python 3
  • flask
  • chess (python-chess)

Установка и запуск

  1. Установите необходимые зависимости:
    pip install flask chess
  2. Скачайте движок Stockfish и поместите исполняемый файл (stockfish.exe) в корневую папку проекта.
  3. Запустите сервер:
    python app.py
  4. Откройте в браузере http://localhost:5000

Использование (API)

Отправьте POST-запрос на /calculate с JSON-данными:

{
  "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
  "time": 1.0
}

Ответ:

{
  "best_move": "e2e4",
  "score": "+0.45",
  "pv": "e2e4 e7e5 g1f3 b8c6"
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages