Andscacs - New version 0.921 with source

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

Moderators: hgm, Harvey Williamson, bob

syzygy
Posts: 4221
Joined: Tue Feb 28, 2012 10:56 pm

Re: Andscacs - New version 0.921 with source

Post by syzygy » Sun Nov 12, 2017 2:15 pm

Ras wrote:
syzygy wrote:In particular if two engines are playing each other on the same machine, it is not correct for one engine to continuously wake up while the other engine is searching.
In my implementation, there is one thread blocking on stdin, and another thread (which would search if it were the engine's turn) polling on an internal queue, waking up every 10 ms. The Windows task manager shows "00" (in percent) for CPU usage, which is why I didn't bother to use OS specific proper blocking.
Proper blocking is easy to achieve. For each search thread i, use CreateEevent() to create a thread->startEvent and a thread->stopEvent HANDLE.

Now each search thread i does this:

Code: Select all

  while (1) {
    WaitForSingleObject(thread[i]->startEvent, INFINITE);
    // search
    SetEvent(thread[i]->stopEvent);
  }
and the main thread does this:

Code: Select all

  // it's our turn, so start the search threads
  for &#40;i = 0; i < num_threads; i++)
    SetEvent&#40;thread&#91;i&#93;->startEvent&#41;;
  // let the main thread search or just wait for input or time running out
  // now wait until the search threads have stopped searching
  for &#40;i = 0; i < num_threads; i++)
    WaitForSingleObject&#40;thread&#91;i&#93;->stopEvent, INFINITE&#41;;
  // output best move

User avatar
Ozymandias
Posts: 934
Joined: Sun Oct 25, 2009 12:30 am

Re: Andscacs - New version 0.921 with source

Post by Ozymandias » Mon Nov 20, 2017 3:55 pm

Carlos777 wrote:It seems the new update is weaker than the 0.92 version, at least under TCEC conditions. Only 0.5 out of 5 games, keeping in mind that in the previous stage Andy remained unbeaten.
Not so bad in the end, was it?

Carlos777
Posts: 615
Joined: Sun Dec 13, 2009 5:09 pm

Re: Andscacs - New version 0.921 with source

Post by Carlos777 » Mon Nov 20, 2017 9:15 pm

Ozymandias wrote:
Carlos777 wrote:It seems the new update is weaker than the 0.92 version, at least under TCEC conditions. Only 0.5 out of 5 games, keeping in mind that in the previous stage Andy remained unbeaten.
Not so bad in the end, was it?
Maybe I was too quick to affirm that. Andscacs 0.92 finished 4th in the previous stage and 0.921 tied with Booot in the last position in stage 2. I guess this result is normal because few games were played and these engines are close in strenght.
My apologies to Daniel if he took it the wrong way, I was just concerned and dissapointed about Andscacs' bad start. Good luck in next season.

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

Re: Andscacs - New version 0.921 with source

Post by cdani » Mon Nov 20, 2017 9:43 pm

Carlos777 wrote:
Ozymandias wrote:
Carlos777 wrote:It seems the new update is weaker than the 0.92 version, at least under TCEC conditions. Only 0.5 out of 5 games, keeping in mind that in the previous stage Andy remained unbeaten.
Not so bad in the end, was it?
Maybe I was too quick to affirm that. Andscacs 0.92 finished 4th in the previous stage and 0.921 tied with Booot in the last position in stage 2. I guess this result is normal because few games were played and these engines are close in strenght.
My apologies to Daniel if he took it the wrong way, I was just concerned and dissapointed about Andscacs' bad start. Good luck in next season.
No problem!! :-) As always, few games are not much significant. Also if Andscacs had not lost the game for the illegal move, it had finished a bit higher, so more similar to what happened in stage 1.

Henk
Posts: 5077
Joined: Mon May 27, 2013 8:31 am

Re: Andscacs - New version 0.921 with source

Post by Henk » Tue Nov 21, 2017 10:29 pm

Looks to me Andscacs is playing too many draws. Intention should be to destroy your opponent completely otherwise better not play chess. Better lose than going for a draw.

User avatar
Graham Banks
Posts: 30635
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Andscacs - New version 0.921 with source

Post by Graham Banks » Tue Nov 21, 2017 10:31 pm

Henk wrote:Looks to me Andscacs is playing too many draws. Intention should be to destroy your opponent completely otherwise better not play chess. Better lose than going for a draw.
That's a matter of opinion.
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

Henk
Posts: 5077
Joined: Mon May 27, 2013 8:31 am

Re: Andscacs - New version 0.921 with source

Post by Henk » Wed Nov 22, 2017 2:31 pm

Graham Banks wrote:
Henk wrote:Looks to me Andscacs is playing too many draws. Intention should be to destroy your opponent completely otherwise better not play chess. Better lose than going for a draw.
That's a matter of opinion.
I am still able to think about something more friendly than capturing a king. Or what do you mean. Is it about Andscacs playing not too many draws or the intention of playing chess.

ernest
Posts: 1746
Joined: Wed Mar 08, 2006 7:30 pm

Re: Andscacs - New version 0.921 with source

Post by ernest » Wed Nov 22, 2017 7:55 pm

syzygy wrote:
cdani wrote:As the bug happened in only one move situation,
...
If this is indeed what happened, then the solution is to reset the various thread-specific data structures in the main thread before starting the actual search.
Bravo, Ron !
Seems the craziest bugs can be corrected through logical thinking... :)

Gusev
Posts: 1475
Joined: Mon Jan 28, 2013 1:51 pm

Re: Andscacs - New version 0.921 with source

Post by Gusev » Sat Nov 25, 2017 10:16 pm

Thank you!! The source code release makes Andscacs eligible for participation in the next season of FOSCEC. Moreover, CCRL should change the engine name color from green to orange! :D

tpoppins
Posts: 558
Joined: Tue Nov 24, 2015 8:11 pm
Location: upstate

Re: Andscacs - New version 0.921 with source

Post by tpoppins » Sun Nov 26, 2017 12:07 am

Image

Post Reply