New engine: Xiphos

Discussion of anything and everything relating to chess playing software and machines.

Moderators: Harvey Williamson, Dann Corbit, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
CMCanavessi
Posts: 910
Joined: Thu Dec 28, 2017 3:06 pm
Location: Argentina

Re: New engine: Xiphos

Post by CMCanavessi » Thu Mar 01, 2018 1:06 am

mt wrote:
Ras wrote:
mt wrote:Oh, thanks for the report, i can indeed replicate that for 4GB hash. 2GB works fine for me.
I'd look for some variable that is of type int but should be size_t or ssize_t.
Exactly! I fixed the issue and updated binaries.
Thanx, the hash issue looks solved indeed. The engine still reports that the max hash size is 4096 mb, yet you can set any value... i tried 8gb and it worked.

There's a new issue though, the magic version is way slower than before, in my Ryzen system it's as slow as the bmi2 version (which on all ryzen procs is bugged).

Before and now:

perft(6)=119060324, time: 473ms, nps: 251182118 (no hashing, bulk counting)
perft(6)=119060324, time: 1333ms, nps: 89250617 (no hashing, bulk counting)

Are you sure your magic version is not using bmi2? That 1333ms is exactly what I was getting with the bmi2 version.
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls

mt
Posts: 29
Joined: Tue Feb 27, 2018 6:00 am
Contact:

Re: New engine: Xiphos

Post by mt » Thu Mar 01, 2018 1:13 am

CMCanavessi wrote:
Before and now:

perft(6)=119060324, time: 473ms, nps: 251182118 (no hashing, bulk counting)
perft(6)=119060324, time: 1333ms, nps: 89250617 (no hashing, bulk counting)

Are you sure your magic version is not using bmi2? That 1333ms is exactly what I was getting with the bmi2 version.
oh, that was a terrible mistake. updated now, sorry for the trouble.

User avatar
CMCanavessi
Posts: 910
Joined: Thu Dec 28, 2017 3:06 pm
Location: Argentina

Re: New engine: Xiphos

Post by CMCanavessi » Thu Mar 01, 2018 1:37 am

mt wrote:
CMCanavessi wrote:
Before and now:

perft(6)=119060324, time: 473ms, nps: 251182118 (no hashing, bulk counting)
perft(6)=119060324, time: 1333ms, nps: 89250617 (no hashing, bulk counting)

Are you sure your magic version is not using bmi2? That 1333ms is exactly what I was getting with the bmi2 version.
oh, that was a terrible mistake. updated now, sorry for the trouble.
Awesome! Now it is perfect:

Code: Select all

Xiphos 0.1 by Milos Tatarevic
threads=1
hash=128MB
perft 6
perft(6)=119060324, time: 451ms, nps: 263407796 (no hashing, bulk counting)
setoption name Hash value 4096
hash=4096MB
go depth 25
info depth 1 score cp 22 nodes 1 time 1 nps 500 pv g1h3
info depth 1 score cp 66 nodes 2 time 1 nps 1000 pv g1f3
info depth 2 score cp 0 nodes 43 time 1 nps 21500 pv g1f3
info depth 3 score cp 66 nodes 214 time 1 nps 107000 pv g1f3
info depth 4 score cp 7 nodes 589 time 1 nps 294500 pv g1f3
info depth 5 score cp 18 nodes 802 time 1 nps 401000 pv g1f3
info depth 5 score cp 38 nodes 978 time 2 nps 326000 pv g1f3
info depth 5 score cp 37 nodes 1405 time 2 nps 468333 pv g1f3
info depth 5 score cp 46 nodes 2067 time 3 nps 516750 pv b1c3
info depth 6 score cp 21 nodes 2824 time 3 nps 706000 pv b1c3
info depth 7 score cp 21 nodes 3793 time 4 nps 758600 pv b1c3
info depth 8 score cp 23 nodes 9570 time 7 nps 1196250 pv g1f3
info depth 8 score cp 25 nodes 11620 time 8 nps 1291111 pv e2e4
info depth 9 score cp 35 nodes 13797 time 10 nps 1254272 pv e2e4
info depth 9 score cp 40 nodes 14603 time 10 nps 1327545 pv e2e4
info depth 10 score cp 30 nodes 23283 time 16 nps 1369588 pv e2e4
info depth 11 score cp 40 nodes 32477 time 22 nps 1412043 pv e2e4
info depth 11 score cp 43 nodes 47092 time 30 nps 1519096 pv e2e4
info depth 12 score cp 45 nodes 86378 time 54 nps 1570509 pv e2e4
info depth 13 score cp 33 nodes 161843 time 96 nps 1668484 pv g1f3
info depth 14 score cp 17 nodes 242678 time 140 nps 1721120 pv g1f3
info depth 15 score cp 27 nodes 353585 time 202 nps 1741798 pv g1f3
info depth 15 score cp 24 nodes 382520 time 220 nps 1730859 pv g1f3
info depth 16 score cp 25 nodes 600467 time 342 nps 1750632 pv e2e4
info depth 17 score cp 34 nodes 1039654 time 585 nps 1774153 pv e2e4
info depth 18 score cp 27 nodes 1372481 time 768 nps 1784760 pv e2e4
info depth 19 score cp 37 nodes 1948211 time 1088 nps 1788990 pv e2e4
info depth 19 score cp 41 nodes 2290922 time 1277 nps 1792583 pv e2e4
info depth 20 score cp 51 nodes 4023150 time 2248 nps 1788861 pv e2e4
info depth 20 score cp 46 nodes 4091112 time 2286 nps 1788855 pv e2e4
info depth 21 score cp 35 nodes 6352202 time 3615 nps 1756693 pv e2e4
info depth 22 score cp 45 nodes 7647453 time 4353 nps 1756420 pv e2e4
info depth 22 score cp 45 nodes 8049184 time 4580 nps 1757080 pv e2e4
info depth 23 score cp 32 nodes 14970468 time 8489 nps 1763306 pv e2e4
info depth 24 score cp 13 nodes 25475146 time 14353 nps 1774776 pv e2e4
info depth 25 score cp 13 nodes 35101098 time 19825 nps 1770457 pv e2e4
bestmove e2e4
It looks like it's ready for my tournament... will have to wait till the end of March for it to start though, as Season 2 is currently ongoing. :D
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls

