Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: copy/make vs make/unmake some data

Author: Daniel Clausen

Date: 07:21:41 09/04/03

Go up one level in this thread


On September 03, 2003 at 14:53:23, Robert Hyatt wrote:

>I finally found time to run a few tests.
>
>First, the set-up:  I took all my bitmap stuff, added it up, and put it in
>a structure that was then set up as an array.  IE tdata[128] was an array
>of these structures, each element being just enough bytes to hold all of what
>I call a "position" including bitmap boards, hash signature, 50 move counter,
>etc...)
>
>At the top of MakeMove() I added tdata[ply+1]=tdata[ply]; to do the copy
>stuff.  That's all.
>
>Some results:
>
>fine 70 searched to 39 plies deep:
>
>copy/make : 15.5 seconds, make/unmake 14.0 seconds  (11% overhead)
>
>kopec 22 searched to 12 plies deep:
>
>copy/make : 32.4 seconds, make/unmake 28.3 seconds. (14.5% overhead)
>
>mate position searched 9 plies deep (mate in 10)
>
>copy/make : 8.9 seconds, make/unmake 7.5 seconds.  (18.7% overhead)

That together with the KISS principle strengthens me in the view that I will
stay with the copy/make strategy until my engine is at the top, which will never
happen anyway. Even if the numbers in other setups can be slightly higher, it
translates to what, 10-20 ELO? Well, I can imagine tons of other places to work
on my engine and gain more than that.

Yeah, I can see why the author of a top-program would do that, since 20 ELOs can
be crucial to become number one or not in this famous SSDF, and that's probably
rather important for sales. But for a mortal as me, I couldn't care less.
_Maybe_ I'll do it when I'm sure that the board structure etc doesn't change too
much in the distant future...

>That's not all the story. however.  The copy/make approach requires an
>extra register everywhere since the data structures have to be accessed
>through a pointer (or via an array subscript, same thing).

Well, I guess there's no difference in my engine, because I don't have any
global variables anyway. ( I assume you don't need a pointer (and therefore an
additional register) because your board structure is global?)

Sargon



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.