Andscacs - New version 0.921 with source

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
tttony
Posts: 257
Joined: Sat Apr 23, 2011 10:33 pm
Contact:

Re: Andscacs - New version 0.921 with source

Post by tttony » Sat Nov 04, 2017 4:11 pm

Cool!

The source has no license so I guess it's under public domain?

User avatar
cdani
Posts: 2065
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Andscacs - New version 0.921 with source

Post by cdani » Sat Nov 04, 2017 4:11 pm

In debug.h comment the
#define WINDOWS
and activate the
#define LINUX
Hope it works with this.

User avatar
MikeB
Posts: 2673
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Andscacs - New version 0.921 with source

Post by MikeB » Sat Nov 04, 2017 4:17 pm

cdani wrote:Hello. So here it is the version for the second stage of TCEC. Is really a minor version, with luck +5 elo.

Changes:
* Improved various pawn structure evaluation parameters.
* Move search improvements.
* Improvement of various imbalances.
* Improvements in some endgames.

http://www.andscacs.com/downloads/andscacs0921.zip

As promised the source code:
www.andscacs.com/downloads/andscacs921src.zip

Is a Visual Studio 2013 solution. Also it contains a makefile for Linux.
Michael will try to make a Mac version, thanks to him!
So far I can get it to compile pretty easily on the macOS - but it crashes right at the start

Code: Select all

Current executable set to 'andscacs' (x86_64).
(lldb) run
Process 54267 launched: '/Users/michaelbyrne/Downloads/andscacs_921_src/andscacs' (x86_64)
Andscacs 0.921 by Daniel Jose
Process 54267 exited with status = 1 (0x00000001) 
(lldb) list
   108 	{
   109 	
   110 	#ifdef WINDOWS
   111 	#ifdef GENERARDMP
   112 		SetUnhandledExceptionFilter(unhandled_handler);
   113 	#endif
   114 	#endif
   115 		fprintf(stdout, "%s\n", presentaprograma().c_str());
   116 		inicialitzacions();
   117 		prepara_entrada();
(lldb) 
it looks like a buffer overflow or seg fault

Volker Pittlik
Posts: 597
Joined: Wed Mar 08, 2006 8:10 pm
Location: Murten / Morat, Switzerland

Re: Andscacs - New version 0.921 with source

Post by Volker Pittlik » Sat Nov 04, 2017 4:27 pm

Unfortunately no, and the forum software does not accept tzhe text of the error message....

gcc complains about the syntay in analisis.cpp

Code: Select all

analisis.cpp:762:3: Fehler: expected unqualified-id before "do"
Three more of that

User avatar
cdani
Posts: 2065
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Andscacs - New version 0.921 with source

Post by cdani » Sat Nov 04, 2017 4:31 pm

tttony wrote:Cool!
The source has no license so I guess it's under public domain?
If is the default license, yes. No problem for me.
Damir wrote:I was wondering if you can add parameters to Andscacs like the one Texel has ? I very much like to tweak and tune the engines. The more parameters Andscacs has, the better :) :)
You can do it yourself:
* Decide what eval parameter you want to add. See avaluacio.cpp, in the function carregar_fitxer_avaluacions. For example we take this line
BonusAlfilSuportatPerPeo = FerPun(5, 9);
that means Bonus for bishop supported by pawn.
* in es.cpp add something like this more or less in the line 140:

Code: Select all

afout("option name BonusAlfilSuportatPerPeoMg type spin default 5 min 1 max 100\n");
This is only to show the parameter to the user. The "Mg" is a visual reference to middle game, so we will create a parameter to modify the "5". The "9" is the endgame part of the value.
* in es.cpp add something like this

Code: Select all

