]>
code.delx.au - gnu-emacs-elpa/log
Mario Lang [Sat, 26 Apr 2014 12:08:31 +0000 (14:08 +0200)]
chess-pos.el: Another 10% speedup by precalculating sliding piece rays.
Mario Lang [Sat, 26 Apr 2014 11:01:29 +0000 (13:01 +0200)]
chess-perft.el: Another test case to improve coverage.
make perft now takes 13m45s.
Mario Lang [Fri, 25 Apr 2014 21:47:03 +0000 (23:47 +0200)]
chess-ai-eval-static: Avoid checking for mate if we just count mobility.
Mario Lang [Fri, 25 Apr 2014 04:05:37 +0000 (06:05 +0200)]
chess-search-position: Merge K testing into BRQ testing.
Another noticeable speedup.
Mario Lang [Thu, 24 Apr 2014 13:30:04 +0000 (15:30 +0200)]
chess-plain.el: Rename chess-plain-border-chars to chess-plain-border-style.
Also, remove chess-plain-draw-borders, if chess-plain-boder-style is nil, we
do not draw any borders now.
Mario Lang [Wed, 23 Apr 2014 16:23:38 +0000 (18:23 +0200)]
Misc. fixes.
Mario Lang [Wed, 23 Apr 2014 13:48:03 +0000 (15:48 +0200)]
docstring fixes.
Mario Lang [Tue, 22 Apr 2014 19:15:10 +0000 (21:15 +0200)]
chess-ics.el: oics definition.
Mario Lang [Mon, 21 Apr 2014 17:25:16 +0000 (19:25 +0200)]
chess-legal-plies: Simplify the :color case.
Mario Lang [Mon, 21 Apr 2014 11:41:56 +0000 (13:41 +0200)]
chess-pos-search*: New function.
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.
Mario Lang [Mon, 21 Apr 2014 09:24:48 +0000 (11:24 +0200)]
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.
Mario Lang [Mon, 21 Apr 2014 09:03:19 +0000 (11:03 +0200)]
chess-search-position: 20% performance improvement by treating ray pieces 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.
Mario Lang [Mon, 21 Apr 2014 08:24:47 +0000 (10:24 +0200)]
chess-search-position: Move castling check for rooks out of the direction loop.
Mario Lang [Sun, 20 Apr 2014 21:36:37 +0000 (23:36 +0200)]
chess-pos.el: Eliminate unused conditional.
Mario Lang [Sun, 20 Apr 2014 11:37:06 +0000 (13:37 +0200)]
chess-pos.el: Collapse two chess-pos-piece-p calls into one chess-pos-piece call.
Unexpected but true, this increases performance noticeably.
Mario Lang [Sun, 20 Apr 2014 01:16:29 +0000 (03:16 +0200)]
chess-pos.el: Refactor/simplify 10x12 code.
Mario Lang [Sun, 20 Apr 2014 00:41:33 +0000 (02:41 +0200)]
chess-pos.el: Convert 3 more chess-incr-index calls to chess-next-index.
Mario Lang [Sat, 19 Apr 2014 23:07:01 +0000 (01:07 +0200)]
chess-pos.el: Convert 2 more calls to chess-incr-index to chess-next-index.
Mario Lang [Sat, 19 Apr 2014 22:27:13 +0000 (00:27 +0200)]
chess-pos.el: Convert 4 more chess-incr-index calls to chess-next-index.
Mario Lang [Sat, 19 Apr 2014 19:00:26 +0000 (21:00 +0200)]
chess-knight-directions: New constant.
Mario Lang [Sat, 19 Apr 2014 18:22:09 +0000 (20:22 +0200)]
chess-pos.el: Define constant lists of directions various pieces can move to.
This avoid useless consing and makes things a bit more reusable.
Mario Lang [Sat, 19 Apr 2014 17:17:35 +0000 (19:17 +0200)]
chess-next-index: A 10x12 mailbox based function for advancing indices.
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.
Mario Lang [Sat, 19 Apr 2014 09:58:18 +0000 (11:58 +0200)]
chess-polyglot.el: Docs + one assert.
Mario Lang [Sat, 19 Apr 2014 01:23:15 +0000 (03:23 +0200)]
chess-perft: Interactive spec and progress info.
Mario Lang [Fri, 18 Apr 2014 15:09:40 +0000 (17:09 +0200)]
Silly typo.
Mario Lang [Fri, 18 Apr 2014 14:32:44 +0000 (16:32 +0200)]
chess-perft: Refactor to avoid repeatedly visiting the same list of plies at depth 1.
Mario Lang [Fri, 18 Apr 2014 14:00:34 +0000 (16:00 +0200)]
Remove obsolete note.
Mario Lang [Fri, 18 Apr 2014 11:51:46 +0000 (13:51 +0200)]
chess-perft: Simplify en-passant checks.
Mario Lang [Fri, 18 Apr 2014 11:32:04 +0000 (13:32 +0200)]
chess-pos-move: Really remove castling ability if rook has been moved.
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.
Mario Lang [Fri, 18 Apr 2014 09:20:50 +0000 (11:20 +0200)]
chess-perft.el: Count en passant and promotion plies.
Also, add ERT tags to selectively run tests which validate a certain
ply property, like :castle or :check.
Mario Lang [Thu, 17 Apr 2014 23:45:42 +0000 (01:45 +0200)]
Add the perft makefile target for easy running of the testsuite.
Mario Lang [Thu, 17 Apr 2014 23:14:16 +0000 (01:14 +0200)]
chess-legal-plies: It is illegal to castle if the king is in check right now.
Mario Lang [Thu, 17 Apr 2014 23:13:31 +0000 (01:13 +0200)]
chess-legal-plies: Stop generating duplicate castling moves.
Mario Lang [Thu, 17 Apr 2014 23:11:49 +0000 (01:11 +0200)]
chess-legal-plies: Generate R and B promotions in addtion to Q and N.
Mario Lang [Thu, 17 Apr 2014 23:10:02 +0000 (01:10 +0200)]
chess-perft.el: ert tests to find move generator bugs.
Mario Lang [Thu, 17 Apr 2014 11:13:46 +0000 (13:13 +0200)]
chess-perft.el: move generator testing.
Mario Lang [Thu, 17 Apr 2014 06:28:32 +0000 (08:28 +0200)]
chess-ics.el: Add guest login support for chess.net.
Mario Lang [Wed, 16 Apr 2014 14:36:53 +0000 (16:36 +0200)]
chess-ai.el: Spare computing time by consulting the opening book.
Mario Lang [Wed, 16 Apr 2014 13:06:08 +0000 (15:06 +0200)]
chess-polyglot.el: Ship default book file.
Also, move some customisation settings from chess-uci to chess-polyglot.
Mario Lang [Tue, 15 Apr 2014 14:37:01 +0000 (16:37 +0200)]
chess-ai.el: Oops, cl-delete-if only at runtime.
Mario Lang [Tue, 15 Apr 2014 13:59:37 +0000 (15:59 +0200)]
chess-ai.el: No need for cl-sort.
Mario Lang [Mon, 14 Apr 2014 10:27:03 +0000 (12:27 +0200)]
Build fruit and glaurung modules.
Mario Lang [Sun, 13 Apr 2014 10:21:22 +0000 (12:21 +0200)]
chess-ai.el: Require cl-lib at runtime for cl-sort.
Mario Lang [Thu, 10 Apr 2014 07:47:59 +0000 (09:47 +0200)]
chess-ai.el: Better top-level move ordering and quiescence pruning.
Mario Lang [Wed, 9 Apr 2014 22:53:37 +0000 (00:53 +0200)]
chess-ai.el: Rename functions and fix a subtle bug in quiescence search termination.
Mario Lang [Wed, 9 Apr 2014 22:31:20 +0000 (00:31 +0200)]
chess-ai.el: Cleanup.
Mario Lang [Wed, 9 Apr 2014 21:29:05 +0000 (23:29 +0200)]
chess-ai.el: Quiescence search.
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.
Mario Lang [Wed, 9 Apr 2014 12:55:03 +0000 (14:55 +0200)]
chess-legal-plies: If chess-ply-allow-interactive-query is nil, generate Q and N promotions.
Mario Lang [Tue, 8 Apr 2014 09:49:26 +0000 (11:49 +0200)]
chess-ai.el: Ply ordering + a bit of progress reporting.
Mario Lang [Tue, 8 Apr 2014 07:57:46 +0000 (09:57 +0200)]
chess-ai.el: Simpler search function, progress reporter and bug fixed.
Mario Lang [Mon, 7 Apr 2014 01:42:42 +0000 (03:42 +0200)]
chess-search-position: Also consider opponent king moves when checking for 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.
Mario Lang [Sun, 6 Apr 2014 19:08:33 +0000 (21:08 +0200)]
TODO items done since we switched to tabulated-list-mode.
Mario Lang [Fri, 4 Apr 2014 09:26:37 +0000 (11:26 +0200)]
Fix docstrings.
Mario Lang [Thu, 3 Apr 2014 12:14:37 +0000 (14:14 +0200)]
chess-ics.el: Pacify compiler.
Mario Lang [Thu, 3 Apr 2014 12:10:46 +0000 (14:10 +0200)]
chess-ics.el: use tabulated-list-mode.
This eliminates roughly 100 lines of boilerplate code.
Mario Lang [Wed, 2 Apr 2014 13:11:06 +0000 (15:11 +0200)]
ICC seek removal was broken as well.
Mario Lang [Wed, 2 Apr 2014 11:26:02 +0000 (13:26 +0200)]
Try to improve the promotion situation on ICS by allowing chess-ply to query for the promotion piece.
Mario Lang [Wed, 2 Apr 2014 09:46:57 +0000 (11:46 +0200)]
Fix ics seek ads removal.
Mario Lang [Tue, 1 Apr 2014 23:37:37 +0000 (01:37 +0200)]
Eliminate a few compiler warnings due to missing require or cl runtime use.
Mario Lang [Tue, 1 Apr 2014 16:00:00 +0000 (18:00 +0200)]
For some reason, chess-pos.el needs to be compiled first.
Mario Lang [Tue, 1 Apr 2014 14:47:57 +0000 (16:47 +0200)]
chess-rf-to-index: Fix assertion.
Should be and, not or. cl-check-type is more clear anyway.
Mario Lang [Mon, 31 Mar 2014 22:02:19 +0000 (00:02 +0200)]
chess-clock-tick-tock: Fix an error on first call.
First time around, chess-clock-last-time is nil.
Mario Lang [Mon, 31 Mar 2014 17:24:39 +0000 (19:24 +0200)]
chess-pos.el: Reorder some definitions to pacify compiler.
Also, actually disable assertions during compilation (as intended)
which increases performance by roughly 30%.
Mario Lang [Sun, 30 Mar 2014 18:16:27 +0000 (20:16 +0200)]
Refactor chess-plain-handler a bit.
Mario Lang [Sun, 30 Mar 2014 18:08:21 +0000 (20:08 +0200)]
Try to fix
045a93cb98dfd320e756ea9d9799ea92f0900bc6 a different way.
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?
Mario Lang [Sun, 30 Mar 2014 18:03:11 +0000 (20:03 +0200)]
Fix a rather serious bug in chess-pos-move:
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.
Mario Lang [Sun, 30 Mar 2014 15:07:11 +0000 (17:07 +0200)]
Try to fix a reentrancy bug in chess-display-move.
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.
Mario Lang [Sun, 30 Mar 2014 14:02:24 +0000 (16:02 +0200)]
UCI engines *crash* on FENs with missing trailing spaces.
Mario Lang [Sun, 30 Mar 2014 11:40:50 +0000 (13:40 +0200)]
chess-plain-piece-chars: Include a suggestion for unicode figures.
Mario Lang [Sun, 30 Mar 2014 10:23:27 +0000 (12:23 +0200)]
chess-plain-piece-chars: Provide some useful default settings via custom :type.
Mario Lang [Sun, 30 Mar 2014 01:11:30 +0000 (03:11 +0200)]
Provide unicode box drawing characters as a possible choice for chess-plain-border-chars via custom :type.
Mario Lang [Sat, 29 Mar 2014 18:10:16 +0000 (19:10 +0100)]
chess-uci.el: Use the post-move event to work around a display bug when the handler directly replies with a move because it was found in the book.
Mario Lang [Sat, 29 Mar 2014 15:28:16 +0000 (16:28 +0100)]
Decompress a polyglot book file if it was compressed.
Mario Lang [Fri, 28 Mar 2014 11:23:25 +0000 (12:23 +0100)]
Pacify byte compiler.
Mario Lang [Fri, 28 Mar 2014 10:57:29 +0000 (11:57 +0100)]
Make the strength of book replies configurable.
Mario Lang [Fri, 28 Mar 2014 01:49:00 +0000 (02:49 +0100)]
Simplify the search in chess-polyglot.el.
Mario Lang [Thu, 27 Mar 2014 23:51:18 +0000 (00:51 +0100)]
Fixes to polyglot code.
Mario Lang [Wed, 26 Mar 2014 09:52:52 +0000 (10:52 +0100)]
chess-uci: Choose a (random) move from the book.
Mario Lang [Wed, 26 Mar 2014 09:26:50 +0000 (10:26 +0100)]
More docstring fixes.
Mario Lang [Wed, 26 Mar 2014 00:27:01 +0000 (01:27 +0100)]
An asterisk no longer signifies a user option.
Mario Lang [Wed, 26 Mar 2014 00:01:21 +0000 (01:01 +0100)]
Document and refactor chess-polyglot.el.
Mario Lang [Tue, 25 Mar 2014 20:51:47 +0000 (21:51 +0100)]
Optionally allow UCI engines to query a book provided by polyglot.
Mario Lang [Tue, 25 Mar 2014 19:38:25 +0000 (20:38 +0100)]
Low level polyglot binary opening book support.
Mario Lang [Mon, 24 Mar 2014 19:23:50 +0000 (20:23 +0100)]
chess-pgn-insert-and-show-position
Mario Lang [Mon, 24 Mar 2014 18:45:25 +0000 (19:45 +0100)]
Docstrings.
Mario Lang [Mon, 24 Mar 2014 16:06:23 +0000 (17:06 +0100)]
Rename chess-engine-sentinal to chess-engine-sentinel and simplify a bit.
Mario Lang [Mon, 24 Mar 2014 15:42:55 +0000 (16:42 +0100)]
Update phalanx URL.
Mario Lang [Mon, 24 Mar 2014 13:44:39 +0000 (14:44 +0100)]
Parse UCI long algebraic moves correctly.
Mario Lang [Mon, 24 Mar 2014 13:36:41 +0000 (14:36 +0100)]
chess-pos-can-castle: Avoid error if there is no king on the board.
Mario Lang [Mon, 24 Mar 2014 09:08:02 +0000 (10:08 +0100)]
More UCI engines: fruit and glaurung.
Mario Lang [Mon, 24 Mar 2014 09:03:22 +0000 (10:03 +0100)]
Make engine searching work again.
Mario Lang [Mon, 24 Mar 2014 00:58:43 +0000 (01:58 +0100)]
(incomplete) support for the stockfish engine.
Mario Lang [Mon, 24 Mar 2014 00:41:12 +0000 (01:41 +0100)]
Check for internal-default-process-filter when deciding to install our default filter.
Mario Lang [Tue, 4 Mar 2014 10:50:02 +0000 (11:50 +0100)]
Replace obsolete `time-to-seconds' with `float-time'.
Mario Lang [Mon, 3 Mar 2014 17:21:36 +0000 (18:21 +0100)]
Do not use `delete-backward-char'.
Mario Lang [Mon, 3 Mar 2014 09:20:47 +0000 (10:20 +0100)]
`last-command-char' is gone in Emacs24, it is `last-command-event' now.
Mario Lang [Mon, 3 Mar 2014 00:04:02 +0000 (01:04 +0100)]
Fix (some) Emacs24 compatibility issues.
John Wiegley [Mon, 2 Dec 2013 10:59:20 +0000 (03:59 -0700)]
Update .gitmodules
John Wiegley [Thu, 31 Oct 2013 22:17:56 +0000 (17:17 -0500)]
Update submodule pieces
Mario Lang [Mon, 16 Sep 2013 18:37:16 +0000 (20:37 +0200)]
Mention `chess-default-engine' and prefix argument in `chess' docstring.