From 51a97cafe5d46d948b1adecb76c709724de73af2 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Mon, 21 Apr 2014 11:24:48 +0200 Subject: chess-perft.el: Add another test case with depth 5. Now that our execution time has been reduced significantly, add a bigger test case to improve the testsuite coverage. "make perft" now takes 10m33s. --- chess-perft.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chess-perft.el') diff --git a/chess-perft.el b/chess-perft.el index 2562120..673ce9e 100644 --- a/chess-perft.el +++ b/chess-perft.el @@ -87,7 +87,7 @@ If not called interactively the result is a list of the form (let ((progress (when (called-interactively-p 'any) (make-progress-reporter "Perft... " 0 (length plies)))) (index 0)) - (when (= depth 3) (accept-process-output)) + (when (and (not noninteractive) (= depth 2)) (accept-process-output)) (dolist (ply plies) (unless (chess-ply-final-p ply) (cl-multiple-value-bind (n c e ca p ch cm) @@ -125,6 +125,10 @@ If not called interactively the result is a list of the form :tags '(:capture :check :checkmate) (should (equal (chess-perft (chess-pos-create) 4) '(197281 1576 0 0 0 469 8)))) +(ert-deftest chess-perft-startpos-depth5 () + :tags '(:capture :en-passant :check :checkmate) + (should (equal (chess-perft (chess-pos-create) 5) '(4865609 82719 258 0 0 27351 347)))) + (ert-deftest chess-perft-kiwipete-depth1 () :tags '(:capture :castle) (let ((position -- cgit v1.2.3