summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2014-04-02Eliminate a few compiler warnings due to missing require or cl runtime use.Mario Lang
2014-04-01For some reason, chess-pos.el needs to be compiled first.Mario Lang
2014-04-01chess-rf-to-index: Fix assertion.Mario Lang
Should be and, not or. cl-check-type is more clear anyway.
2014-04-01chess-clock-tick-tock: Fix an error on first call.Mario Lang
First time around, chess-clock-last-time is nil.
2014-03-31chess-pos.el: Reorder some definitions to pacify compiler.Mario Lang
Also, actually disable assertions during compilation (as intended) which increases performance by roughly 30%.
2014-03-30Refactor chess-plain-handler a bit.Mario Lang
2014-03-30Try to fix 045a93cb98dfd320e756ea9d9799ea92f0900bc6 a different way.Mario Lang
Restore the old behaviour (run game hooks before painting move), but move the post-move hook from chess-game-move to chess-display-move. This fixes the reentrancy bug while preserving error checks being done in the game hooks. Maybe rename post-move to post-display-move?
2014-03-30Fix a rather serious bug in chess-pos-move:Mario Lang
We were checking for king or rook moves to remove our castling flags if necessary, but we did not remove the opponents castling flags if we took one of their rooks. This led to rather invalid positions. You could castle with your king and the opponents piece.
2014-03-30Try to fix a reentrancy bug in chess-display-move.Mario Lang
The problem occurs with engine modules which reply to move events with move events directly, i.e. cvhess-ai and chess-uci when replying with a book move. Since chess-display-move first performs chess-game-move followed by chess-display-paint-move, we end up with the plies getting painted in reverse. This is visible when pieces are taken. If we paint the move first and then emit the move event on the game, the problem goes away.
2014-03-30UCI engines *crash* on FENs with missing trailing spaces.Mario Lang
2014-03-30chess-plain-piece-chars: Include a suggestion for unicode figures.Mario Lang
2014-03-30chess-plain-piece-chars: Provide some useful default settings via custom :type.Mario Lang
2014-03-30Provide unicode box drawing characters as a possible choice for ↵Mario Lang
chess-plain-border-chars via custom :type.
2014-03-29chess-uci.el: Use the post-move event to work around a display bug when the ↵Mario Lang
handler directly replies with a move because it was found in the book.
2014-03-29Decompress a polyglot book file if it was compressed.Mario Lang
2014-03-28Pacify byte compiler.Mario Lang
2014-03-28Make the strength of book replies configurable.Mario Lang
2014-03-28Simplify the search in chess-polyglot.el.Mario Lang