GithubHelp home page GithubHelp logo

hiraokatakuya / apery Goto Github PK

View Code? Open in Web Editor NEW
271.0 271.0 54.0 6.51 MB

a USI Shogi engine.

Home Page: https://hiraokatakuya.github.io/apery

License: GNU General Public License v3.0

C++ 96.15% Makefile 1.05% Ruby 2.71% Emacs Lisp 0.09%

apery's People

Contributors

ddugovic avatar hiraokatakuya avatar kenbin avatar tttak 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  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  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

apery's Issues

linuxでのマニュアル

linux でのマニュアルを書いていただけませんか?
自分でmakeして ./apery をした時の動作が少しおかしくて、正しい手順に従っているのかわからないからです。

一応、自分でもいろいろソースをいじって、以下の事がわかりました。
evaluate.hpp の 853行目のループが延々と行われていて、フリーズしているような感じになっていました。
apery_binariesからbook.binを同じディレクトリに置いて起動しても、同じでした。

また、windows板だと起動にさほど時間もかかりませんので、何か違う感じになっているのではと思います。
環境: ubuntu14.04

Apery(WCSC26)の評価関数ファイルについて

Apery(WCSC26)の評価関数ファイルについて。

問題点1) kppテーブルなのですがkpp[k][p1][p2]に対して、p1==0 もしくは p2==0のときに、値がゼロにならない。(ゴミが入っている)

駒落ちのとき、BonaPiece == 0としたいので、ここにゴミが入っていると駒落ちでの局面評価がおかしくなります。ここ、ゼロで埋めていただけないでしょうか。kkpテーブルも同様にkkp[k1][k2][0]に対してゴミが入っています。

問題点2) kkpテーブルのkkp[k1][k2][p]に対して、p == e_hand_pawn-1のような0枚目の手駒に対する値が0になっていない。

実際にはこの要素は参照しませんが、ここにゴミが入っていると、assert(kkp[k1][k2][p][0] == -kkp[~k2][k1][p][0]);のようなassertが通らなくなってしまいます。(Squareに対してsqは180度回転した升を返す演算子、BonaPieceに対してpは(盤上の駒であれば180度回転させ)、相手の駒にする演算子だとします。)

問題点3) kpp[k1][p1][p2] != kpp[k1][mirror(p1)][mirror(p2)] ただし、file_of(k1) == FILE_5

玉が5筋にいるときに、kppの要素が左右のミラーに対して対称性がありません。玉が5筋以外にいるときは対称性があるので学習上の何らかのバグでノイズを入れてしまっているのではないかと思います。当然ながら、ここは対称にしたほうが棋力的にも強くなるのではないかと思います。

例) kpp[SQ_51][f_hand_pawn][f_pawn + SQ_12] != kpp[SQ_51][f_hand_pawn][f_pawn + SQ_92]
※ 玉が51にいて、「先手の手駒の1枚目の歩」と、「盤上の12の歩」というkpp値が、この12の歩を92に移動させたときのものと同じ値でないといけないはずなのに、そうはなっていません。

急ぎませんので、次回、評価関数バイナリを公開されるときにでも直っていれば嬉しいです。

投了値

新しいAperyダウンロードしました。
投了値の設定を変更したいのですが、どの項目が投了値でしょうか?
やねうら王でApery使わず、Apery単体で使いたいので、Aperyの方に投了値設定を追加してもらうしかないのでしょうか?

Go command needs to parse the "searchmoves"