if (!_stricmp(name, "BonusAlfilSuportatPerPeoMg")) {
   int tempv= atoi(value);
   if &#40;tempv<= 0&#41;
     tempv= 1;
   if &#40;tempv> 100&#41;
     tempv= 100;
   BonusAlfilSuportatPerPeo = FerPun&#40;tempv, PunF&#40;BonusAlfilSuportatPerPeo&#41;);
&#125;
You can add it for example under this code:

Code: Select all

if (!_stricmp&#40;name, "LoadHashfromFile")) &#123;
   read_hash_binary&#40;);
&#125;	
So this will change the mg part of the value, not changing the current eg part. If you where modifying the eg part, you have to do:

Code: Select all

   BonusAlfilSuportatPerPeo = FerPun&#40;PunI&#40;BonusAlfilSuportatPerPeo&#41;, tempv&#41;;
That's it!
Anything just ask.
jpqy wrote:Thank you Daniel..will be tested :wink:
JP.
Thanks! As you want, not much to be won :-)

User avatar
MikeB
Posts: 2673
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Andscacs - New version 0.921 with source

Post by MikeB » Sat Nov 04, 2017 4:40 pm

MikeB wrote:
cdani wrote:Hello. So here it is the version for the second stage of TCEC. Is really a minor version, with luck +5 elo.

Changes:
* Improved various pawn structure evaluation parameters.
* Move search improvements.
* Improvement of various imbalances.
* Improvements in some endgames.

http://www.andscacs.com/downloads/andscacs0921.zip

As promised the source code:
www.andscacs.com/downloads/andscacs921src.zip

Is a Visual Studio 2013 solution. Also it contains a makefile for Linux.
Michael will try to make a Mac version, thanks to him!
So far I can get it to compile pretty easily on the macOS - but it crashes right at the start

Code: Select all

Current executable set to 'andscacs' &#40;x86_64&#41;.
&#40;lldb&#41; run
Process 54267 launched&#58; '/Users/michaelbyrne/Downloads/andscacs_921_src/andscacs' &#40;x86_64&#41;
Andscacs 0.921 by Daniel Jose
Process 54267 exited with status = 1 &#40;0x00000001&#41; 
&#40;lldb&#41; list
   108 	&#123;
   109 	
   110 	#ifdef WINDOWS
   111 	#ifdef GENERARDMP
   112 		SetUnhandledExceptionFilter&#40;unhandled_handler&#41;;
   113 	#endif
   114 	#endif
   115 		fprintf&#40;stdout, "%s\n", presentaprograma&#40;).c_str&#40;));
   116 		inicialitzacions&#40;);
   117 		prepara_entrada&#40;);
&#40;lldb&#41; 
it looks like a buffer overflow or seg fault
Success!!!

Code: Select all

&#91;Mac-Pro&#58;~&#93; michaelbyrne% /Users/michaelbyrne/Downloads/andscacs_921_src/andscacs ; exit;
Andscacs 0.921 by Daniel Jose
go depth 20
info depth 1 seldepth 1 score cp 67 nodes 21 nps 21000 tbhits 0 time 1 pv e2e3 
info depth 2 seldepth 6 score cp 15 nodes 90 nps 90000 tbhits 0 time 1 pv e2e3 d7d5 
info depth 2 seldepth 3 score cp 21 nodes 155 nps 155000 tbhits 0 time 1 pv d2d4 d7d5 
info depth 3 seldepth 7 score cp 44 nodes 286 nps 286000 tbhits 0 time 1 pv d2d4 d7d5 e2e3 
info depth 4 seldepth 8 score cp -15 nodes 484 nps 242000 tbhits 0 time 2 pv d2d4 d7d5 e2e3 d8d6 
info depth 4 seldepth 8 score cp 11 nodes 645 nps 215000 tbhits 0 time 3 pv b1c3 e7e6 e2e3 d7d5 
info depth 4 seldepth 8 score cp 12 nodes 755 nps 251666 tbhits 0 time 3 pv g1f3 d7d5 d2d4 e7e6 
info depth 4 seldepth 9 score cp 27 nodes 1091 nps 272750 tbhits 0 time 4 pv c2c3 b8c6 d2d4 d7d5 
info depth 5 seldepth 8 score cp 38 nodes 1353 nps 270600 tbhits 0 time 5 pv c2c3 b8c6 d2d4 d7d5 g1f3 
info depth 5 seldepth 8 score cp 43 lowerbound nodes 1454 nps 242333 tbhits 0 time 6 pv d2d4 
info depth 5 seldepth 8 score cp 55 nodes 1633 nps 272166 tbhits 0 time 6 pv d2d4 d7d5 e2e3 d8d6 b1c3 
info depth 6 seldepth 9 score cp 40 nodes 2341 nps 292625 tbhits 0 time 8 pv b1c3 g8f6 d2d4 d7d5 d1d3 
info depth 7 seldepth 12 score cp 52 nodes 3239 nps 269916 tbhits 0 time 12 pv b1c3 g8f6 e2e3 b8c6 d2d4 d7d5 g1f3 
info depth 8 seldepth 12 score cp 40 nodes 5687 nps 270809 tbhits 0 time 21 pv c2c4 e7e6 e2e3 d7d5 b1c3 b8c6 d2d4 
info depth 9 seldepth 15 score cp 32 nodes 13917 nps 296106 tbhits 0 time 47 pv b1c3 g8f6 d2d4 d7d5 e2e3 e7e6 g1f3 b8c6 f3e5 
info depth 10 seldepth 20 score cp 38 nodes 24038 nps 329287 tbhits 0 time 73 pv b1c3 e7e6 d2d4 d7d5 c1f4 c7c5 e2e3 b8c6 g1f3 a7a6 
info depth 11 seldepth 19 score cp 23 nodes 34156 nps 348530 tbhits 0 time 98 pv b1c3 e7e6 e2e4 d7d5 e4d5 e6d5 d2d4 g8f6 g1f3 f6e4 c1f4 b8c6 f1d3 
info depth 11 seldepth 18 score cp 35 nodes 42942 nps 367025 tbhits 0 time 117 pv c2c4 c7c6 d2d4 d7d5 c4d5 c6d5 b1c3 g8f6 c1f4 b8c6 e2e3 c8g4 
info depth 12 seldepth 22 score cp 34 nodes 76112 nps 425206 tbhits 0 time 179 pv c2c4 c7c5 b1c3 b8c6 e2e4 e7e6 d2d3 b7b6 g1f3 d7d6 g2g3 d8f6 
info depth 13 seldepth 27 score cp 22 nodes 135688 nps 515923 tbhits 0 time 263 pv b1c3 d7d5 d2d4 e7e6 e2e3 c7c5 d4c5 d8a5 h2h3 a5c5 g1f3 g8f6 a2a3 f6e4 
info depth 13 seldepth 21 score cp 39 nodes 177612 nps 560290 tbhits 0 time 317 pv e2e4 d7d5 e4d5 g8f6 d2d4 d8d5 b1c3 d5d6 c1e3 c7c6 g1f3 f6g4 f1c4 g4e3 f2e3 
info depth 14 seldepth 25 score cp 24 nodes 303717 nps 667509 tbhits 0 time 455 pv d2d4 e7e6 b1c3 d7d5 e2e3 g8f6 g1f3 f8b4 f1d3 b8c6 f3e5 e8g8 e1g1 
info depth 15 seldepth 26 score cp 35 nodes 536422 nps 767413 tbhits 0 time 699 pv d2d4 g8f6 g1f3 c7c6 b1c3 d7d5 e2e3 g7g6 f1d3 f8g7 e1g1 e8g8 f3e5 a7a6 b2b3 
info depth 15 seldepth 25 score cp 40 lowerbound nodes 565132 nps 774153 tbhits 0 time 730 pv e2e4 
info depth 15 seldepth 27 score cp 53 nodes 644438 nps 791692 tbhits 0 time 814 pv e2e4 e7e6 d2d4 d7d5 b1c3 d5e4 c3e4 b8c6 g1f3 f7f5 e4c3 a7a6 c1g5 g8f6 d4d5 c6e7 f3e5 e7d5 f1e2 
info depth 16 currmove e2e4 currmovenumber 1
info depth 16 seldepth 27 score cp 51 nodes 768650 nps 809105 tbhits 0 time 950 pv e2e4 e7e6 d2d4 d7d5 b1c3 d5e4 c3e4 b8c6 g1f3 f7f5 e4c3 g8f6 f1c4 a7a6 e1g1 b7b5 d4d5 c6b4 c4b3 
info depth 16 currmove c2c4 currmovenumber 3
info depth 17 currmove e2e4 currmovenumber 1
info depth 17 seldepth 29 score cp 44 nodes 902175 nps 830732 tbhits 0 time 1086 pv e2e4 e7e6 d2d4 d7d5 b1c3 d5e4 c3e4 b8c6 g1f3 f8e7 c2c3 g8f6 e4f6 e7f6 f1d3 e8g8 e1g1 e6e5 d4e5 c6e5 f3e5 f6e5 
info depth 17 currmove g1f3 currmovenumber 14
info depth 18 currmove e2e4 currmovenumber 1
info depth 18 seldepth 32 score cp 48 nodes 1618169 nps 877056 tbhits 0 time 1845 pv e2e4 c7c5 b1c3 b8c6 g1f3 g8f6 f1e2 e7e6 e1g1 f8e7 d2d4 c5d4 f3d4 e8g8 c1e3 d7d5 e4d5 f6d5 c3d5 e6d5 c2c4 d5c4 d4c6 
info depth 18 currmove b1c3 currmovenumber 9
info depth 19 currmove e2e4 currmovenumber 1
info depth 19 seldepth 32 score cp 45 nodes 2366150 nps 898651 tbhits 0 time 2633 pv e2e4 c7c5 b1c3 b8c6 g1f3 g8f6 f1e2 e7e6 e1g1 f8e7 d2d4 c5d4 f3d4 e8g8 d4c6 b7c6 e4e5 f6d5 c3d5 c6d5 f2f4 e7b4 c1e3 c8b7 
info depth 19 currmove c2c4 currmovenumber 4
info depth 20 currmove e2e4 currmovenumber 1
info depth 20 currmove b1c3 currmovenumber 2
info depth 20 currmove c2c4 currmovenumber 3
info depth 20 currmove g1f3 currmovenumber 5
info depth 20 currmove d2d4 currmovenumber 6
info depth 20 currmove e2e3 currmovenumber 7
info depth 20 currmove a2a4 currmovenumber 11
info depth 20 currmove e2e4 currmovenumber 1
info depth 20 seldepth 32 score cp 47 nodes 4999533 nps 912656 tbhits 0 time 5478 pv e2e4 e7e5 b1c3 b8c6 f1c4 f8c5 g1f3 g8f6 d2d3 e8g8 e1g1 a7a6 c1g5 c5e7 g5d2 d7d6 a2a3 c8e6 c4d5 e6g4 
info depth 20 currmove d2d4 currmovenumber 2
info nodes 5037971 nps 913337 time 5516
bestmove e2e4 ponder e7e5
macOS changes in hash.cpp

Code: Select all

#ifdef LINUX
	if &#40;memhash&#41;
		free&#40;memhash&#41;;
	  memhash = calloc&#40;sizeof&#40;unahash&#41;, xx&#41;;  //macOS auto aligns to 16 bytes in its ABI, hence clang/gcc macOS is missing aligned_alloc in its C11 implementation
//	memhash = aligned_alloc&#40;sizeof&#40;unahash&#41;, xx&#41;;//not for macOS
#endif
also the makefile downloaded was missing magics.o on the OBJS listing , but that was pretty easy to identify..

working on optimizations now :) - will post later today , still need to test under xBoard
Last edited by MikeB on Sat Nov 04, 2017 4:43 pm, edited 2 times in total.

