Computer Chess Club Archives


Search

Terms

Messages

Subject: Chess programming: hash table.

Author: Normand M. Blais

Date: 10:56:04 01/09/01


Hi,

I'm having problem with the hash table in my program. I'm getting confused with
the meaning of draft vs depth remaining. Let me show you what I do and maybe
some one can tell me if I'm doing something wrong.

// global variables
int ply;
int max_depth;


void iterf(){
    ply=0;
    for(int i=1; i<=max_iteration_depth; i++) {
        max_depth = i;
        int score = negamax(...i);
    }
}

void negamax(....depth) {
    hashrec *h;

    int draft = max_depth-ply;

    probe_hashtabel(h);

    if (draft <= h->depth) {
    // hash hit
    }

    movegen(ply);

    for (int i=0; i<move_list_len; i++) {
        int val = negamax(....depth-1);

        // if fail high
        store_hash(.....depth);
    }
}

Thanks,

Normand Blais




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.