The go command currently searches all possible moves. The draft USI shogi interface for the GO command (http://www.glaurungchess.com/shogi/usi.html) recommends to have a "searchmoves" parameter. This would allow for easier implementation of analyzing games as well as an easy way to force certain opening styles. Is there any chance this can be implemented? (i can see line 174/175 in usi.cpp needs to be changed, but i am not a c++ developer).

検討モード使用の場合

検討モードで使用の場合、ここの10月13日の最新じゃなく10月7日の電王戦直前更新バージョンの使用でいいのでしょうか?
変わらないですよね?(検討モードの場合で長時間考えさせたりすることにしか使用しません)

Position::see()のattackers &= occ;について

細かいことで恐縮ですが、この
https://github.com/HiraokaTakuya/apery/blob/master/src/position.cpp#L607
attackers &= occ;の場所が悪い気がします。

すでに処理した駒を除外するためにどこかにこの処理は必要ですが、この処理はここ
https://github.com/HiraokaTakuya/apery/blob/master/src/position.cpp#L591
と、nextAttacker()のKING以外を返すときにやるほうが良いように思います。

そうすると、

  1. moveが駒打ちでwhileループでKINGをnextAttackers()で発見したときに、
    attackers &= occの回数が一回少なくてすみます。
  2. whileループのなかにattackers &= occがあると可読性が少し良くなります。
    (この処理はnextAttacker()に関連する処理なのでそちらでなされて欲しいです。)

Shogidokoro debug files - ShogiGUI (English translation)

Hello Hiraoka,

Apery application is very strong and beats most of its opponents!!

Could you please download ShogiGUI http://shogigui.siganus.com/ and make an English translation of all commands like new game-engine tournament-add engine etc.?

I have some problems with the implementation of these chess engines and Shogidokoro-Interface http://www.geocities.jp/shogidokoro/download.html

Kifu Warabe 1.15 http://grayscale.iza-yoi.net/shogi/download.html can be implemented, but before its first move appears this message: "DII Not Found Exception Unable to load dll Lua52. The specified module was not found. Exception from HRE Result 0x8007007E (annotation: previous versions show not such a behaviour, but play illegal moves) - by the way: download of lua52.dll http://api.256file.com/download/97466_lua52.dll and replace the existing lua52.dll by this file does not solve this problem - it was tried to load a file with the wrong format (Bad Image Format Exception) - a 5-min-byoyomi engine-match vs. Lesserkai 1.4.1 (built-in) or other USI Shogi software is impossible
Debug - Windows

C:usi
<C:option name ? type check default true
<C:option name USI type spin default 2 min 1 max 13
<C:option name ? type combo default tiger var ??? var ?? var tiger var ?? var ? var ?? var ? var ??? var ???? var ??? var ??? var ????
<C:option name ? type button default ???
<C:option name ? type string default DRAGON
<C:option name ? type filename default ????.html
<C:id name KifuWarabe
<C:id author TAKAHASHI Satoshi
<C:usiok
C:quit

Sjaak 1.3.1a MS x64 http://www.eglebbk.dds.nl/program/chess-download.html plays Shogi like Nebiyu 1.45 https://sites.google.com/site/dshawul/home on WinBoard GUI 4.8.0 Interface http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=51528 (WinBoard-protocol) but does not work with Shogidokoro 3.7.2 > "not an USI engine", although you can obtain this output by hand:

[Chess] 0w>usi

id name Sjaak II 1.3.1a (x86_64)
id author Evert Glebbeek
option name Hash type spin default 48 min 1 max 4096
option name Ponder type check default true
option name UCI_Chess960 type check default true
option name UCI_Variant type combo default shogi var chess var chess960 var seirawan var shatar var makruk var shatranj var sittuyin var crazyhouse var chessgi var asean var ai-wok var super var spartan var pocketknight var kingofthehill var knightmate var berolina var losalamos var micro var capablanca var gothic var embassy var greatshatranj var courier var grand var opulent var omega var minishogi var shoshogi var shogi var torishogi var xiangqi
Debug - Windows
usiok

C:usi
<C:Sjaak II version 1.3.1a (x86_64)
<C:Type 'help' for a list of commands and help topics
<C: 8r n b q k b n r
<C: 7p p p p p p p p
<C: 6
<C: 5
<C: 4
<C: 3
<C: 2P P P P P P P P
<C: 1R N B Q K B N R *
<C: a b c d e f g h
<C:#[Chess] 0w>

Tanuki WCSC 26 https://github.com/nodchip/tanuki-/releases/tag/WCSC26 - it seems that most applications are suited to Haswell computers , but even SSE42 GCC Lazy SMP.exe cannot be embedded> "not an USI engine", although a double mouse-click on this executable is functioning with Windows 7 SP1 64 bit - all extracted binaries are be located into the folder "Apery/bin"; Apery WCSC 26 cf. https://github.com/HiraokaTakuya/apery/releases
Debug - Windows

C:usi
C:usi
<C:info string start setting eval table

WinBoard http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=51528 and
http://home.hccnet.nl/h.g.muller/shokidoki.html supports Shogi too. Have you tried out v4.8.0 in combination with your engine?

regards, ChessGUI

Bitboard::operator == ()の実装について。

提案を書きたいのですが、GitHubで提案の仕方がよくわからないので、issueに書かせてもらいます。おかしかったら消してください。

Bitboard::operator ==()の実装なのですが、SSE4用は
return (mm_testc_si128(mm_cmpeq_epi8(this->m, rhs.m), _mm_set1_epi8(static_cast(0xffu))) ? true : false);
こうなっていますが、これは以下のようにすると2命令で済みます。
__m128i neq = _mm_xor_si128(this->m, rhs.m);
return _mm_test_all_zeros(neq, neq) ? true : false;

あと別件ですが、firstOneFromMSB()なのですが、63-indexを返してありますが、あれやめて、素直にindexを返したほうがよっぽどすっきりすると思います。関数名もMSB()とかに変更して。そうすればtt.cppでメモリ確保するときにMSB求めるのも、63 - firstOneFromMSB()みたいなことしなくて済みますし、何よりそちらのほうが直感的でわかりやすいです。

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.