Comments (7)
うおー。そうでした…(´ω`)
修正しておきます。
from yaneuraou.
あと、受け方が王手回避で逆王手になったときに、これは詰みを逃れているという判定にする必要があって、以下のようにコードを修正したのですけど、3手詰めを入れるとメモリを破壊しているのか、undo_move()で落ちるようになりました。原因を調査している時間がないので…何かわかったら教えてください。(他力本願)
for (auto m2 : MoveList<EVASIONS>(*this))
{
// この指し手で逆王手になるなら、不詰めとして扱う
if (gives_check(m2))
goto NEXT_CHECK;
from yaneuraou.
legal()判定忘れてました(´ω`) 修正しておきました。
from yaneuraou.
修正後の下記の部分、「!」が足りないような気がいたします。
「敵玉以外に敵の利きが無ければ」だと思いますので...
// toに利かせている駒から玉を取り除いて、toに利かせている駒があれば。
(attackers_to(them,to,pieces()) ^ king_square(them))
from yaneuraou.
うおー、ほんまですね!私の日本語が不自由でした(´ω`) その不自由な日本語をそのままソースコードに落として間違ったコードになってました。申し訳ない。時間なくてテストしてないもんで…。
from yaneuraou.
電王トーナメント直前のお忙しいところ、度々の追記になりましてすいません。
もしN手詰めはそれほど重要ではない場合は無視してください。
weak_mate_n_ply()は「利きのある場所への取れない近接王手からのN手詰め」とのことですが、
味方の利きのeffected_to(us, to)についても意図と異なる結果になっているように思えてきました。
・駒打ち以外の移動手の場合、toには移動した駒の利きがあったはずなので、effected_to(us, to)は常にtrueになってしまう。
→ attackers_to()の結果からfrom_sqを除外する。
・飛車先の歩を突いた場合など、長い利きの影の利きを考慮する。
→ from_sqを除外したoccupied bitboardをattackers_to()に渡す。
LONG_EFFECT_LIBRARYを使う場合を含めて、effected_to(us, to)の部分は以下のように書き換えられるかと考えましたが、いかがでしょうか?
もしバグがありましたらすいません。
#ifndef LONG_EFFECT_LIBRARY
(is_drop(m) ? effected_to(us, to) : (attackers_to(us, to, pieces() ^ from_sq(m)) ^ from_sq(m)))
#else
(is_drop(m) ? effected_to(us, to) :
board_effect[us].effect(to) >= 2 ||
(long_effect.directions_of(us, from_sq(m)) & Effect8::directions_of(from_sq(m), to)) != 0)
#endif
from yaneuraou.
うおー。ほんまですね。修正します(´ω`) ご指摘、感謝!!
N手詰め入れて、強くなるのかどうかはよくわからんですが、npsだだ下がり(10%ぐらい下がる?)なので、たぶん弱くなります…。
from yaneuraou.
Related Issues (20)
- Running YaneuraOu in the browser HOT 2
- 突然自陣内にて飛車を成ってしまう HOT 1
- Can this software be used by overseas users? HOT 1
- There are some problems with the software initialization on my computer HOT 3
- 駒落ち戦の宣言法 HOT 9
- Question - Ubuntu HOT 2
- 更新履歴の誤字 HOT 1
- 6.50でのベンチマーク計測時のTotal Timeが異常に大きい HOT 1
- Wikiのよくある質問の誤字 HOT 1
- A suspected memory leak has occurred. HOT 3
- Ubuntu compiler warning
- material v9 が生成されない HOT 1
- gensfen not implemented for material evallearn HOT 1
- 角歩の不成を含む詰みが読めない HOT 2
- いつまでたっても読みが深くならない HOT 1
- vectorの要素数が更新されないバグ HOT 2
- Cannot use FukauraOu HOT 6
- `setoption name UCT_NodeLimit value 20000000` で変えられない HOT 1
- Wrong evaluation HOT 11
- Resign_thresholdが効いていない? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yaneuraou.