Skip to main content

Distributed Stockfish analysis for lichess.org

Project description

pypi package

Outdated

Fishnet 2.x is no longer distributed as a Python package. Please visit https://github.com/niklasf/fishnet and update manually.

Installation

  1. Request your personal fishnet key: https://lichess.org/get-fishnet

  2. Install the fishnet client.

    Via pip

    To install or upgrade to the latest version do:

    pip install --upgrade --user fishnet

    Example usage:

    python -m fishnet --auto-update

    Other useful commands:

    python -m fishnet configure  # Rerun the configuration dialog
    python -m fishnet systemd  # Generate a systemd service file
    python -m fishnet --help  # List all commands and options

    Via Docker

    There is a Docker container courtesy of @mklemenz. For example you can simply do:

    docker run mklemenz/fishnet --key MY_APIKEY --auto-update

Video tutorial

Introduction video

FAQ

Which engine does fishnet use?

fishnet is using a fork of Stockfish (hence the name) with multi-variant support by @ddugovic, @ianfab et al.

You can build Stockfish yourself (for example with ./build-stockfish.sh) and provide the path using python -m fishnet --stockfish-command. Otherwise a precompiled binary will be downloaded for you.

What are the requirements?

  • Precompiled Stockfish binaries available for Linux, Windows and OS X on Intel and AMD CPUs

  • Python 3.3+ or 2.7

  • Will max out the number of configured CPU cores

  • Uses a default of 256 MiB RAM per engine process, spawns one process for each group of ~3 cores

  • A small amount of disk space

  • Low-bandwidth network communication with Lichess servers (only outgoing HTTP requests, so probably no firewall configuration required)

Is my CPU fast enough?

Almost all processors will be able to meet the requirement of 4 meganodes in 6 seconds. Clients on the faster end will automatically be assigned analysis jobs that have humans waiting for the result (the user queue, as opposed to the system queue for slower clients).

What happens if I stop my client?

Feel free to turn your client on and off at any time. By default, the client will try to finish any jobs it has already started. On immediate shutdown, the client tries to inform Lichess that jobs should be reassigned. If even that fails, Lichess will reassign the jobs after a timeout.

Will fishnet use my GPU?

No, Stockfish is a classical alpha-beta engine. (Supporting Lc0 analysis is a future prospect.)

Is fishnet secure?

To the best of our knowledge. All network communication uses modern TLS. However you implicitly trust the authors, PyPI infrastructure when running with --auto-update, the CI infrastructure when using precompiled Stockfish binaries, and Lichess to not exploit potential vulnerabilities in Stockfish’s UCI implementation. You can mitigate all of these by running fishnet as an unprivileged user.

Is there a leaderboard of contributors?

No, sorry, not publically. It would incentivize gaming the metrics.

Is there a Docker image?

Yes, see the installation instructions above.

Can I autoscale fishnet in the cloud?

There is currently no ready-made solution, but an API for monitoring the job queue status is provided.

Protocol

https://raw.githubusercontent.com/niklasf/fishnet/master/doc/sequence-diagram.png

See protocol.md for details.

License

fishnet is licensed under the GPLv3+. See LICENSE.txt for the full license text.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fishnet-1.18.2.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

fishnet-1.18.2-py2.py3-none-any.whl (36.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fishnet-1.18.2.tar.gz.

File metadata

  • Download URL: fishnet-1.18.2.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for fishnet-1.18.2.tar.gz
Algorithm Hash digest
SHA256 cc3e72b828925ae47440ee368759b3177f039b057bd945538001527fdb945dba
MD5 6e7d9466683d81a552a23405904f3151
BLAKE2b-256 e863a43e98de346dd740eedd88a1148c3155ae4654dd41832ac546e9e40ba4ae

See more details on using hashes here.

File details

Details for the file fishnet-1.18.2-py2.py3-none-any.whl.

File metadata

  • Download URL: fishnet-1.18.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 36.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for fishnet-1.18.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9cec23129ad1cf0ec0bfe65e6bece1869a688dca8639db9a4cfae4ece83195da
MD5 a4d7b1d76770dab32588646d6ea711ee
BLAKE2b-256 436e8c6400bb4fece2fba2116015b7883e06310f63b24bdef664100f1e96b4c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page