Mysterious random moves

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Mysterious random moves

Post by pedrox »

The latest version of DanaSah plays variants normal and fischeramdon.

If I use the variant normal and play e4 as human, the program responds e5 (without book) after 8 seconds and 5,134,342 nodes. I can start 1000 times the game that I always get the same result. This is what is expected.

Now I am going to the menu (Arena) and tell the program to play a game chess960, I get the new command, then the variant fischeramdon command and the command setboard with the starting position. I play the game and OK.

Now I start a new game normal (without starting the engine) e5 and after I get d5 (sometimes e6 or e5) and the number of nodes may vary. Now every time I start a new game I have in response to e5 always d5.

Why?

I clear hashtables y calc hash every time I get the new command and when I receive the command setboard.

Could this be a case that when you play with test of positions as Noomem2006 get different results?

Pedro
User avatar
Roman Hartmann
Posts: 295
Joined: Wed Mar 08, 2006 8:29 pm

Re: Mysterious random moves

Post by Roman Hartmann »

Hi Pedro,
you clear the hash tables you write but do you also clear the killer moves when you start a new game? Depending on how you use them it might have an influence.

Roman
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Mysterious random moves

Post by pedrox »

Yes, Killer moves are cleared at the function iterate. If I start 100 times I get the same result, the problem was when I to go to chess960 and then switch back to normal variant.

Thanks

Pedro
Alessandro Scotti

Re: Mysterious random moves

Post by Alessandro Scotti »

Some uninitialized variable?
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Mysterious random moves

Post by pedrox »

In the functions:

-- Generate moves
-- Make move
-- Undo

For castling usage:

If (variant == fischerandom) (

(
else (

(

The remaining functions are the same for the 2 variants, each time I start a game by default makes with the normal variants, if I receive the command variant fischerandom and setboard then shift to this option.

I not think that any variable leaves not initialized.

Thanks

Pedro