Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Request advice from Chess programmers

Author: Geoff

Date: 08:41:58 05/04/03

Go up one level in this thread


Hi Ross

> >>Maybe calculate mobility in your move generator? It won't be
> accurate though >you generate pseudo-legal moves only.
> >Not quite sure how this could be done, as the move has to be made
> first before
> >calculating mobility for both sides.
>
> Well, for example, I think Movei counts legal moves for the side to
> move and
> compares with the previous ply's mobility count (rather than calculate
> both
> sides every ply). Uri says it works for him and I believe him.

The results I got for the mobility function  really hammered the nodes/per
sec and didnt seem to help much in improving its chess knowledge. I might
try the above idea as it sounds fairly easy to implement.

> >>I found killers to be effective but it depends a lot on your move
> ordering.

I am pretty sure I have screwed up the code somewhere in the addition of
killer moves. I will go and have a read of that Bruce Moreland site you
mentioned see if I can see a mistake I have made

> You can create your own hardcoded mvv/lva table with hardcoded values
> like this

> This gave me a reduction in tree size but I don't recall how much.
> About 10% I
> think.

I have printed out your move ordering ideas, I will have another attempt at
move ordering to improve what I currently have

>
> Here's a rough benchmark... on a P3-450 my engine (TRACE) searches
> TSCP's bench
> position to 6 ply in 4.8 seconds and visits 750,000 nodes. NPS are
> about
> 160,000.

My version does 5,230,388 nodes at ply 6 in over 10 seconds on a P4 2.4 Gig
Machine

I think I have a bit of work to do to catch you up ;-)

>NULL move mods
> When you're ready... but believe me, its easy... look at Bruce
> Moreland's
> programming topics site. He gives excellent example code. Also, Faile
> 1.4.4 uses
> nullmove and is similar internally to TSCP.

 It looks like I need to do the NULL moves mod to get the biggest speed
improvement. It might not be too bad  once I get into it.

> >>2. If you are using TSCP's attack() function, rewrite it. Instead of
> looking for
> >>pieces which attack a certain square, work outward from the square
> and look for
> >>a potential attacker. Its heaps faster.

I coded this up last night, only took me a couple of hours . Here is Toms
benchmark to ply 6

Nodes: 5230388

Before Mod
    Best time: 14453 ms
    Nodes per second: 361889

After Mod
     Best time: 10375 ms
     Nodes per second: 504134

Excellent improvement, took me over 500k nps


> >>5. Converting TSCP to an 0x88 board representation is also
> worthwhile.

> between the from and to squares. Bruce Moreland explains it better
> than I ever
> could on his web-site.

Just found it on the web site. I will have a study of this,

> >>Just adding hashtables and nullmove to TSCP (plus the above tweaks)
> will make
> >>TSCP search its built-in benchmark to 6 ply at least 25x faster.
> >
> >Strewth, that is an amazing figure, what would you guess the
> individual speedups
> >were for each of those mods ?
>
> endgame.
> Nullmove is 4 to 8 times faster.  Its a turbo-charger.
>
> Aspiration search can give you another 20%. But be aware that all
> search
> algorithms based on re-searching rely heavily on hash tables for their
> efficiency.
>
> Another suggestion is run a profiler on your engine and look for the
> hotspots.

Looks like I really need to tackle hash tables and Null move, both of those
sound a bit daunting at the moment.
But I have progressed pretty well so far, my modified version is
consistently beating Toms orginal version already.

One of the things that is irritating me at the moment is when I play a
tournament between 2 similar versions to measure the improvement I only get
2 different games even if I play lots of rounds.
The programs are of course so similar, I just get exact repeat games one for
black, one for white, ad infinitum.

I am trying to think of an elegant way to overcome this repeated game
problem at the moment.

Thanks for your help again.

           Regards Geoff




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.