User avatar
cdani
Posts: 2065
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Andscacs - New version 0.921 with source

Post by cdani » Sat Nov 04, 2017 4:40 pm

Volker Pittlik wrote:Unfortunately no, and the forum software does not accept tzhe text of the error message....
gcc complains about the syntay in analisis.cpp

Code: Select all

analisis.cpp&#58;762&#58;3&#58; Fehler&#58; expected unqualified-id before "do"
Three more of that
Is like you have not defined the #LINUX
#define LINUX
I hope is this. The problem with linux is that I don't have any practice. I work mostly only with Windows.
If it does not work, can you post here the modified debug.h file if you want?

User avatar
cdani
Posts: 2065
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Andscacs - New version 0.921 with source

Post by cdani » Sat Nov 04, 2017 4:43 pm

MikeB wrote: Success!!!
...
will work on optimizations now :)
Nice! Thanks!!

User avatar
MikeB
Posts: 2673
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Andscacs - New version 0.921 with source

Post by MikeB » Sat Nov 04, 2017 4:45 pm

cdani wrote:
MikeB wrote: Success!!!
...
will work on optimizations now :)
Nice! Thanks!!
Changes needed:

Code: Select all

#ifdef LINUX 
   if &#40;memhash&#41; 
      free&#40;memhash&#41;; 
     memhash = calloc&#40;sizeof&#40;unahash&#41;, xx&#41;;  //macOS auto aligns to 16 bytes in its ABI, hence clang/gcc macOS is missing aligned_alloc in its C11 implementation 
