Computer Chess Club Archives


Search

Terms

Messages

Subject: Chess programming: hash table. (corrected post)

Author: Normand M. Blais

Date: 12:16:50 01/09/01

Go up one level in this thread


On January 09, 2001 at 13:56:04, Normand M. Blais wrote:

Hi,

I'm having problems with the hash table in my program. Also, I'm getting
confused with the meaning of draft vs depth remaining.

// global variables
int ply;
int max_depth;


void iterative_deepening_fun(){
    ply=0;
    for(int i=1; i<=max_iteration_depth; i++) {
        max_depth = i;
        int score = negamax(-INFINITY,INFINITY,i);
    }
}

int negamax(alpha,beta,depth) {
    hashrec *h;

    // is this correct?
    int draft = max_depth - ply;

    probe_hashtabel(h);

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

    // generate moves
    movegen(ply);

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

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

    return alpha;
}

Thanks,

Normand Marcel 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.