Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: TCSP move generator

Author: Fermin Serrano

Date: 10:03:07 05/09/03

Go up one level in this thread


Hi, I fixed it, I downloaded sources from other site and it had a bug. Last
night I downloaded from oficial site and no problem!!!!. It is curious, because
same people on forums had the same problem, so I suspect there is an unoffial
version with a bug. (there is a little difference with enpassant pawn code)

Ok, about null move, this is my code for R=2(take into account that it is in
test yet, and maybe it has bugs, but I think is all ok. (I must programming
avoid zugwang position) (sorry, comments are in spanish)

        /* Primero realizamos un movimiento nulo.
    	   Condiciones.
       		- No estar en jaque.
       		- No debemos haber realizado en la jugada anterior un movimiento nulo.
       		- Evitar el riesgo de zugzwang (entramos en un final) (¡¡ Por
implementar !!)
       		- La profundidad es >= R + 1
       	   Lo que haremos:
       		- Si la valoracion es proxima a -mate, sumar una extension
       		- Si la valoracion es >= beta, podar */
#ifdef USAR_MN
    if ((!jaque) && (contador_movimiento_nulo % 2 !=1) && (!examinando_vp) &&
(profundidad>=R+1)) {
                hacer_movimiento_nulo();
        		x=-calcular(-beta,-beta+1,profundidad-1-R);
                deshacer_movimiento_nulo();
        		if (x>=beta) return beta;
                if (x<-INFINITO+10*MAX_JUGADAS) extensiones++;
    }
#endif


my initial contador_movimiento_nulo=2 (so I can easily know if last move was
null (a mod operation) and if I previously made one before (then
contador_moviento_nulo>2). I never abort search until null_move has their
initial value.
you must take into account repetitions, as you pass the turn and there is a null
move. In this issue I do the following:


        if (contador_movimiento_nulo==NO_HAY_MOVIMIENTO_NULO) if (num_jugada &&
calcular_num_de_repeticiones())
                return 0;


My stadistics (bench with 6 ply):

With null_move:

Nodes: 1228009
Best time: 9814 ms
Nodes per second: 125128 (Score: 0.515)

Without null_move

Nodes: 326401
Best time: 2423 ms
Nodes per second: 134709 (Score: 0.554)
Keops:

For your two problems
1) Maybe search never return because you can do a null move two consicutive
times. (infinity loop)
2) Never abort the search until no null_moves has been done.

I hope your news.....




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.