Zevra v2.0 r146 beta

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

Moderators: hgm, Rebel, chrisw

User avatar
flok
Posts: 481
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

Re: Zevra v2.0 r146 beta

Post by flok »

Code: Select all

id name Zevra v2.1 r210
id author Oleg Smirnov
go
==2948== Invalid read of size 1
==2948==    at 0x10BA30: main (uci.c:42)
==2948==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
sovaz1997
Posts: 261
Joined: Sun Nov 13, 2016 10:37 am

Re: Zevra v2.0 r146 beta

Post by sovaz1997 »

flok wrote: Wed Nov 14, 2018 7:54 pm

Code: Select all

id name Zevra v2.1 r210
id author Oleg Smirnov
go
==2948== Invalid read of size 1
==2948==    at 0x10BA30: main (uci.c:42)
==2948==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
There is no such command ("go" without arguments) :)
Zevra 2 is my chess engine. Binary, source and description here: https://github.com/sovaz1997/Zevra2
Zevra v2.5 is last version of Zevra: https://github.com/sovaz1997/Zevra2/releases
User avatar
flok
Posts: 481
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

Re: Zevra v2.0 r146 beta

Post by flok »

sovaz1997 wrote: Wed Nov 14, 2018 8:12 pm
flok wrote: Wed Nov 14, 2018 7:54 pm

Code: Select all

id name Zevra v2.1 r210
id author Oleg Smirnov
go
==2948== Invalid read of size 1
==2948==    at 0x10BA30: main (uci.c:42)
==2948==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
There is no such command ("go" without arguments) :)
It is the same as search forever until stop command comes in.
sovaz1997
Posts: 261
Joined: Sun Nov 13, 2016 10:37 am

Re: Zevra v2.0 r146 beta

Post by sovaz1997 »

Thanks, last commit has this fix now :)
Zevra 2 is my chess engine. Binary, source and description here: https://github.com/sovaz1997/Zevra2
Zevra v2.5 is last version of Zevra: https://github.com/sovaz1997/Zevra2/releases
thunderstruck
Posts: 50
Joined: Tue Jul 19, 2016 10:19 am

Re: Zevra v2.0 r146 beta

Post by thunderstruck »

Hi Oleg,

