GithubHelp home page GithubHelp logo

noobpwnftw / chessdb Goto Github PK

View Code? Open in Web Editor NEW
58.0 58.0 17.0 1.84 MB

ChessDB

License: The Unlicense

C# 12.79% PHP 14.50% C 37.24% C++ 20.25% M4 0.20% Python 0.07% JavaScript 10.68% HTML 3.56% CSS 0.70%

chessdb's People

Contributors

dubslow avatar noobpwnftw 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chessdb's Issues

DTM棋规问题

这是其他人发现的问题,他设置了局面进入云库DTM则完全按云库首选出招,结果这让云库和引擎均认为速胜的局面,出现了不变作和。
Screenshot_20230111_114155_Chrome
如图所示,红方有四种29978首选,当选择其一后,轮到黑方就会如下图显示
Screenshot_20230111_114247_Chrome
黑方首选将会避开棋规走-29979的着法,而不会走-29978的着法,正常来说,只有黑方会进入违规循环(长将、亚规长捉)才会出现这种情况。但是这里黑方可以一将一捉(n将n捉)来让红方一直保持29978的困顿境地(红方可以炮车一线,再将军来让炮左移,引擎也会这么做但是DTM不会,因为DTM认为这不是最快的)
红方用云库首选,黑方一将一捉和棋示例如下:
9/3k5/9/9/9/4R4/9/3r1C3/4K4/9 w moves f2f6 d2d1 e1e0 d1d6 f6f5 d6d5 f5f6 d5d0 e0e1 d0d6 f6f7 d6d7 f7f3 d7d3 f3f5 d3d1 e1e0 d1d5

License?

Do you (or the author if it is someone else) intend to release this repository under an open source license?

云库对于长将的判断问题

nooby大佬好呀,我发现了一个不知道是不是问题的问题。
这个fen:3ak3C/4a2R1/9/4p3p/2r1rcR2/4C4/1n2P3P/B3B4/4A4/1c2KA3 w moves g5g9 f5f9 g9g5 f9f5 h8h9 e8f9 h9h6 f9e8 g5g9 f5f9 g9g7 f9f3 g7g9 f3f9 g9g8 f9f1 g8g9 f1f9 g9g2 f9f2 g2g9 f2f9 g9g6 f9f6 h6h9 f6f9 h9h3 f9f6 g6g9 f6f9 g9g8 f9f7 h3h9 f7f9 h9h0 f9f7 g8g9 f7f9 g9g6 f9f6.
红方好像一直在将军,这种将军算长将吗,是合乎亚规的吗?

JSON Server Stats

Add a json=1 parameter for https://www.chessdb.cn/statsc.php

Concept response

{
    "status": "ok",
    "positions": 15000000000,
    "queue": {
        "scoring": 100000,
        "sieving": 5000000
    },
    "worker": {
        "backlog": 170000,
        "speed": 400000000
    },
    "egtb": {
        "count": {
            "wdl": 1511,
            "dtz": 1511
        },
        "size": {
            "wdl": 9389829301207,
            "dtz": 9158931859374
        }
    }
}

能否麻烦您将一些dtm库上传至云库

您好,我跑了云库以外的一些dtm库,诸如KRPKNNP,KRPKCCP,KRPAAKNNAA,KRPBKNNAA,KRCBBKRAAB,KCCAAKNPB,KCCAAKCPB等等,共16个组合,想麻烦您上传至云库,但找不到联系方式,只找到您的github,所以在此留言,可否?谢谢。

One EGTB position returns only searchmoves and malformed JSON

For this position: 8/3R2p1/4P2k/8/6K1/4r3/8/8 b - - 0 47 only searchmoves are returned despite there are only 6 pieces left.

json=0

search:e3e1|search:e3e2|search:e3a3|search:e3b3|search:e3c3|search:e3e4|search:e3e5|search:h6g6|search:h6h7|search:g7g6|search:g7g5|search:e3e6

Querying this position with json=1 returns malformed JSON:

{"status":"ok","search_moves":[{"uci":"","san":"Re1},{"uci":"","san":"Re2},{"uci":"","san":"Ra3},{"uci":"","san":"Rb3},{"uci":"","san":"Rc3},{"uci":"","san":"Re4+},{"uci":"","san":"Re5},{"uci":"","san":"Kg6},{"uci":"","san":"Kh7},{"uci":"","san":"g6},{"uci":"","san":"g5},{"uci":"","san":"Rxe6}]}
SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 56 of the JSON data

Rule clarifications

From fairy-stockfish/Fairy-Stockfish#55 (comment)