mt
Posts: 29
Joined: Tue Feb 27, 2018 6:00 am
Contact:

Re: New engine: Xiphos

Post by mt » Thu Mar 01, 2018 3:41 am

AndrewGrant wrote:Tested against latest release of Ethereal

Code: Select all

Ethereal 9.00 vs Xiphos 0.1: 471 - 255 - 274  [0.608] 1000 @  5s+.05s +76
Ethereal 9.00 vs Xiphos 0.1:  182 - 97 - 121  [0.606]  400 @ 20s+.20s +75
This would have Xiphos (1CPU) around 2900 on CCRL.

To be honest I expected your 3000 elo estimate to be a gross over estimate.
But you have proved my expectation wrong. Xiphos is quite strong.

I scrolled through the source for a few minutes. Reminds me of Demolito.
Everything is very simple, and very clean. I expect you to find a great many more improvements.
I was getting quiet different results when tested locally, so I worked with Andrew trying to figure out what happened.

It appears that the results above were for BMI2 version running on Ryzen. Andrew was very kind to rerun the tests:

Code: Select all

Score of Ethereal 9.00 vs Xiphos 0.1: 296 - 436 - 268  [0.430] 1000 @ 40/4.0s  1CPU 
Score of Ethereal 9.00 vs Xiphos 0.1: 327 - 386 - 287  [0.470] 1000 @ 40/4.0s  3CPU 
Score of Ethereal 9.00 vs Xiphos 0.1: 225 - 270 - 225  [0.469] 720  @ 40/20.0s 1CPU

User avatar
CMCanavessi
Posts: 910
Joined: Thu Dec 28, 2017 3:06 pm
Location: Argentina

Re: New engine: Xiphos

Post by CMCanavessi » Thu Mar 01, 2018 3:45 am

mt wrote:
AndrewGrant wrote:Tested against latest release of Ethereal

Code: Select all

Ethereal 9.00 vs Xiphos 0.1: 471 - 255 - 274  [0.608] 1000 @  5s+.05s +76
Ethereal 9.00 vs Xiphos 0.1:  182 - 97 - 121  [0.606]  400 @ 20s+.20s +75
This would have Xiphos (1CPU) around 2900 on CCRL.

To be honest I expected your 3000 elo estimate to be a gross over estimate.
But you have proved my expectation wrong. Xiphos is quite strong.

I scrolled through the source for a few minutes. Reminds me of Demolito.
Everything is very simple, and very clean. I expect you to find a great many more improvements.
I was getting quiet different results when tested locally, so I worked with Andrew trying to figure out what happened.

It appears that the results above were for BMI2 version running on Ryzen. Andrew was very kind to rerun the tests:

Code: Select all

