Killer moves (ply or depth?)

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
vladstamate
Posts: 161
Joined: Thu Jan 08, 2009 8:06 pm
Location: San Francisco, USA
Contact:

Killer moves (ply or depth?)

Post by vladstamate » Wed Jul 22, 2009 11:41 pm

Hi,

A quick question about killer moves. What I do is each time I find a move that moves the score above beta (and that is NOT a capture) I store it in an array indexed by search depth. When It comes to move ordering I tend to put those moves a bit higher in the list so that I (hopefully) search them earlier.

My question is killer moves should be indexed by ply and depth not just by depth?

In other words, lets say when searching first move (ply = 0) I find a good move at depth 3 that moves the score above beta so I store it at killers[ply+depth] (so killers[3]). That means next time I need to search for a move, when it my turn, I should find this move (hopefully) at ply=2 and depth 1 (again killers[3]). At the moment I am not taking ply into calculation but I think that is wrong.

Do I understand this correct?

Regards,
Vlad.

bob
Posts: 20478
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Killer moves (ply or depth?)

Post by bob » Wed Jul 22, 2009 11:54 pm

vladstamate wrote:Hi,

A quick question about killer moves. What I do is each time I find a move that moves the score above beta (and that is NOT a capture) I store it in an array indexed by search depth. When It comes to move ordering I tend to put those moves a bit higher in the list so that I (hopefully) search them earlier.

My question is killer moves should be indexed by ply and depth not just by depth?

In other words, lets say when searching first move (ply = 0) I find a good move at depth 3 that moves the score above beta so I store it at killers[ply+depth] (so killers[3]). That means next time I need to search for a move, when it my turn, I should find this move (hopefully) at ply=2 and depth 1 (again killers[3]). At the moment I am not taking ply into calculation but I think that is wrong.

Do I understand this correct?

Regards,
Vlad.
I've never tried "depth", only "ply" which makes more sense to me.

vladstamate
Posts: 161
Joined: Thu Jan 08, 2009 8:06 pm
Location: San Francisco, USA
Contact:

Re: Killer moves (ply or depth?)

Post by vladstamate » Thu Jul 23, 2009 9:01 pm

Thank you. I thought I was doing it wrong. Now that I corrected it, I get better move ordering and my branching factor dropped which is a nice side-effect.

Regards,
Vlad.

Post Reply