Current implementation adjudicates all perpetual chases on rooks as lose with well defined exceptions.
Problem arise that AXF rule states that chases by knights and cannons are forbidden(http://www.asianxiangqi.org/English/AXF_rules_Eng.pdf §3.6), in which discovered attacks on rooks from bishops are not clearly defined, while it is somewhat implied from §3.6 that rooks should not be chased by minor pieces and in example 25 the rule book mentions discovered attacks from cannons. Giving perpetual bishop discovered attacks on rooted rooks(advisors cannot formulate such a perpetual) a special case creates other complications such as whether to consider attacks from bishops(and advisors) on rooks in other forms of chases as well, and of course, more work to change code.

Also there is a translation error in the rule book §3.6. I think it is in the best interest of everyone if AXF can have a revised version of the rule book in this regard.

Wrong SAN in JSON

It happened a couple of times already, the san says "takes" but there is no piece to be taken in that square. Initially, this seems to be related to double pawn pushes.


Queryall example

Position

r4rk1/p2q2pp/4p3/2p1PpB1/1b2N3/5P2/PPQ2P1P/2K3R1 w - f6 0 19

JSON response

https://www.chessdb.cn/cdb.php?action=queryall&json=1&board=r4rk1/p2q2pp/4p3/2p1PpB1/1b2N3/5P2/PPQ2P1P/2K3R1%20w%20-%20f6%200%2019

Nxf6+ is not correct, Nf6+ is

{
  "status": "ok",
  "moves": [
    {
      "uci": "e4f6",
      "san": "Nxf6+",
      "score": 418,
      "rank": 2,
      "note": "! (04-00)",
      "winrate": "78.02"
    },
    {
      "uci": "e5f6",
      "san": "exf6",
      "score": 306,
      "rank": 0,
      "note": "? (02-00)",
      "winrate": "71.65"
    },
    {
      "uci": "e4d6",
      "san": "Nd6",
      "score": -217,
      "rank": 0,
      "note": "? (01-01)",
      "winrate": "34.13"
    },
    {
      "uci": "g1d1",
      "san": "Rd1",
      "score": -302,
      "rank": 0,
      "note": "? (02-01)",
      "winrate": "28.59"
    },
    {
      "uci": "g5f6",
      "san": "Bxf6",
      "score": -538,
      "rank": 0,
      "note": "? (02-01)",
      "winrate": "16.38"
    }
  ]
}

Querypv example

Position

2r1k2r/p4ppp/1pn1b3/2q5/8/2P1PNP1/4BP1P/1R1Q1RK1 w k - 0 20

JSON response

https://www.chessdb.cn/cdb.php?action=querypv&json=1&board=2r1k2r/p4ppp/1pn1b3/2q5/8/2P1PNP1/4BP1P/1R1Q1RK1%20w%20k%20-%200%2020

Bxh3 is not correct, Bh3 is

{
  "status": "ok",
  "score": 5,
  "depth": 21,
  "pv": [
    "h2h4",
    "e6h3",
    "f1e1",
    "h7h6",
    "g1h2",
    "h3g4",
    "d1a4",
    "g4f3",
    "e2f3",
    "e8g8",
    "f3c6",
    "c8c6",
    "a4a7",
    "c5c3",
    "h2g1",
    "f8c8",
    "a7b7",
    "g7g6",
    "e1d1",
    "c3c2",
    "d1f1"
  ],
  "pvSAN": [
    "h4",
    "Bxh3",
    "Re1",
    "h6",
    "Kh2",
    "Bg4",
    "Qa4",
    "Bxf3",
    "Bxf3",
    "O-O",
    "Bxc6",
    "Rxc6",
    "Qxa7",
    "Qxc3",
    "Kg1",
    "Rfc8",
    "Qb7",
    "g6",
    "Red1",
    "Qc2",
    "Rf1"
  ]
}

Request snapshot

Hello, could I have a database snapshot (for chess), please?

Thanks,

云库局面分数bug

云库一个局面的分数似乎出现了bug
1rbaka3/4nr3/2n1PN3/pcR5p/2p6/9/P1P5P/2c1B4/4C4/2BAKA2R b
这个局面中象3进5被错误记录为-29997,而且负的绝杀奇数不应该出现。
Screenshot_20231110_234718_Chrome

后续会变成-29999。
Screenshot_20231110_234733_Chrome

try position best move but nomove found

I try to get the best move from this position: rnbqkbnr/ppppp2p/8/5pp1/4PP2/8/PPPP2PP/RNBQKBNR but no move found
but when I ask to provide follow-up move information for a position this is the response: score:29999,depth:1,pv:d1h5
the best move api doesn't work

Rough API usage limits

Hi,

thanks for the project. Do you have any rough guidelines about API usage? I see you say something about "large amounts of queries" which I assume is going to be way more generous than I'll need, but I figured I'd ask anyway. You could maybe add them to the readme as well.

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.