Yann Dirson [Mon, 20 Oct 2014 09:03:01 +0000]
Remove *.o on "make clean"
Yann Dirson [Mon, 20 Oct 2014 09:00:01 +0000]
Simplify man page production rule
No need for any intermediary files, and be sure not to include a
timestamp in the compressed manpage, for reproducibility concerns.
Yann Dirson [Mon, 20 Oct 2014 08:53:00 +0000]
Fix install rule for packaging
* $(DESTDIR) must be used everywhere
* /usr/games/ may not exist
* DATADIR ought to be easy to override when autodetection is not needed,
to avoid build-dependency on XBoard.
H.G.Muller [Mon, 20 Oct 2014 08:27:48 +0000]
Change variants list in plugin-spec file
The list of variants in the .eng file is changed to contain variant classes
rather than individual variant names, as this will likely be what the 0.1
version of the standard will require.
H.G.Muller [Sun, 19 Oct 2014 22:10:13 +0000]
Fix some warnings
H.G.Muller [Sun, 19 Oct 2014 21:48:53 +0000]
Allow user castling in Mighty Lion
A large part of the castling code is implemented: MakeMove can perform it,
ParseMove can recognize it. The routine GenCastlings generates them,
but without paying attention to (moving through) check, and Highlight
marks the King's to-square in the color FEN.
The castlings are only generated by ListMoves, added to the list used
for legality testing of input moves, though (and then only in variant lion).
Not yet in GenNonCaptures, so HaChu would never castle itself, but will
accept it if the user does so. It would even accept castling through check,
but the idea is that legality checking in the GUI would prevent the user
from entering that.
H.G.Muller [Sat, 11 Oct 2014 09:51:07 +0000]
Attempt to fix getting trapped in ponder mode
HaChu was sometimes trapped in its ponder search, because the pending
input that should wake it up out of ponder (i.e. the opponent's move)
had been read from the pipe to the input buffer, hiding it from the
test for pending input. Buffering linewise might prevent commands
to be buffered before HaChu actually starts to read them.
H.G.Muller [Sat, 13 Sep 2014 12:43:04 +0000]
Add logo
Install the logo in the system's logo directory conform the auto-logo
standard, as /usr/share/games/plugins/logos/hachu.png .
H.G.Muller [Fri, 12 Sep 2014 21:25:49 +0000]
Add plugin-spec file and notice LDFLAGS
A plugin-spec file is added to comply with the GUI auto-install standard.
The Makefile installs this, and now also pays attention to the LDFLAGS.
H.G.Muller [Mon, 25 Aug 2014 12:42:57 +0000]
Fix size of epVictim array
This has to be 9, as element 0 is used as a flag when a Demon burns
its environment.
H.G.Muller [Thu, 12 Jun 2014 11:12:24 +0000]
Bump version number to 0.20
H.G.Muller [Wed, 11 Jun 2014 20:52:18 +0000]
Fix promotion on entry
The promote on entry option would also allow promotion when pieces
in their own promotion zone entered the zone of the opponent!
H.G.Muller [Mon, 9 Jun 2014 06:59:01 +0000]
Fix null-termination of internal FEN
When setting up a position, pieces of an earlier setup position with
longer FEN could be appended to it, and would be placed off-board
on the last rank.
H.G.Muller [Mon, 2 Jun 2014 18:04:40 +0000]
Allow larger maximum depth
MAXPLY was increased to 60, as in some tsume problems amazing depth
can be reached.
H.G.Muller [Mon, 2 Jun 2014 17:59:49 +0000]
Use returned depth in hash table
The depth returned by the search is now also hashed. This gives an
enormous speedup of tsume searches, as mates are assigned 'infinite' depth,
and thus forced distant mates also, so that they remain valid in
subsequent iterations without re-search. For safety the depth assigned to
repetitions was limited to the current iteration.
H.G.Muller [Mon, 2 Jun 2014 17:55:02 +0000]
Fix tsume condition when both K and CP present
A position where the side-to-be-mated has both K and CP is never
a check, and should thus not be allowed to occur in a tsume problem.
This was not properly detected. (Strictly speaking it can be a check
if both can be captured on the same move by a Lion/Falcon/Eagle,
but for now we ignore that.)
H.G.Muller [Mon, 2 Jun 2014 17:49:41 +0000]
Fix setting up of positions without King
Without King, royal[] would not be set, and retain the value it had
in the standard setup (as it was not cleared either). This would usually
point outside the piece list, but occasionally it designated an on-board
piece as royal, which then could make HaChu think it was checkmated in
the initial position of a tsume problem. It also caused problems
in positions with only CP.
H.G.Muller [Mon, 2 Jun 2014 17:42:38 +0000]
Fix futility pruning
Move generation was stopped at d=1 when futile victims were reached,
but after deepening to d>=2 the victim for which this first happened
was never tried again. In addition, the upper-bound score was not adapted
to the estimated gain, meaning it could remain at the initial -INF,
creating the permanent impression that the current position was a checkmate.
H.G.Muller [Mon, 2 Jun 2014 17:37:28 +0000]
Fix phantom move when no non-captures
When there were no non-captures generated at all, a random one would be
tried that happened to be left on the move stack from another node, which
needed not even be a faulty move. In some tsume problems where this move
happened to be the capture of the King with an empty square, this lead to
reporting false mates. (Usually you only have no non-captures if you have
no pieces, and in tsume you might not even have a King.)
H.G.Muller [Mon, 2 Jun 2014 17:34:47 +0000]
Fix crash on reading some FENs
It was possible to read beyond the end of a FEN when converting it to
internal format, which could lead to all kind of nastiness.
H.G. Muller [Thu, 15 May 2014 21:12:27 +0000]
Make it possible to run tsume search without King
H.G.Muller [Wed, 30 Apr 2014 08:10:22 +0000]
Fix double-capture of royal pair
Kings could step in check if there was a Crown Prince, but there was
no allowance for the fact that this could expose both of them to
simultaneous capture by a Lion. So the search can visit nodes where there
is no royal, which did cause a cratch. This is now intercepted at the top
of Search, in the check test, which aborts the branch if there is no royal.
Except in tsume for the winning side. (Although this then might still
cause the crash, probably in eval.)
H.G.Muller [Mon, 28 Apr 2014 20:03:06 +0000]
Fix hash key after setboard
The initial hash key was the same in any start position. This resulted
in a has-hit on the opening position, which was searched to make a move list
after 'new', in the position after 'setboard', so the opening's hash move
could be played in any position, even where it was completely invalid.
H.G.Muller [Mon, 14 Apr 2014 10:45:16 +0000]
Release King surroundings in late end-game
The bonus for friendly King environment is topped off in the late end-game,
to prevent that many pieces would be prevented from participating in
checkmating the opponent.
H.G.Muller [Mon, 14 Apr 2014 10:22:59 +0000]
Set mobility weight lances to zero
Lance and Reverse Chariot should not try to optimize mobility, to prevent
suicidal edge attacks. The Lance is now kept back by its own PST.
H.G.Muller [Sat, 12 Apr 2014 21:56:04 +0000]
Let heavy steppers form fortress
The heavy steppers now use the old stepper table with pre-promotion bonus,
but made a little bit more neutral in the area of the fortress, to prevent
them from early wandering off. A light fortress bonus, which is slowly
switched on during the game, and dependent on opponent Lion presence,
ties them down into a fortress.
H.G.Muller [Fri, 11 Apr 2014 10:28:48 +0000]
Fix jumper PST
The Kylin and Phoenix were using a neutral table.
H.G.Muller [Thu, 10 Apr 2014 17:59:47 +0000]
Bump version to 0.19
H.G.Muller [Thu, 10 Apr 2014 16:59:55 +0000]
Use linear interpolation with game phase
The weight of anticipated promotion gain now decreases linearly with
filling of the board, rather than quadratically. As a compensation,
it now starts at 23% for a full board, rather than 8%.
H.G.Muller [Thu, 10 Apr 2014 16:54:56 +0000]
Give bonus for pairs of light steppers adjacent to zone
C, S and FL now get a hefty bonus on 8th rank for each S, S or FL
protector they have on the 7th rank.
H.G.Muller [Thu, 10 Apr 2014 14:09:36 +0000]
Increase center-rank penalty for sliders
H.G.Muller [Thu, 10 Apr 2014 12:13:38 +0000]
Introduce separate PST for C, S and FL
The light steppers now have a PST that strongly encourages their advance
to the 4th/5th rank, while G, BT and DE got a completely neutral PST.
The advance bonus decreases beyond the 5th rank, to discourage solo attacks.
H.G.Muller [Wed, 9 Apr 2014 13:36:13 +0000]
Fix end-game King centralization
The King was using the pre-promoted stepper table, which makes no sense.
All PST are given symbolic names now. (Which helped identifying this bug.)
H.G. Muller [Sun, 6 Apr 2014 20:55:23 +0000]
Fix royalty of Crown Prince in setup positions
The Crown Prince wa not recognized as royal, because the tet supposed to
do that assumed it was CP, rather than +DE. During initialization of games
without Elephant this caused insertion of a dummy (captured) +DE as second
royal, demoting a possibly initially present +DE to non-royal status.
Testing exposed an bug in the evaluation that wrongly identified CP
in the abense of K, leading to a segfault.
H.G.Muller [Thu, 3 Apr 2014 18:51:13 +0000]
Implement option for using Okazaki rule
With this rule counterstrike against an unprotected Lion is allowed.
H.G. Muller [Sat, 1 Mar 2014 22:00:03 +0000]
Fix sd command
The maximum depth was not ofsetted by QSdepth, and was thus 4 less than
requested.
H.G. Muller [Fri, 28 Feb 2014 09:47:20 +0000]
Bump version to 0.18
H.G. Muller [Fri, 28 Feb 2014 10:43:13 +0000]
Add primitive Makefile
This makefile is adapted from that of Fairy-Max. It uses XBoard's
--show-config option to install the SVG graphics amongst the XBoard
data files.
H.G. Muller [Fri, 28 Feb 2014 09:43:08 +0000]
Fix Pawn double-push
Black pawns also did double-pushes from the 6th rank!
H.G. Muller [Fri, 28 Feb 2014 09:11:05 +0000]
Replace variant normal by nocastle
Since castling is not implemented (yet?), HaChu really plays only
nocastle rather than normal Chess. The order of variants is now
changed to put chu first, to make use of XBoard auto-selection of variant.
H.G. Muller [Fri, 28 Feb 2014 08:40:51 +0000]
Fix variant choice
Init() must be passed the variant number, not a variant ID, so setting the
variant to Chess (which has number 0 in the variants table) got confused
with V_SAME for staying in the same variant, and thus did not work.
The invalid variant number -1 is now used to stay in the current variant.
H.G. Muller [Tue, 18 Feb 2014 18:38:23 +0000]
Fix Mighty Lion other x Lion captures
Because the 'chess' flag is set in Mighty Lion, it uses promoSuppress to
generate e.p. captures. But the Iron-Lion flag hidden in promoSuppress
can also be set there, and would lead to a wildly off-board access during
this e.p. generation.
H.G. Muller [Sat, 11 Jan 2014 14:34:36 +0000]
Fix undo, remove commands
The Init() done in the framework of takebacks did refer to the variant
by V_number, rather than by table index. A V_number as now been added
to signify 'same variant'.
H.G. Muller [Wed, 8 Jan 2014 15:48:08 +0000]
Adapt rank counting to new XBoard standard
Since XBoard 4.8 (the first version that supports Chu Shogi) rank counting
starts from 0 only for boards exactly 10 ranks deep. So Chu, Dai etc. all
have to start counting at 1.
H.G. Muller [Wed, 8 Jan 2014 15:40:38 +0000]
Fix naming of kanji SVGs
For sente +C was depicted as +S, wile +S had no image at all.
H.G. Muller [Sun, 3 Nov 2013 16:52:39 +0000]
Bump version to 0.17
H.G. Muller [Sun, 3 Nov 2013 16:51:34 +0000]
Fix Makruk start position
H.G. Muller [Wed, 30 Oct 2013 19:28:21 +0000]
Fix -roarSound in chu settings file
H.G. Muller [Wed, 30 Oct 2013 13:49:44 +0000]
Rename some svg kanji pieces
H.G. Muller [Sun, 27 Oct 2013 11:43:28 +0000]
Add XBoard settings files for Chu and Sho shogi
H.G. Muller [Sun, 27 Oct 2013 10:13:58 +0000]
Add SVG kanji pieces
A set of SVG Chu-Shogi pieces (bare kanji) suitable for use in XBoard
is added to the project. Some of the pieces not currently used by XBoard
(+GB, +Ph, +Ky, +DE) are left in the set.
H.G. Muller [Sat, 26 Oct 2013 21:10:17 +0000]
Add man page
H.G. Muller [Tue, 22 Oct 2013 18:02:08 +0000]
Make e.p. capture also work in variant lion, where P = 50
H.G. Muller [Tue, 22 Oct 2013 17:59:27 +0000]
Fix setting up of variants normal and lion
The internal name of the Queen should be FK.
H.G. Muller [Tue, 22 Oct 2013 17:47:54 +0000]
Detect stalemate
Variants makruk, chess and lion need this!
H.G. Muller [Tue, 22 Oct 2013 17:41:35 +0000]
Fix printing of e.p. captures
Do not print e.p. captures as to-leg moves, but just as the overall move.
This is what GUIs expect, the capture is implied.
H.G. Muller [Mon, 21 Oct 2013 13:11:27 +0000]
Implement e.p. capture
For Chess and Mighty Lion e.p. capture was needed. This is controlled by
chessFlag, which also controlled the possibility to double-push M moves.
The e.p. captures are generated as two-leg moves over the victim Pawn,
after all other captures have been generated, and depending on promoSuppress,
which flags double-pushes, and is not used for other purposes in Chess
(where deferral is not possible, with Pawns promoting on last rank only).
When parsing input moves, e.p. capture is recognized, and expanded to
a two-leg move before searching it in the move list.
H.G. Muller [Mon, 21 Oct 2013 08:38:32 +0000]
Use setup command in Sho Shogi
To exploit the new engine-defined-variants mechanism of XBoard,
a duplicate of Sho Shogi is added with an engine-defined name.
The length of the variant table is now determined dynamically,
by using the sentinel, and the variants feature is now generated from
this table (rather than hard-coded). The variant 12x12+0_fairy has
been dropped as alternative for Chu Shogi, as this never really worked,
and chu has been elevated to standard variant in the XBoard main branch.
H.G. Muller [Tue, 8 Oct 2013 21:05:16 +0000]
Implement testversion of Mighty-Lion Chess
It does not have castling or e.p. capture, and a lousy eval.
And it does not implement the rule that King doesn't count as Lion
protector. (Which is hard to implement, as we check this from the
attack map.)
H.G. Muller [Fri, 27 Sep 2013 12:52:20 +0000]
Remove incremental-update code from HaChu
A licence notice is added to put it in the public domain.
H.G. Muller [Fri, 27 Sep 2013 12:15:48 +0000]
Version 0.16: King neighborhood, Kylin promotion eval terms
These evaluation terms are experimental, and not proven to be effective.
H.G. Muller [Fri, 27 Sep 2013 12:12:11 +0000]
Version 0.15: cyan highlights, fix Sho Shogi setboard
Non-final legs of multi-leg moves are indicated in cyan, to activate a new
multi-move feature in the WinBoard Alien Edition. The N in Sho Shogi FENs
is now recognized as Knight rather than Lion.
H.G. Muller [Fri, 27 Sep 2013 12:09:06 +0000]
Version 0.14: LMR, wing defense, Pawn blocking
Implement LMR. An eval term is added to keep the wings (L + RC) Lion proof.
A penalty is given for blocking own Pawns.
H.G. Muller [Fri, 27 Sep 2013 12:06:47 +0000]
Version 0.13: check extension
H.G. Muller [Fri, 27 Sep 2013 12:04:53 +0000]
Version 0.12: King safety and Kylin terms, PV cuts
Add an option to prevent PV cuts in analysis mode. Add terms for calculating
King Safety and Kylin promotion danger, but do not activate them yet.
H.G. Muller [Fri, 27 Sep 2013 12:00:46 +0000]
Version 0.11: promotability and Lion traps
The value of promoting sliders is increased towards the end-game.
Penalty is given for moving an unprotected Lion into an enemy corner.
H.G. Muller [Fri, 27 Sep 2013 11:57:46 +0000]
Version 0.10: null move, hash table and tsume
The hash table and null move are switched on and debugged.
A tsume option is added, where one side only searches checking moves.
H.G. Muller [Fri, 27 Sep 2013 11:53:57 +0000]
Version 0.9: Implement QS
A real quiescence search is added. Moves that do not cause material
progress in the next two ply are pruned.
H.G. Muller [Fri, 27 Sep 2013 11:49:57 +0000]
Version 0.8
Add some print statements for easier debugging.
H.G. Muller [Sat, 1 Jun 2013 21:18:45 +0000]
Implement new way of pondering
The think and ponder searches are unified, so a search that starts as
pondering can continue without interruption as thinking on a ponder hit.
H.G. Muller [Sat, 1 Jun 2013 21:12:19 +0000]
Process usermove in ponder input
H.G. Muller [Sat, 1 Jun 2013 21:09:40 +0000]
Remember time of last root iter
H.G. Muller [Sat, 1 Jun 2013 21:05:28 +0000]
Print ponder move
H.G. Muller [Sat, 1 Jun 2013 21:03:20 +0000]
Fix setting oldBest
H.G. Muller [Sat, 1 Jun 2013 21:00:40 +0000]
Fix layout
H.G. Muller [Sat, 1 Jun 2013 20:58:32 +0000]
Fix clearing of ponder move
H.G. Muller [Sat, 1 Jun 2013 20:55:37 +0000]
Fix move list
H.G. Muller [Sat, 1 Jun 2013 20:53:12 +0000]
Call SetSearchTimes
H.G. Muller [Sat, 1 Jun 2013 20:43:36 +0000]
Fix reply depth
H.G. Muller [Sat, 1 Jun 2013 08:27:49 +0000]
Fix clearing input buffer
H.G. Muller [Sat, 1 Jun 2013 08:07:21 +0000]
Implement pondering on position / analysis
Pondering is indicated by setting abortFlag to -1. This suppresses testing
on time, both in TerminalCheck() and at the end of an iteration.
H.G. Muller [Sat, 1 Jun 2013 06:00:36 +0000]
Add routine to check for input
H.G. Muller [Sat, 1 Jun 2013 05:56:21 +0000]
Implement abort of search on long thinking time
A global variable abortFlag is tested to make the search unwind. A function
TerminalCheck() is added to read the clock and set this variable if needed,
based on the tlim3 time limit. Measures have been taken to make sure the
root node returns a valid move and score even when interrupted during the
search of the first move.
H.G. Muller [Fri, 31 May 2013 22:06:48 +0000]
Split calculating of time limits from SearchBestMove
Make the TC parameters global so they would not have to be passed to
the new SetTimeLimits() via SearchBestMove(), and SetTimeLimits()
can be called also from within search.
H.G. Muller [Fri, 31 May 2013 19:48:45 +0000]
Move input and procesing time, otim to separate routine
Reading the input line and treating some commands is moved to a separate
routine, so it can also be called during ponder search. The commands
needed to be treated in ponder without interrupting it are time and otim
(to get to the following usermove to determine hit-or-miss). The commands
lift and put also must be satisfiable without aborting a ponder search.
(Because Highlight now uses a prepared move list this is possible.)
H.G. Muller [Fri, 31 May 2013 17:50:12 +0000]
Leave move list of game position on stack permanently
The move list that was temporarily created for ParseMove and Highlight
is now kept permanently on the stack (by setting msp to the end of it
after it is created). ParseMove and Highlight thus no longer have to
generate it, and generation is moved to the top of the main loop, and
only done when the list does not exist yet. The list is discarded as soon
as we execute a command that changes the game position.
H.G. Muller [Fri, 31 May 2013 17:41:02 +0000]
Reorder parsing of protocol commands
All commands that change the position are put at the end.
H.G. Muller [Fri, 31 May 2013 17:27:30 +0000]
Build move list of game position for general use
Both ParseMove and Highlight needed a move list, and geerated it on the fly.
This shared code has been moved to a separate routine. New variables
listStart and listEnd point out this list on the move stack, as replaement
for the more volatile retMSP and retFirst.
H.G. Muller [Mon, 27 May 2013 20:54:24 +0000]
Implement null move
H.G. Muller [Mon, 27 May 2013 20:46:34 +0000]
Implement killers
H.G. Muller [Mon, 27 May 2013 20:24:29 +0000]
Implement hash table
H.G. Muller [Fri, 26 Apr 2013 08:38:48 +0000]
Fix buf in position setup without Elephant/Prince
HaChu's check test assumes the piece after King in the piece list will be
Crown Prince. When positions without CP or DE (which causes addition of
a CP for promotion, marked as ABSENT) were loaded, this would not be the
case, and the presence of another piece could create the illusion of
immunity to check. In Chess / Shatranj / Makruk a dummy (ABSENT) CP was
added to prevent this, but the problem occurred just as much in set-up
positions of true Shogi variants. Now we always add a dummy CP if the
loaded position did not cause adding it already.
H.G. Muller [Sun, 21 Apr 2013 19:43:27 +0000]
Implement Makruk
Internally the Met is written as SM, because that corresponds to the
WinBoard 'M' in Chu. The promotion character had to be adapted to 'm'.
For Chess and Shatranj a '+' was still wrongly used, and this was fixed
to 'q'. On input any suffix character that is not an '=' will be interpreted
as '+'.
H.G. Muller [Sat, 2 Mar 2013 21:35:27 +0000]
Fix setboard command
The variant was not correctly identivied, by using its code rather than
its number when calling Init. The test for Knight when converting WB FEN
to internal position string did not work, so N was converted to Lion.
As Q is converted to :FK, the Ferz in Shatranj was renamed to FK.
H.G. Muller [Sun, 24 Feb 2013 11:20:05 +0000]
Make repetitions in Chess and Shatranj draws
H.G. Muller [Sun, 24 Feb 2013 11:09:59 +0000]
Give King neutral PST
The King was drawn to the center like any general...
H.G. Muller [Sun, 24 Feb 2013 11:08:37 +0000]
Fix Shatranj
H.G. Muller [Sun, 24 Feb 2013 10:47:08 +0000]
Fix crash in double-push, and make it subject to chessFlag
Passed squares in NewNonCapt are used as array index, and should not
be mutilated with flags! As the M (=non-capt only) move type is now
also used in Shatranj, make the double-push subject to a new chessFlag.
H.G. Muller [Sun, 24 Feb 2013 10:15:45 +0000]
Implement Shatranj
Although Shatranj is not a Shogi variant, it is much more Shogi-like than
Chess. The only thing that makes it different is the divergent move of
the Pawn.
H.G. Muller [Sat, 19 Jan 2013 16:43:04 +0000]
Version 0.4beta