Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about the nps difference between MiniMax and AB

Author: Dann Corbit

Date: 11:32:17 03/05/04

Go up one level in this thread


On March 05, 2004 at 14:12:38, Dann Corbit wrote:

>On March 05, 2004 at 09:15:59, Mathieu Pagé wrote:
>
>>On March 05, 2004 at 00:56:20, Tony Werten wrote:
>>
>>>On March 04, 2004 at 15:16:43, Mathieu Pagé wrote:
>>>
>>>>Hi,
>>>>
>>>>I've just change my minimax algorithm for an AB one. (Yes I know i should have
>>>>done this long long time ago, but i did want to keep it simple until it could
>>>>play a complete game and understand _all_ the chess rules).
>>>>
>>>>As expected my engines can search deeper (3-4 more plys) than the old version in
>>>>the same time, but the NPS drop dramatically, going from 3.6M nodes/s to a
>>>>little bit over 2M nodes/s. It's about 44 % decrease.
>>>>
>>>>I think it is normal that the nps of Minimax was greater then AB's one because
>>>>in AB lot of move are generated, but not searched (so they are not add to the
>>>>number of nodes)
>>>>
>>>>but i think that going from 3.6M to 2M is a big difference.
>>>
>>>Not really. You spend more time in ordering the moves now. Not only the ordering
>>>itself, but also a lot more memory references. ie probing the hashtable, probing
>>>killertables, maybe history table. And of coarse, you have to remove those moves
>>>from the movelist. Did you already split your move generation in captures and
>>>non-captures ?
>>
>>at a first sight your answer seem to confirm what I was expecting, but is your
>>answer the same if I tell you that I have (still) no ordering, no hashtable, no
>>killertable, no history ...
>>
>>What I have is a plain AlphaBeta with iterative deepening.
>
>Your iterative deepening needs a hash table.  If you don't want to do an
>incremental zobrist, just use Ozan Yigit's hash for the whole position:
>
>    static unsigned long
>    sdbm(str)
>    unsigned char *str;
>    {
>        unsigned long hash = 0;
>        int c;
>
>        while (c = *str++)
>            hash = c + (hash << 6) + (hash << 16) - hash;
>
>        return hash;
>    }

You will need to modify it by adding a length, instead of looking for a zero
string terminator, of course.



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.