Score of Ethereal 9.00 vs Xiphos 0.1: 296 - 436 - 268  [0.430] 1000 @ 40/4.0s  1CPU 
Score of Ethereal 9.00 vs Xiphos 0.1: 327 - 386 - 287  [0.470] 1000 @ 40/4.0s  3CPU 
Score of Ethereal 9.00 vs Xiphos 0.1: 225 - 270 - 225  [0.469] 720  @ 40/20.0s 1CPU
Wow, that's impressive.
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls

Guenther
Posts: 3555
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Full name: Guenther Simon
Contact:

Re: New engine: Xiphos

Post by Guenther » Thu Mar 01, 2018 9:28 am

mt wrote:
Marek Soszynski wrote:
joechess wrote:Neither windows binary's are working for me. Can anyone compile one for older machines, Ive tried but just cannot get it to run
Can't compile for nonpop 64bit Linux either.
thank you for your interest, and sorry for the trouble.
for the next release, i'll try to make binaries for older hardware as well. at the moment, there is some inline assembly and also usage of xmm registers. i have to port that over, but in the same time be sure this isn't going to hurt the performance much.
I am also interested in a non popcount version for older 64 bit smp hardware.

LocutusOfPenguin
Posts: 32
Joined: Thu Sep 28, 2017 4:52 pm
Location: Karlsruhe, Germany
Full name: Jürgen Précour
Contact:

Re: New engine: Xiphos

Post by LocutusOfPenguin » Thu Mar 01, 2018 10:00 am

Guenther wrote:
mt wrote:
Marek Soszynski wrote:
joechess wrote:Neither windows binary's are working for me. Can anyone compile one for older machines, Ive tried but just cannot get it to run
Can't compile for nonpop 64bit Linux either.
thank you for your interest, and sorry for the trouble.
for the next release, i'll try to make binaries for older hardware as well. at the moment, there is some inline assembly and also usage of xmm registers. i have to port that over, but in the same time be sure this isn't going to hurt the performance much.
I am also interested in a non popcount version for older 64 bit smp hardware.
incl. ARM processors (like RaspPi) if possible
Create a dedicated chess computer based on tiny ARM computers with the DGT e-board on picochess.com

pferd
Posts: 126
Joined: Thu Jul 24, 2014 12:49 pm

Re: New engine: Xiphos

Post by pferd » Thu Mar 01, 2018 10:13 am

Thanks for this new engine. Very much appreciated :D

I pulled the latest sources from github. I got a different nodes number for both the bmi2 and the magic version, after entering the same commands.

Run 1:

Code: Select all

./xiphos-magic 
Xiphos 0.1 SSE by Milos Tatarevic
threads=1
hash=128MB
isready
readyok
ucinewgame
position startpos
go depth 12
info depth 1 score cp 22 nodes 1 time 0 nps 1000 pv g1h3
info depth 1 score cp 66 nodes 2 time 0 nps 2000 pv g1f3
info depth 2 score cp 0 nodes 43 time 1 nps 21500 pv g1f3
info depth 3 score cp 66 nodes 214 time 1 nps 107000 pv g1f3
info depth 4 score cp 7 nodes 589 time 2 nps 196333 pv g1f3
info depth 5 score cp 18 nodes 802 time 3 nps 200500 pv g1f3
info depth 5 score cp 38 nodes 978 time 3 nps 244500 pv g1f3
info depth 5 score cp 37 nodes 1405 time 4 nps 281000 pv g1f3
info depth 5 score cp 46 nodes 2067 time 6 nps 295285 pv b1c3
info depth 6 score cp 21 nodes 2824 time 7 nps 353000 pv b1c3
info depth 7 score cp 21 nodes 3793 time 9 nps 379300 pv b1c3
info depth 8 score cp 23 nodes 9570 time 14 nps 638000 pv g1f3
info depth 8 score cp 25 nodes 11620 time 15 nps 726250 pv e2e4
info depth 9 score cp 35 nodes 13797 time 16 nps 811588 pv e2e4
info depth 9 score cp 40 nodes 14603 time 17 nps 811277 pv e2e4
info depth 10 score cp 30 nodes 23283 time 20 nps 1108714 pv e2e4
info depth 11 score cp 40 nodes 32477 time 24 nps 1299080 pv e2e4
info depth 11 score cp 43 nodes 47093 time 30 nps 1519129 pv e2e4
info depth 12 score cp 45 nodes 86380 time 46 nps 1837872 pv e2e4
bestmove e2e4
quit
Run 2:

Code: Select all

