A Chess forum. ChessBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ChessBanter forum » Chess Newsgroups » rec.games.chess.computer (Computer Chess)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Good move ordering?



 
 
Thread Tools Display Modes
  #1  
Old August 16th 03, 03:55 PM
Delphi
external usenet poster
 
Posts: n/a
Default Good move ordering?

Hello!

I am writing a (simple) chess program and I think it is rather slow,
i.e. it would not search very deep (only a few plies) in a short
period of time. I thought one reason might be a poor move ordering (I
use alpha-beta with iterativ deepening).
So I read some posts in this group to get informations how to make it
faster.
Robert Hyatt suggested to test the move order quality by computing a
number that divides all cutoffs happening at the first move at a
certain node by all occuring cutoffs. If that number was about 0.9 it
would be good.
Well - I get 0.9 most of the time (hoping that I compute the number
right).
On the other hand I tried the following:
In my evaluation function I did the usual computions, but instead
returning
the computed value I always returned 0. This - I thought - would give
perfect cutoff scenarios, while everything else of the algorithmus
would not be affected (as opposed to directly returning 0, which is of
course additionally faster as _no_ evaluation is done at the nodes).
However, comparing the usual response time (with seemingly good move
ordering) to the one obtained when eventually returning 0, the latter
one was _much, much_ faster, especially when searching deeper!

So I am confused now. It would be great, if anyone could help me.
Thanks in advance,

-delphi-
  #2  
Old August 16th 03, 05:46 PM
Simon Waters
external usenet poster
 
Posts: n/a
Default Good move ordering?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Delphi wrote:

On the other hand I tried the following:
In my evaluation function I did the usual computions, but instead
returning
the computed value I always returned 0.


... comparing the usual response time (with seemingly good move
ordering) to the one obtained when eventually returning 0, the latter
one was _much, much_ faster


Random thought - does your compiler avoid generating code for stuff that
is never used? Thus returning zero might optimise out some or all of
your evaluation computations.

Sometimes these computers are too damn clever.
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/Pl/kGFXfHI9FVgYRAmGHAJ9lhNvs7275vUm4ZahwcSaLN3iImQCgg gb1
ASy1wSSSR+NPLGsud/Dn3JM=
=eIV1
-----END PGP SIGNATURE-----

  #3  
Old August 16th 03, 10:41 PM
Delphi
external usenet poster
 
Posts: n/a
Default Good move ordering?

Simon Waters wrote in message ...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Delphi wrote:

On the other hand I tried the following:
In my evaluation function I did the usual computions, but instead
returning
the computed value I always returned 0.


... comparing the usual response time (with seemingly good move
ordering) to the one obtained when eventually returning 0, the latter
one was _much, much_ faster


Random thought - does your compiler avoid generating code for stuff that
is never used? Thus returning zero might optimise out some or all of
your evaluation computations.

Sometimes these computers are too damn clever.
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/Pl/kGFXfHI9FVgYRAmGHAJ9lhNvs7275vUm4ZahwcSaLN3iImQCgg gb1
ASy1wSSSR+NPLGsud/Dn3JM=
=eIV1
-----END PGP SIGNATURE-----



Oh - I did not think of something like that!
Anyway, I changed the value 0 to a computation that yields also a
constant value but only if a certain condition is fulfilled (which is
true in the first moves), so I think this could not be optimized. The
result is the same:
approx. 10 times faster response than without a constant value, while
immediately returning 0 is yet faster (which also means, that it can't
be a compiler optimization issue (is vc6++, by the way).

thanks anyway,
-delphi-
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.Content Relevant URLs by vBSEO 2.4.0
Copyright 2004-2017 ChessBanter.
The comments are property of their posters.