Giter Club home page Giter Club logo

fairyfishnet's Introduction

fairyfishnet: distributed Fairy-Stockfish analysis for pychess.org

Installation

  1. Request your personal fairyfishnet key on pychess Discord https://discord.gg/aPs8RKr

  2. Install the fairyfishnet client.

    Via pip

    To install or upgrade to the latest version do:

    pip3 install --upgrade --user fairyfishnet
    

    Example usage:

    python3 -m fairyfishnet --auto-update
    

    Optional: Generate a systemd service file:

    python3 -m fairyfishnet systemd
    

    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
    

pychess-variants custom Fairy-Stockfish

fairyfishnet is using Fairy-Stockfish by @ianfab.

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

Overview

https://raw.githubusercontent.com/gbtami/fairyfishnet/master/doc/sequence-diagram.png

See protocol.md for details.

License

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

fairyfishnet's People

Contributors

niklasf avatar gbtami avatar ornicar avatar dependabot[bot] avatar lukhas avatar ianfab avatar srimethan avatar eolo999 avatar flevour avatar ageneau avatar theyobots avatar

Stargazers

Daniel Dugovic avatar  avatar Sean Sullivan avatar ELI JOSEPH BRADLEY avatar Daniel Wei avatar Abhijeet Gokar avatar Jérôme Zago avatar Andrei Biswas avatar Thomas Dybdahl Ahle avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

fairyfishnet's Issues

KeyError: 'score'

[fishnet v1.15.45] Analyzed 29742 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29742 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/ZfmTzQ1X (crazyhous><> 1: Played move in https://pychess-variants.herokuapp.com/ZfmTzQ1X (crazyhous><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/ZfmTzQ1X (crazyhouse) with lvl 5: 0.012s elapsed, depth 5
[fishnet v1.15.45] Analyzed 29746 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/ZfmTzQ1X (crazyhouse) with lvl 5: 0.007s elapsed, depth 5
[fishnet v1.15.45] Analyzed 29749 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/zOmGc41X (crazyhous><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) with lvl 4: 0.014s elapsed, depth 3     
[fishnet v1.15.45] Analyzed 29752 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) with lvl 4: 0.013s elapsed, depth 3
[fishnet v1.15.45] Analyzed 29755 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) wi><> 1: Played move in https://pychess-variants.herokuapp.com/J2CgM50L (shogi) with lvl 4: 0.012s elapsed, depth 3
[fishnet v1.15.45] Analyzed 29759 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/zOmGc41X (crazyhouse) with lvl 5: 0.006s elapsed, depth 5
[fishnet v1.15.45] Analyzed 29760 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/zOmGc41X (crazyhouse) with lvl 5: 0.013s elapsed, depth 5
[fishnet v1.15.45] Analyzed 29761 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29761 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29761 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29761 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29761 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29761 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29761 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/zOmGc41X (crazyhouse) with lvl 5: 0.012s elapsed, depth 5
[fishnet v1.15.45] Analyzed 29762 positions, crunched 2372 million nodes
><> 1: Played move in https://pychess-variants.herokuapp.com/zOmGc41X (crazyhouse) with lvl 5: 0.002s elapsed, depth 5
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fairyfishnet v1.15.45] Client is up to date
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
[fishnet v1.15.45] Analyzed 29763 positions, crunched 2372 million nodes
><> 1: Analysing shogi: https://pychess-variants.herokuapp.com/67MDoIPJ#536><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449542 nps 112217 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449545 nps 112217 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449550 nps 112219 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449555 nps 112220 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449558 nps 112221 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449563 nps 112222 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449566 nps 112223 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449571 nps 112224 hashfull 0 tbhits 0 time 4006 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449576 nps 112197 hashfull 0 tbhits 0 time 4007 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449579 nps 112198 hashfull 0 tbhits 0 time 4007 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449584 nps 112199 hashfull 0 tbhits 0 time 4007 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449588 nps 112200 hashfull 0 tbhits 0 time 4007 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449592 nps 112201 hashfull 0 tbhits 0 time 4007 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449596 nps 112202 hashfull 0 tbhits 0 time 4007 pv h5g5
><> 1: ENGINE: 1756 >> info depth 1 currmove h5g5 currmovenumber 1
><> 1: ENGINE: 1756 >> info depth 1 seldepth 2 multipv 1 score mate -185 lowerbound nodes 449598 nps 112203 hashfull 0 tbhits 0 time 4007 pv h5g5
><> 1: ENGINE: 1756 >> bestmove h5g5
><> 1: ENGINE: 1756 << position fen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL[-] w 0 1 moves c3c4 b8f8 h2d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g3f3 a1b1 f3f4 b1a2 f4f5 a2b2 f5f6 b2a1 f6f7 a1a2 f7f8 a2b2 f8e8 b2a1 f2e2 a1b2 e2e3 b2b1 e3e4 b1a2 e4e5 a2b1 e5e6 b1a2 e6e7 a2b1 i4i3+ b1a2 i3h3 a2b1 h3g3 b1a2 g3f3 a2b1 f3e3 b1a2 e3e4 a2b1 e4e5 b1b2 e5e6 b2b1 P@e4 b1a2 e4e3+ a2b1 e3e4 b1a2 e4e5 a2b2 P@f4 b2a2 f4f3+ a2b2 f3f4 b2a2 f4e4 a2b2 P@d3 b2a2 d3d2+ a2a1 d2d3 a1b2 d3c3 b2a2 c3b3 a2b1 b3a3 b1a1 d1h5 a1b1 g5f4 b1a1 P@e3 a1b1 e3e2+ b1c2 e2e3 c2c1 e3d3 c1b1 d3c3 b1c1 c3b3 c1b1 P@f5 b1a1 f4f2 a1b1 f5f4 b1c1 f4f3+ c1d1 f3f4 d1c1 f4f5 c1b1 f5f6 b1c1 f6f7 c1b1 f7f8 b1c1 P@f4 c1b1 f4f3+ b1a1 f3f4 a1b1 f4f5 b1c1 f5f6 c1b1 f6f7 b1c1 P@f4 c1b1 f4f3+ b1c1 f3f4 c1b1 f4f5 b1c1 f5f6 c1b1 P@f4 b1c1 f4f3+
><> 1: ENGINE: 1756 << go movetime 4000 nodes 500000
><> 1: ENGINE: 1756 >> 
><> 1: ENGINE: 1756 >> bestmove c1d1

><> 1: ERROR: Fatal error in worker
Traceback (most recent call last):
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 660, in run
    self.run_inner()
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 675, in run_inner
    path, request = self.work()
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 812, in work
    result = self.analysis(self.job)
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 907, in analysis
    if "mate" not in part["score"] and "time" in part and part["time"] < 100:
KeyError: 'score'
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 2055, in <module>
    sys.exit(main(sys.argv))
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 2039, in main
    sys.exit(commands[args.command](args))
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 1620, in cmd_run
    raise worker.fatal_error
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 660, in run
    self.run_inner()
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 675, in run_inner
    path, request = self.work()
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 812, in work
    result = self.analysis(self.job)
  File "/home/tamas/.local/lib/python3.6/site-packages/fairyfishnet.py", line 907, in analysis
    if "mate" not in part["score"] and "time" in part and part["time"] < 100:
KeyError: 'score'
tamas@zsuzsa:~/fairyfishnet$ 

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.