A few words regarding the windows compiles:
Senpai uses the C11++ Threading model. At first we thought this would make it easier to compile as this standard is already a few years old. Unfortunately it turned out C11++ Threading is (still) not well supported on windows.
I had to choose a compiler which supports C11++ Threading. The MinGW-w64 builds provide that. They don't support 32Bit-compiles though (at least I didn't find a package which does). That's the reason there is no 32Bit version.
For 64Bit there are two versions: one for modern processors which support SSE4.2 and one for older which don't.
There is a huge difference between those two binaries!
The SSE4.2 version is way faster! Overall +25% nps (and +50% in the starting position).
I ran a direct match and the SSE4.2 version scored +60 Elo. Speedup is probably the one thing which has an unproportional effect in selfplay. Still I have no doubt the SSE4.2 version is way stronger than the one for older processors.
Senpai 1.0 (new engine)
Moderators: hgm, Rebel, chrisw
-
- Posts: 127
- Joined: Sat Jan 22, 2011 7:14 pm
- Location: Lille, France
Re: Senpai 1.0 (new engine)
Did I write your signature?
-
- Posts: 154
- Joined: Thu May 31, 2007 9:05 pm
- Location: Madrid, Spain
Re: Senpai 1.0 (new engine)
Welcome back Fabien. It's really neat how you have organised your new engine, especially how the search function also handles quiescence. Wish you the best of luck with this project.
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Senpai 1.0 (new engine)
Yes, hence it deserves an own page, compact and general code, tiny loop body. It never crosses my mind.Xann wrote:Are you sure? This looks like the most basic way to do bitboards.
It's a bit cumbersome for the rooks in the opening with a full backrank
But as you said, fast in the endgame. It skips empty rays, and has no conditional code on the (sign of) the ray-directions. You may better precalc notBehind rather than using ~Behind
How to call it? It needs a name!
-
- Posts: 127
- Joined: Sat Jan 22, 2011 7:14 pm
- Location: Lille, France
Re: Senpai 1.0 (new engine)
I call it "blocker loop".
As for &~, I'll tell you why I never do that. I consider AND-NOT as a fundamental operation (I sometimes write it ANDN in my homemade byte-code). I know a bit about micro architecture, and see no reason why AND-NOT is not supported natively. It did exist in old processors (I vaguely remember the name BIC for Bit Clear). And it seems back in the recent SSE versions also (as improved bitwise operation).
As for &~, I'll tell you why I never do that. I consider AND-NOT as a fundamental operation (I sometimes write it ANDN in my homemade byte-code). I know a bit about micro architecture, and see no reason why AND-NOT is not supported natively. It did exist in old processors (I vaguely remember the name BIC for Bit Clear). And it seems back in the recent SSE versions also (as improved bitwise operation).
-
- Posts: 46
- Joined: Thu Jun 15, 2006 11:21 am
Re: Senpai 1.0 (new engine)
Did you try using the Ruben's build for the 32bit compiles?tralala wrote:A few words regarding the windows compiles:
Senpai uses the C11++ Threading model. At first we thought this would make it easier to compile as this standard is already a few years old. Unfortunately it turned out C11++ Threading is (still) not well supported on windows.
I had to choose a compiler which supports C11++ Threading. The MinGW-w64 builds provide that. They don't support 32Bit-compiles though (at least I didn't find a package which does). That's the reason there is no 32Bit version.
http://sourceforge.net/projects/mingw-w ... stdthread/
http://sourceforge.net/projects/mingw-w ... stdthread/
Kong Sian
-
- Posts: 5563
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Senpai 1.0 (new engine)
To compile on and for Linux I had to add -pthread (or it aborts with "terminate called after throwing an instance of 'std::system_error'"):tralala wrote:Senpai uses the C11++ Threading model. At first we thought this would make it easier to compile as this standard is already a few years old. Unfortunately it turned out C11++ Threading is (still) not well supported on windows.
I had to choose a compiler which supports C11++ Threading. The MinGW-w64 builds provide that. They don't support 32Bit-compiles though (at least I didn't find a package which does). That's the reason there is no 32Bit version.
Code: Select all
g++ -pthread -std=c++11 -O3 -finline-functions -funroll-all-loops -fno-rtti -msse4.2 -o senpai_10 senpai_10.cpp
Code: Select all
$ x86_64-w64-mingw32-g++ -std=c++11 -O3 -finline-functions -funroll-all-loops -fno-rtti -msse4.2 -o senpai.exe senpai_10.cpp
senpai_10.cpp:132:12: error: 'mutex' in namespace 'std' does not name a type
mutable std::mutex p_mutex;
^
senpai_10.cpp: In member function 'void util::Lockable::lock() const':
senpai_10.cpp:136:27: error: 'p_mutex' was not declared in this scope
void lock () const { p_mutex.lock(); }
^
(Despite the "mingw32" this should compile it for x86-64, unless I add -m32.)
Last edited by syzygy on Mon Mar 17, 2014 8:55 pm, edited 1 time in total.
-
- Posts: 1280
- Joined: Tue Aug 18, 2009 3:06 am
Re: Senpai 1.0 (new engine)
Welcome back! Great news...... Thank-you!Xann wrote:Hi all,
I have recently regained interest in computer chess. By a coincidence (or fate?), Joachim Rang and Ryan Benitez are also active once again.
I have been working on a new GPL engine: Senpai.
The highlights compared to Fruit are:
- from-scratch engine (no Fruit code)
- plain bitboards (I will implement magic bitboards later)
- more precise mobility (safety, centre weights)
- evaluation of tactical moves: captures and checks
- late-move pruning (last few plies)
- more aggressive futility pruning
- SMP
The download page: http://www.chessprogramming.net/senpai/
Direct link: http://goo.gl/H0h1Jd
Estimated level: Protector or better (don't ask).
Have fun with Senpai!
Fabien.
-
- Posts: 127
- Joined: Sat Jan 22, 2011 7:14 pm
- Location: Lille, France
Re: Senpai 1.0 (new engine)
Hi Ronald.
Thanks for the info.
We know these errors very well. Your compiler does not support std::thread.
Thanks for the info.
We know these errors very well. Your compiler does not support std::thread.
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Senpai 1.0 (new engine)
Blocker loop already coined by Reul's new none bitboard architecture.
How about "Blockers and Beyond"?
SSE2 has andn, x64 gp not, which is likely used and may take one extra register. But that was a small joke anyway, leave it to the compiler
How about "Blockers and Beyond"?
SSE2 has andn, x64 gp not, which is likely used and may take one extra register. But that was a small joke anyway, leave it to the compiler