The latest linux build you provide works in a GUI!(https://gitlab.com/sovaz1997/zevra2/tags/v2.1_r210)
When I compile it myself the binary crashes in a GUI.
I analyzed your binary with the file command : zevra_popcnt: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=5d0d1e0946247dd01bd57033f5003a48618dd4f5, stripped
My compile using your Makefile with make popcnt command shows : zevra_popcnt: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=46ec66976f0bdb9e40ba81044c7587c4d268a73e, not stripped
Could it be that compiling with the newer GCC 8 produces a segfault when binary is run in a GUI?
gcc -v gives :
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 8.2.1 20180831 (GCC)
I compiled a debug version and this is the backtrace:
Reading symbols from /home/antonio/Documents/Zevra v2.1 r210/src/zevra...done.
[New LWP 12236]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `./zevra'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f63b2ee9596 in strtok_r () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007f63b2ee9596 in strtok_r () from /usr/lib/libc.so.6
#1 0x000055af4e0cd47b in setFen (board=0x55af50274260, fen=0x55af4e0deec0 <startpos> "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1") at board.c:9
#2 0x000055af4e0d5833 in main () at uci.c:13
(gdb)
It always segfaults at board.c:9
Maybe the strtok_r function using GCC 8 is the culprit?(https://linux.die.net/man/3/strtok_r)

Kind regards,

Antonio
sovaz1997
Posts: 261
Joined: Sun Nov 13, 2016 10:37 am

Re: Zevra v2.0 r146 beta

Post by sovaz1997 »

I do not know. It seems that it will be easier to write UCI in C ++ using std::string. Version 2.1.1 soon
Zevra 2 is my chess engine. Binary, source and description here: https://github.com/sovaz1997/Zevra2
Zevra v2.5 is last version of Zevra: https://github.com/sovaz1997/Zevra2/releases
thunderstruck
Posts: 50
Joined: Tue Jul 19, 2016 10:19 am

Re: Zevra v2.0 r146 beta

Post by thunderstruck »

Hi Oleg,

I've compiled commit 214 and now it works!!!!
Thanks.

Antonio
sovaz1997
Posts: 261
Joined: Sun Nov 13, 2016 10:37 am

Re: Zevra v2.0 r146 beta

Post by sovaz1997 »

Perfectly! Thanks, Antonio.
I will now release version 2.1.1 with the correction of all compiler warnings
Zevra 2 is my chess engine. Binary, source and description here: https://github.com/sovaz1997/Zevra2
Zevra v2.5 is last version of Zevra: https://github.com/sovaz1997/Zevra2/releases
sovaz1997
Posts: 261
Joined: Sun Nov 13, 2016 10:37 am

Re: Zevra v2.0 r146 beta

Post by sovaz1997 »

Zevra 2 is my chess engine. Binary, source and description here: https://github.com/sovaz1997/Zevra2
Zevra v2.5 is last version of Zevra: https://github.com/sovaz1997/Zevra2/releases
tpoppins
Posts: 919
Joined: Tue Nov 24, 2015 9:11 pm
Location: upstate

Re: Zevra v2.0 r146 beta

Post by tpoppins »

sovaz1997 wrote: Thu Nov 08, 2018 1:49 pm Hello! No, there is no new version in the plans
Promises, promises ... ;)

I just noticed that Zevra has a style. And what a style! Something right up my alley. Here is a game between the new version and v1.8.6 r672.

[pgn][Event "?"] [Site "?"] [Date "2018.11.14"] [Round "?"] [White "Zevra 1.8.6 r672 64-bit"] [Black "Zevra 2.1 r210 64-bit"] [Result "1-0"] [ECO "A56"] [GameDuration "00:08:40"] [GameEndTime "2018-11-14T17:36:43.877 Eastern Standard Time"] [GameStartTime "2018-11-14T17:28:03.066 Eastern Standard Time"] [Opening "Benoni defense"] [PlyCount "178"] [Termination "adjudication"] [TimeControl "40/120"] 1. d4 {book} Nf6 {book} 2. c4 {book} c5 {book} 3. Nf3 {book} cxd4 {book} 4. Nxd4 {book} Nc6 {book} 5. g3 {book} e6 {book} 6. Bg2 {book} Bc5 {book} 7. Nb3 {book} Be7 {book} 8. O-O {book} d6 {book} 9. e4 {+0.08/14 3.5s} O-O {0.00/18 3.6s} 10. Nc3 {+0.23/14 3.6s} Ne5 {0.00/20 3.6s} 11. Qd4 {+0.19/14 3.6s} Nc6 {0.00/20 3.6s} 12. Qd3 {+0.22/13 3.6s} Ne5 {0.00/20 3.6s} 13. Qd4 {+0.22/15 3.6s} Nc6 {0.00/22 3.6s} 14. Qd1 {+0.20/14 1.9s} Ne5 {0.00/23 3.6s} 15. Qe2 {+0.27/14 3.7s} Qc7 {-0.23/16 3.6s} 16. c5 {+0.18/15 2.6s} dxc5 {-0.02/19 3.6s} 17. f4 {+0.23/15 3.7s} Nc6 {-0.01/19 3.6s} 18. e5 {+0.22/15 1.9s} Nd7 {+0.03/19 3.6s} 19. Nb5 {+0.44/12 3.8s} Qb6 {+0.12/18 3.6s} 20. Be3 {+0.23/13 2.0s} f6 {+0.17/18 3.6s} 21. Qc4 {+0.19/13 3.4s} Ncxe5 {+0.15/19 3.6s} 22. fxe5 {+0.36/13 2.1s} Nxe5 {+0.17/20 3.6s} 23. Qe2 {+0.27/14 3.6s} Bd7 {+0.15/20 3.6s} 24. Na3 {+0.44/13 2.4s} Rac8 {+0.17/19 3.6s} 25. Rac1 {+0.56/11 2.6s} Bc6 {+0.02/18 3.6s} 26. Bxc6 {+0.46/13 2.3s} Rxc6 {0.00/18 3.6s} 27. Rf2 {+0.49/13 2.4s} Rd8 {+0.17/19 3.6s} 28. Nc4 {+0.52/15 2.8s} Nxc4 {+0.30/19 3.6s} 29. Qxc4 {+0.44/15 3.3s} Rd5 {+0.30/19 3.6s} 30. Rd2 {+0.48/15 3.1s} Rxd2 {+0.36/19 3.6s} 31. Bxd2 {+0.36/14 4.9s} Qd8 {+0.34/19 3.6s} 32. Re1 {+0.16/13 4.9s} Qd7 {+0.41/16 3.6s} 33. Bf4 {+0.38/11 3.7s} Kh8 {+0.58/17 3.6s} 34. g4 {+0.13/12 4.0s} e5 {+0.64/18 3.6s} 35. Bg3 {+0.05/12 5.3s} h6 {+0.84/15 3.6s} 36. h3 {+0.11/12 4.7s} Rc8 {+0.78/18 3.6s} 37. a4 {-0.07/12 3.1s} b6 {+0.88/17 3.6s} 38. Re2 {-0.18/12 3.4s} Qd1+ {+0.81/20 3.6s} 39. Be1 {-0.15/15 5.7s} Rd8 {+1.00/17 3.6s} 40. Re3 {-0.23/14 7.4s} Qd5 {+0.95/18 3.6s} 41. Nd2 {-0.12/14 2.2s} Qxc4 {+0.84/20 3.0s} 42. Nxc4 {-0.08/16 1.7s} Rd4 {+0.85/19 3.0s} 43. b3 {-0.01/16 3.0s} Rd1 {+0.83/18 3.0s} 44. Kf1 {+0.14/16 1.9s} Rd7 {+0.51/19 3.0s} 45. Ke2 {+0.27/17 2.2s} Bd8 {+0.44/21 3.0s} 46. Rd3 {+0.36/18 2.4s} Rd4 {+0.08/22 3.0s} 47. Bc3 {+0.38/17 2.8s} Rxd3 {-0.72/23 3.0s} 48. Kxd3 {+0.40/17 1.9s} Bc7 {-0.81/23 3.0s} 49. b4 {+0.42/18 1.8s} cxb4 {-0.76/23 3.0s} 50. Bxb4 {+0.63/18 2.2s} Bd8 {-0.90/24 3.0s} 51. Bd6 {+1.00/19 2.7s} Kg8 {-0.90/23 3.0s} 52. Bb8 {+1.61/19 1.9s} a6 {-0.86/24 3.0s} 53. Ba7 {+1.68/19 3.4s} Kf7 {-0.87/21 3.0s} 54. Nxb6 {+1.82/18 2.1s} Be7 {-1.08/21 3.0s} 55. Nd5 {+2.10/18 2.6s} Bd6 {-1.08/24 3.0s} 56. Bb6 {+2.02/19 3.0s} Kg6 {-1.24/22 3.0s} 57. Nc7 {+2.06/19 2.4s} Bxc7 {-0.88/26 3.0s} 58. Bxc7 {+2.25/20 2.5s} Kg5 {-0.92/26 3.0s} 59. Bd6 {+2.14/22 3.6s} Kh4 {-1.16/26 3.0s} 60. Bf8 {+2.02/22 2.0s} g6 {-1.35/26 3.0s} 61. Bxh6 {+2.34/23 2.1s} Kxh3 {-1.25/28 3.0s} 62. Bg7 {+2.64/23 2.7s} Kxg4 {-1.43/24 3.0s} 63. Bxf6 {+3.27/24 2.3s} Kf5 {-2.30/25 3.0s} 64. Bd8 {+4.15/24 2.6s} Kf4 {-3.00/22 3.0s} 65. Ba5 {+4.23/25 3.7s} e4+ {-3.15/24 3.0s} 66. Ke2 {+4.46/27 2.9s} Ke5 {-3.43/25 3.0s} 67. Ke3 {+4.59/25 2.3s} Kd5 {-3.85/26 3.0s} 68. Bc7 {+4.80/26 3.2s} Kc6 {-4.09/26 3.0s} 69. Bg3 {+5.07/26 3.5s} Kc5 {-4.16/27 3.0s} 70. a5 {+5.21/26 2.3s} Kd5 {-4.27/27 3.0s} 71. Bf4 {+5.42/27 3.0s} Kc6 {-4.27/28 3.0s} 72. Kxe4 {+5.55/28 3.2s} Kb5 {-4.28/30 3.0s} 73. Bd2 {+5.68/29 4.2s} Kc5 {-4.28/25 3.0s} 74. Ke5 {+5.68/29 3.0s} Kc4 {-4.29/23 3.0s} 75. Kf6 {+5.68/30 2.8s} Kd3 {-4.32/27 3.0s} 76. Bg5 {+5.70/31 5.1s} Kc4 {-4.32/27 3.0s} 77. Kxg6 {+6.00/30 4.8s} Kb5 {-4.45/28 3.0s} 78. Bd2 {+6.98/30 3.2s} Kc4 {-4.97/28 3.0s} 79. Be1 {+6.98/32 3.8s} Kc5 {-5.24/24 3.0s} 80. Kg5 {+7.28/32 8.1s} Kd5 {-5.41/24 3.0s} 81. Kf5 {+7.58/31 3.2s} Kd6 {-5.74/23 3.0s} 82. Ke4 {+8.13/30 2.2s} Kc5 {-6.32/27 3.0s} 83. Ke5 {+8.13/21 3.2s} Kc6 {-6.45/22 3.0s} 84. Kd4 {+8.13/20 3.2s} Kd7 {-6.60/22 3.0s} 85. Kd5 {+8.13/17 3.2s} Ke7 {-6.67/17 3.0s} 86. Kc6 {+18.77/26 1.7s} Ke8 {-7.63/17 3.0s} 87. Bh4 {+18.82/27 2.4s} Kf7 {-15.34/27 3.0s} 88. Kb7 {+18.85/27 1.8s} Kg6 {-16.23/27 3.0s} 89. Be1 {+19.14/28 3.3s} Kh5 {-16.49/25 3.0s, White wins by adjudication} 1-0 [/pgn]

As I was watching the opening I was nodding in approval at White's moves -- that's me right there playing bullet online, giving up a pawn right out of the opening for next to nothing, just to mix things up. And look at that pas-de-deux on moves 11-15! You could swear it's two humans playing. White sacs a pawn a couple of moves out of the book, just to avoid draw; soon Black, not to be outdone, gives up a piece. The older version (White) eventually prevailed -- there's a Spanish saying to the effect that "devil's wisdom comes from his age, not his devilishness" -- but what a game. That's not something you would know by merely perusing a rating list.

Here's to hoping that as Zevra rises through the ranks she doesn't lose her fighting spirit and inventiveness.
Tirsa Poppins
CCRL