./xiphos-magic 
Xiphos 0.1 SSE by Milos Tatarevic
threads=1
hash=128MB
isready
readyok
ucinewgame
position startpos
go depth 12
info depth 1 score cp 22 nodes 1 time 0 nps 1000 pv g1h3
info depth 1 score cp 66 nodes 2 time 0 nps 2000 pv g1f3
info depth 2 score cp 0 nodes 43 time 0 nps 43000 pv g1f3
info depth 3 score cp 66 nodes 214 time 0 nps 214000 pv g1f3
info depth 4 score cp 7 nodes 589 time 1 nps 294500 pv g1f3
info depth 5 score cp 18 nodes 802 time 1 nps 401000 pv g1f3
info depth 5 score cp 38 nodes 978 time 1 nps 489000 pv g1f3
info depth 5 score cp 37 nodes 1405 time 2 nps 468333 pv g1f3
info depth 5 score cp 46 nodes 2067 time 3 nps 516750 pv b1c3
info depth 6 score cp 21 nodes 2824 time 4 nps 564800 pv b1c3
info depth 7 score cp 21 nodes 3793 time 5 nps 632166 pv b1c3
info depth 8 score cp 23 nodes 9570 time 12 nps 736153 pv g1f3
info depth 8 score cp 25 nodes 11620 time 13 nps 830000 pv e2e4
info depth 9 score cp 35 nodes 13797 time 14 nps 919800 pv e2e4
info depth 9 score cp 40 nodes 14603 time 14 nps 973533 pv e2e4
info depth 10 score cp 30 nodes 23283 time 18 nps 1225421 pv e2e4
info depth 11 score cp 40 nodes 32479 time 21 nps 1476318 pv e2e4
info depth 11 score cp 43 nodes 47096 time 27 nps 1682000 pv e2e4
info depth 12 score cp 53 nodes 85679 time 42 nps 1992534 pv e2e4
info depth 12 score cp 39 nodes 90623 time 44 nps 2013844 pv e2e4
bestmove e2e4
Run 3 with the bmi2 version:

Code: Select all

./xiphos-bmi2
Xiphos 0.1 BMI2 by Milos Tatarevic
threads=1
hash=128MB
isready
readyok
ucinewgame
position startpos
go depth 12
info depth 1 score cp 22 nodes 1 time 0 nps 1000 pv g1h3
info depth 1 score cp 66 nodes 2 time 0 nps 2000 pv g1f3
info depth 2 score cp 0 nodes 43 time 0 nps 43000 pv g1f3
info depth 3 score cp 66 nodes 214 time 1 nps 107000 pv g1f3
info depth 4 score cp 7 nodes 589 time 1 nps 294500 pv g1f3
info depth 5 score cp 18 nodes 802 time 1 nps 401000 pv g1f3
info depth 5 score cp 38 nodes 978 time 1 nps 489000 pv g1f3
info depth 5 score cp 37 nodes 1405 time 2 nps 468333 pv g1f3
info depth 5 score cp 46 nodes 2067 time 2 nps 689000 pv b1c3
info depth 6 score cp 21 nodes 2824 time 3 nps 706000 pv b1c3
info depth 7 score cp 21 nodes 3793 time 3 nps 948250 pv b1c3
info depth 8 score cp 23 nodes 9570 time 7 nps 1196250 pv g1f3
info depth 8 score cp 25 nodes 11620 time 8 nps 1291111 pv e2e4
info depth 9 score cp 35 nodes 13797 time 9 nps 1379700 pv e2e4
info depth 9 score cp 40 nodes 14603 time 10 nps 1327545 pv e2e4
info depth 10 score cp 30 nodes 23283 time 15 nps 1455187 pv e2e4
info depth 11 score cp 40 nodes 32478 time 19 nps 1623900 pv e2e4
info depth 11 score cp 43 nodes 47093 time 25 nps 1811269 pv e2e4
info depth 12 score cp 45 nodes 86384 time 40 nps 2106926 pv e2e4
bestmove e2e4

jd1
Posts: 269
Joined: Wed Oct 24, 2012 12:07 am

Re: New engine: Xiphos

Post by jd1 » Thu Mar 01, 2018 10:57 am

Congratulations, very nice engine!

AndrewGrant
Posts: 871
Joined: Tue Apr 19, 2016 4:08 am
Location: U.S.A
Full name: Andrew Grant
Contact:

Re: New engine: Xiphos

Post by AndrewGrant » Thu Mar 01, 2018 3:17 pm

Not everyone uses a deterministic approach.

He seeds with system time https://github.com/milostatarevic/xipho ... ash.c#L124

So that is nothing to worry about, IMO.

Post Reply