Saving killer moves...

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.
MOBMAT
Posts: 74
Joined: Sat Feb 04, 2017 10:57 pm
Location: USA

Saving killer moves...

Post by MOBMAT » Wed Apr 25, 2018 3:16 am

when (score >= beta), the literature says to only save quiet moves, but i saw in at least one code example where the save was not done when also in check (quiet or in-check).

is this typical, and if so, why doesn't the basic literature on killers mention it?

I could have missed it, of course.
Vince S
Author of MOBMAT

"Reductions, extensions, and pruning, oh my!"

tomitank
Posts: 200
Joined: Sat Mar 04, 2017 11:24 am
Location: Hungary

Re: Saving killer moves...

Post by tomitank » Wed Apr 25, 2018 4:45 am

MOBMAT wrote:when (score >= beta), the literature says to only save quiet moves, but i saw in at least one code example where the save was not done when also in check (quiet or in-check).

is this typical, and if so, why doesn't the basic literature on killers mention it?

I could have missed it, of course.
.. and dont save the promotion move.

This depends of move ordering (score of moves), prunings, reductions, extensions, etc.

You need to find the best variation..

Tamás

AndrewGrant
Posts: 472
Joined: Tue Apr 19, 2016 4:08 am
Location: U.S.A
Full name: Andrew Grant
Contact:

Re: Saving killer moves...

Post by AndrewGrant » Wed Apr 25, 2018 4:46 am

I only store quiets. Whether I am in check or not.

I have not seen this in any source, but If you have it is either because

1) The author made a mistake
2) The author determined it to be worth elo
3) With or without incheck is worth 0 elo, and they prefer one way over the other.

I'm going to test this now for my engine, and see what it is worth.

MOBMAT
Posts: 74
Joined: Sat Feb 04, 2017 10:57 pm
Location: USA

Re: Saving killer moves...

Post by MOBMAT » Wed Apr 25, 2018 2:11 pm

Rodent III does it.

but you are correct, there might be another reason for doing so.
Vince S
Author of MOBMAT

"Reductions, extensions, and pruning, oh my!"

User avatar
hgm
Posts: 23613
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Saving killer moves...

Post by hgm » Wed Apr 25, 2018 2:35 pm

Killers are moves that you want to try against other preceding moves of the opponent. If you are in check, you must resolve the check. It is very unlikely that any other moves of the opponent would also deliver check. An it is also unlikely that the best move to resolve a check would be a good move to try when not in check. (It might be a move with your King!) An if another move woul put you in check, it s unlikely you woul want to resolve it in the same way. (The check may come from a different direction, so you will have to interpose on another ray.) So saving evasions as killers can be expected to be bad. Likewise, trying killers to evade check also makes little sense; they might not even be legal.

tomitank
Posts: 200
Joined: Sat Mar 04, 2017 11:24 am
Location: Hungary

Re: Saving killer moves...

Post by tomitank » Wed Apr 25, 2018 4:40 pm

MOBMAT wrote:Rodent III does it.

but you are correct, there might be another reason for doing so.
Stockfish was the first as far as I know. Then Senpai 1.0, Rodent etc.. and tomitankChess does it as well.

Volker Annuss
Posts: 173
Joined: Mon Sep 03, 2007 7:15 am

Re: Saving killer moves...

Post by Volker Annuss » Wed Apr 25, 2018 6:48 pm

Captures can become killers in Arminius to have these capture moves searched before others.

There is one important exception. Moves that capture the last moved piece never become killers.

jwes
Posts: 778
Joined: Sat Jul 01, 2006 5:11 am

Re: Saving killer moves...

Post by jwes » Wed Apr 25, 2018 7:49 pm

Volker Annuss wrote:Captures can become killers in Arminius to have these capture moves searched before others.

There is one important exception. Moves that capture the last moved piece never become killers.
Do you also check if the move is still a capture?

Volker Annuss
Posts: 173
Joined: Mon Sep 03, 2007 7:15 am

Re: Saving killer moves...

Post by Volker Annuss » Wed Apr 25, 2018 8:49 pm

No, any move that is not en passant, underpromotion and not moving to the same square as the move one ply before is a killer move. When ordering moves they get a bonus that makes killers more important than quiet moves and captures more important than most other captures.

AndrewGrant
Posts: 472
Joined: Tue Apr 19, 2016 4:08 am
Location: U.S.A
Full name: Andrew Grant
Contact:

Re: Saving killer moves...

Post by AndrewGrant » Wed Apr 25, 2018 10:50 pm

Went ahead and tried the logic from your post.

While Intuitive, it seems to be not worth any elo...

Test 1) Don't store into the killer table when we are in check

SPRT @ 5.0+0.05s Threads=1 Hash=8MB
LLR: -2.24 (-2.20, 2.20) [0.00, 5.00]
Games: 5475 W: 1324 L: 1398 D: 2753

Test 2) Don't store or read the killer table when we are in check

SPRT @ 3.0+0.03s Threads=1 Hash=2MB
LLR: 2.21 (-2.20, 2.20) [0.00, 5.00]
Games: 8225 W: 2270 L: 2119 D: 3836

SPRT @ 15.0+0.15s Threads=1 Hash=32MB
LLR: -0.79 (-2.20, 2.20) [0.00, 5.00]
Games: 5375 W: 1137 L: 1146 D: 3092

I'll give the longer test some more time, as the error bars are still decently large. The gain (if any) might just be the slight speedboost from not trying to make the killer moves which, as you said, are likely illegal when in check anyway.

Post Reply