Null move and transposition tables

Code, algorithms, languages, construction...
Post Reply
op12no2
Posts: 1
Joined: Mon Mar 17, 2014 10:09 am
Real Name: Colin Jenkins

Null move and transposition tables

Post by op12no2 » Mon Mar 17, 2014 10:26 am

Hi,

New here. I'm confused about null move and TT. Found a few threads with similar content but unresolved. Hope it's OK to ask for advice...

I've written a Javascript chess engine. It's very basic. Mailbox move gen, PV+killer+capture+PST move ordering; A/B + PV + null move + Q search. I recently added TT and all is well except when I come to try and add a successful null move beta cut into the TT. If I do that (with the orig depth), lots more nodes get searched and the whole thing is slower.

I figure the issues here are: I only do null move if not in check and depth > 2, so adding the null move beta cut into the TT without any flag saying where it came from could cause inappropriate beta cuts when the position is re-encountered? About to try this but it was not mentioned in the other treads i've seen.

Given the null move search is depth-2-1, the beta cut TT entry itself will be for depth, but it's child nodes will be for depth-3, 4 etc. I guess these are valid but can't quite get my head round it all.

Bottom line: Is there a standard way of handling null move and TT?

For the moment my search is based on the CPW engine overall shape (credited in the code) and I note that they do not do anything at all with the TT on null moves.

My code is online since it's javascript should anybody be interested...

http://op12no2.me/toys/lozzadev/lozza.js

http://op12no2.me/toys/lozzadev to execute. Max ply fixed at 10 for the moment while testing TT timing.

Post Reply