//   memhash = aligned_alloc&#40;sizeof&#40;unahash&#41;, xx&#41;;//not for macOS 
#endif
also the makefile downloaded was missing magics.o on the OBJS listing, but that was pretty easy to identify...

Damir
Posts: 1877
Joined: Mon Feb 11, 2008 2:53 pm

Re: Andscacs - New version 0.921 with source

Post by Damir » Sat Nov 04, 2017 4:57 pm

cdani wrote:
tttony wrote:Cool!
The source has no license so I guess it's under public domain?
If is the default license, yes. No problem for me.
Damir wrote:I was wondering if you can add parameters to Andscacs like the one Texel has ? I very much like to tweak and tune the engines. The more parameters Andscacs has, the better :) :)
You can do it yourself:
* Decide what eval parameter you want to add. See avaluacio.cpp, in the function carregar_fitxer_avaluacions. For example we take this line
BonusAlfilSuportatPerPeo = FerPun(5, 9);
that means Bonus for bishop supported by pawn.
* in es.cpp add something like this more or less in the line 140:

Code: Select all

afout&#40;"option name BonusAlfilSuportatPerPeoMg type spin default 5 min 1 max 100\n");
This is only to show the parameter to the user. The "Mg" is a visual reference to middle game, so we will create a parameter to modify the "5". The "9" is the endgame part of the value.
* in es.cpp add something like this

Code: Select all

if (!_stricmp&#40;name, "BonusAlfilSuportatPerPeoMg")) &#123;
   int tempv= atoi&#40;value&#41;;
   if &#40;tempv<= 0&#41;
     tempv= 1;
   if &#40;tempv> 100&#41;
     tempv= 100;
   BonusAlfilSuportatPerPeo = FerPun&#40;tempv, PunF&#40;BonusAlfilSuportatPerPeo&#41;);
&#125;
You can add it for example under this code:

Code: Select all

if (!_stricmp&#40;name, "LoadHashfromFile")) &#123;
   read_hash_binary&#40;);
&#125;	
So this will change the mg part of the value, not changing the current eg part. If you where modifying the eg part, you have to do:

Code: Select all

   BonusAlfilSuportatPerPeo = FerPun&#40;PunI&#40;BonusAlfilSuportatPerPeo&#41;, tempv&#41;;
That's it!
Anything just ask.
jpqy wrote:Thank you Daniel..will be tested :wink:
JP.
Thanks! As you want, not much to be won :-)
I was thinking of parameters like these:

Here is the picture how Texel parameters look like:

http://www.solidfiles.com/v/gRMpNrp8ypeGv

Post Reply