summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-21chess-legal-plies: Simplify the :color case.Mario Lang
2014-04-21chess-pos-search*: New function.Mario Lang
Search for several pieces in one swipe of the board, returning an alist of pieces and their indices. Use this in chess-legal-plies for the common case where we want all legal plies for a certain color makes the testsuite time go down to 9m57s.
2014-04-21chess-perft.el: Add another test case with depth 5.Mario Lang
Now that our execution time has been reduced significantly, add a bigger test case to improve the testsuite coverage. "make perft" now takes 10m33s.
2014-04-21chess-search-position: 20% performance improvement by treating ray pieces ↵Mario Lang
commonly. When we search for pieces of a certain color, we iterate over all results from all pieces of that color. However, this is redunant as we end up to check the compass rose twice, once for bishops/rooks and once for queens. We actually just need to check all 8 directions once and keep a list of what piece type can move in which direction.
2014-04-21chess-search-position: Move castling check for rooks out of the direction loop.Mario Lang
2014-04-20chess-pos.el: Eliminate unused conditional.Mario Lang
2014-04-20chess-pos.el: Collapse two chess-pos-piece-p calls into one chess-pos-piece ↵Mario Lang
call. Unexpected but true, this increases performance noticeably.
2014-04-20chess-pos.el: Refactor/simplify 10x12 code.Mario Lang
2014-04-20chess-pos.el: Convert 3 more chess-incr-index calls to chess-next-index.Mario Lang
2014-04-20chess-pos.el: Convert 2 more calls to chess-incr-index to chess-next-index.Mario Lang
2014-04-20chess-pos.el: Convert 4 more chess-incr-index calls to chess-next-index.Mario Lang
2014-04-19chess-knight-directions: New constant.Mario Lang
2014-04-19chess-pos.el: Define constant lists of directions various pieces can move to.Mario Lang
This avoid useless consing and makes things a bit more reusable.
2014-04-19chess-next-index: A 10x12 mailbox based function for advancing indices.Mario Lang
This one is a lot faster then chess-incr-index. Casual replacing in some caller sites yields about 30% performance improvement, more to be gained if more callers are converted.
2014-04-19chess-polyglot.el: Docs + one assert.Mario Lang
2014-04-19chess-perft: Interactive spec and progress info.Mario Lang
2014-04-18Silly typo.Mario Lang
2014-04-18chess-perft: Refactor to avoid repeatedly visiting the same list of plies at ↵Mario Lang
depth 1.
2014-04-18Remove obsolete note.Mario Lang
2014-04-18chess-perft: Simplify en-passant checks.Mario Lang
2014-04-18chess-pos-move: Really remove castling ability if rook has been moved.Mario Lang
This one was *very subtle. Looking at the code, we already tried to prevent this case, and it evenw orked for *some* instances. The problem is that castling flags are boolean in the position structure, chess-pos-can-castle determines the rook location from the position if castling flag is true. But we have already moved the rook around in chess-pos-move before we do the fixup stuff, so chess-pos-can-castle is just wrong in some cases. Fix is simple, call chess-pos-can-castle before we modify the position, and use these values later. This fixes the remaining perft mixmatches.
2014-04-18chess-perft.el: Count en passant and promotion plies.Mario Lang
Also, add ERT tags to selectively run tests which validate a certain ply property, like :castle or :check.
2014-04-18Add the perft makefile target for easy running of the testsuite.Mario Lang
2014-04-18chess-legal-plies: It is illegal to castle if the king is in check right now.Mario Lang
2014-04-18chess-legal-plies: Stop generating duplicate castling moves.Mario Lang
2014-04-18chess-legal-plies: Generate R and B promotions in addtion to Q and N.Mario Lang
2014-04-18chess-perft.el: ert tests to find move generator bugs.Mario Lang
2014-04-17chess-perft.el: move generator testing.Mario Lang
2014-04-17chess-ics.el: Add guest login support for chess.net.Mario Lang
2014-04-16chess-ai.el: Spare computing time by consulting the opening book.Mario Lang
2014-04-16chess-polyglot.el: Ship default book file.Mario Lang
Also, move some customisation settings from chess-uci to chess-polyglot.
2014-04-15chess-ai.el: Oops, cl-delete-if only at runtime.Mario Lang
2014-04-15chess-ai.el: No need for cl-sort.Mario Lang
2014-04-14Build fruit and glaurung modules.Mario Lang
2014-04-13chess-ai.el: Require cl-lib at runtime for cl-sort.Mario Lang
2014-04-10chess-ai.el: Better top-level move ordering and quiescence pruning.Mario Lang
2014-04-10chess-ai.el: Rename functions and fix a subtle bug in quiescence search ↵Mario Lang
termination.
2014-04-10chess-ai.el: Cleanup.Mario Lang
2014-04-09chess-ai.el: Quiescence search.Mario Lang
This change finally fixes the internal Emacs Lisp based AI enough to be an interesting opponent. Search is of course very slow, and rather shallow (2 plies + quiescence by default) but the AI can finally defend itself against simple attacks, and sees opportunities as expected.
2014-04-09chess-legal-plies: If chess-ply-allow-interactive-query is nil, generate Q ↵Mario Lang
and N promotions.
2014-04-08chess-ai.el: Ply ordering + a bit of progress reporting.Mario Lang
2014-04-08chess-ai.el: Simpler search function, progress reporter and bug fixed.Mario Lang
2014-04-07chess-search-position: Also consider opponent king moves when checking for ↵Mario Lang
check. With this the rule that there always needs to be one square between kings is honours in chess-legal-plies. Without this fix, a move next to the opponents king was considered legal.
2014-04-06TODO items done since we switched to tabulated-list-mode.Mario Lang
2014-04-04Fix docstrings.Mario Lang
2014-04-03chess-ics.el: Pacify compiler.Mario Lang
2014-04-03chess-ics.el: use tabulated-list-mode.Mario Lang
This eliminates roughly 100 lines of boilerplate code.
2014-04-02ICC seek removal was broken as well.Mario Lang
2014-04-02Try to improve the promotion situation on ICS by allowing chess-ply to query ↵Mario Lang
for the promotion piece.
2014-04-02Fix ics seek ads removal.Mario Lang