hachu.git
10 years agoRelease King surroundings in late end-game 0.19
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.

10 years agoSet mobility weight lances to zero
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.

10 years agoLet heavy steppers form fortress
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.

10 years agoFix jumper PST
H.G.Muller [Fri, 11 Apr 2014 10:28:48 +0000]
Fix jumper PST

The Kylin and Phoenix were using a neutral table.

10 years agoBump version to 0.19
H.G.Muller [Thu, 10 Apr 2014 17:59:47 +0000]
Bump version to 0.19

10 years agoUse linear interpolation with game phase
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%.

10 years agoGive bonus for pairs of light steppers adjacent to zone
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.

10 years agoIncrease center-rank penalty for sliders
H.G.Muller [Thu, 10 Apr 2014 14:09:36 +0000]
Increase center-rank penalty for sliders

10 years agoIntroduce separate PST for C, S and FL
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.

10 years agoFix end-game King centralization
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.)

10 years agoFix royalty of Crown Prince in setup positions
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.

10 years agoImplement option for using Okazaki rule
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.

10 years agoFix sd command
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.

10 years agoBump version to 0.18 0.18
H.G. Muller [Fri, 28 Feb 2014 09:47:20 +0000]
Bump version to 0.18

10 years agoAdd primitive Makefile
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.

10 years agoFix Pawn double-push
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!

10 years agoReplace variant normal by nocastle
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.

10 years agoFix variant choice
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.

10 years agoFix Mighty Lion other x Lion captures
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.

10 years agoFix undo, remove commands
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'.

10 years agoAdapt rank counting to new XBoard standard
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.

10 years agoFix naming of kanji SVGs
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.

10 years agoBump version to 0.17
H.G. Muller [Sun, 3 Nov 2013 16:52:39 +0000]
Bump version to 0.17

10 years agoFix Makruk start position
H.G. Muller [Sun, 3 Nov 2013 16:51:34 +0000]
Fix Makruk start position

10 years agoFix -roarSound in chu settings file
H.G. Muller [Wed, 30 Oct 2013 19:28:21 +0000]
Fix -roarSound in chu settings file

10 years agoRename some svg kanji pieces
H.G. Muller [Wed, 30 Oct 2013 13:49:44 +0000]
Rename some svg kanji pieces

10 years agoAdd XBoard settings files for Chu and Sho shogi
H.G. Muller [Sun, 27 Oct 2013 11:43:28 +0000]
Add XBoard settings files for Chu and Sho shogi

10 years agoAdd SVG kanji pieces
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.

10 years agoAdd man page
H.G. Muller [Sat, 26 Oct 2013 21:10:17 +0000]
Add man page

10 years agoMake e.p. capture also work in variant lion, where P = 50
H.G. Muller [Tue, 22 Oct 2013 18:02:08 +0000]
Make e.p. capture also work in variant lion, where P = 50

10 years agoFix setting up of variants normal and lion
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.

10 years agoDetect stalemate
H.G. Muller [Tue, 22 Oct 2013 17:47:54 +0000]
Detect stalemate

Variants makruk, chess and lion need this!

10 years agoFix printing of e.p. captures
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.

10 years agoImplement e.p. capture
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.

10 years agoUse setup command in Sho Shogi
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.

10 years agoImplement testversion of Mighty-Lion Chess
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.)

10 years agoRemove incremental-update code from HaChu
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.

10 years agoVersion 0.16: King neighborhood, Kylin promotion eval terms
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.

10 years agoVersion 0.15: cyan highlights, fix Sho Shogi setboard
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.

10 years agoVersion 0.14: LMR, wing defense, Pawn blocking
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.

10 years agoVersion 0.13: check extension
H.G. Muller [Fri, 27 Sep 2013 12:06:47 +0000]
Version 0.13: check extension

10 years agoVersion 0.12: King safety and Kylin terms, PV cuts
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.

10 years agoVersion 0.11: promotability and Lion traps
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.

10 years agoVersion 0.10: null move, hash table and tsume
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.

10 years agoVersion 0.9: Implement QS
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.

10 years agoVersion 0.8
H.G. Muller [Fri, 27 Sep 2013 11:49:57 +0000]
Version 0.8

Add some print statements for easier debugging.

10 years agoImplement new way of pondering
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.

10 years agoProcess usermove in ponder input
H.G. Muller [Sat, 1 Jun 2013 21:12:19 +0000]
Process usermove in ponder input

10 years agoRemember time of last root iter
H.G. Muller [Sat, 1 Jun 2013 21:09:40 +0000]
Remember time of last root iter

10 years agoPrint ponder move
H.G. Muller [Sat, 1 Jun 2013 21:05:28 +0000]
Print ponder move

10 years agoFix setting oldBest
H.G. Muller [Sat, 1 Jun 2013 21:03:20 +0000]
Fix setting oldBest

10 years agoFix layout
H.G. Muller [Sat, 1 Jun 2013 21:00:40 +0000]
Fix layout

10 years agoFix clearing of ponder move
H.G. Muller [Sat, 1 Jun 2013 20:58:32 +0000]
Fix clearing of ponder move

10 years agoFix move list
H.G. Muller [Sat, 1 Jun 2013 20:55:37 +0000]
Fix move list

10 years agoCall SetSearchTimes
H.G. Muller [Sat, 1 Jun 2013 20:53:12 +0000]
Call SetSearchTimes

10 years agoFix reply depth
H.G. Muller [Sat, 1 Jun 2013 20:43:36 +0000]
Fix reply depth

10 years agoFix clearing input buffer
H.G. Muller [Sat, 1 Jun 2013 08:27:49 +0000]
Fix clearing input buffer

10 years agoImplement pondering on position / analysis
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.

10 years agoAdd routine to check for input
H.G. Muller [Sat, 1 Jun 2013 06:00:36 +0000]
Add routine to check for input

10 years agoImplement abort of search on long thinking time
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.

10 years agoSplit calculating of time limits from SearchBestMove
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.

10 years agoMove input and procesing time, otim to separate routine
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.)

10 years agoLeave move list of game position on stack permanently
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.

10 years agoReorder parsing of protocol commands
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.

10 years agoBuild move list of game position for general use
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.

10 years agoImplement null move
H.G. Muller [Mon, 27 May 2013 20:54:24 +0000]
Implement null move

10 years agoImplement killers
H.G. Muller [Mon, 27 May 2013 20:46:34 +0000]
Implement killers

10 years agoImplement hash table
H.G. Muller [Mon, 27 May 2013 20:24:29 +0000]
Implement hash table

10 years agoFix buf in position setup without Elephant/Prince
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.

10 years agoImplement Makruk
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 '+'.

10 years agoFix setboard command
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.

10 years agoMake repetitions in Chess and Shatranj draws
H.G. Muller [Sun, 24 Feb 2013 11:20:05 +0000]
Make repetitions in Chess and Shatranj draws

10 years agoGive King neutral PST
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...

10 years agoFix Shatranj
H.G. Muller [Sun, 24 Feb 2013 11:08:37 +0000]
Fix Shatranj

10 years agoFix crash in double-push, and make it subject to chessFlag
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.

10 years agoImplement Shatranj
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.

11 years agoVersion 0.4beta
H.G. Muller [Sat, 19 Jan 2013 16:43:04 +0000]
Version 0.4beta

11 years agoAdd debug printf in ParseMove
H.G. Muller [Sat, 19 Jan 2013 16:41:03 +0000]
Add debug printf in ParseMove

11 years agoMake debug output less verbose
H.G. Muller [Sat, 19 Jan 2013 16:39:00 +0000]
Make debug output less verbose

The board does not need to be printed after every command; just when it
starts thinking or playing an entered move. The move list needs never be
printed, as Search already does that in both cases.

11 years agoFix crash after using setboard (and undo?)
H.G. Muller [Sat, 19 Jan 2013 16:34:04 +0000]
Fix crash after using setboard (and undo?)

The crash was due to an attempt to set up a Lance in Chess. An error message
has been added to detect unknown pieces in setup. Also the ambiguity of N
in FEN between Chess and Chu has been resolved in Convert. The board is
now cleared before calling Setup, by calling Init.

11 years agoImplement sd command
H.G. Muller [Fri, 18 Jan 2013 16:29:17 +0000]
Implement sd command

Also increment maximum game length (which was only 500 ply).

11 years agoImplement setboard command
H.G. Muller [Fri, 18 Jan 2013 16:26:39 +0000]
Implement setboard command
Allow it to read regular 1-char FEN as well as internal 2-letter format.
Implement promoted pieces in the latter.

11 years agoImprove time management
H.G. Muller [Fri, 18 Jan 2013 16:20:39 +0000]
Improve time management

11 years agoGive reason when Lion captures are rejected as illegal
H.G. Muller [Fri, 18 Jan 2013 16:18:40 +0000]
Give reason when Lion captures are rejected as illegal

11 years agoPrint static eval with thinking output
H.G. Muller [Fri, 18 Jan 2013 16:15:50 +0000]
Print static eval with thinking output

Also compute difEval from scratch, for error checking.

11 years agoFix eval sign bug in (not-yet-used) null move
H.G. Muller [Fri, 18 Jan 2013 16:08:44 +0000]
Fix eval sign bug in (not-yet-used) null move

11 years agoTake somewhat more spacing for move sorting
H.G. Muller [Fri, 18 Jan 2013 16:07:14 +0000]
Take somewhat more spacing for move sorting

The gaps in the move stack are now 50 in stead of 20.

11 years agoFix bug in move sorting
H.G. Muller [Fri, 18 Jan 2013 16:05:30 +0000]
Fix bug in move sorting

Due to reverse comparison, oves were resorted on every iteration into the
static order, completely thwarting the purpose of (I)ID.

11 years agoFix bug in PST initialization
H.G. Muller [Fri, 18 Jan 2013 16:02:17 +0000]
Fix bug in PST initialization

The null table was not explicitly initialized, and was contaminated by
earlier initialization with another board size.

11 years agoFix move bug for oce and for all
H.G. Muller [Fri, 18 Jan 2013 15:01:40 +0000]
Fix move bug for oce and for all

Also Falcons and Eagles captured like Knight if victim attacked by Lion.

11 years agoClaim win against illegal move if opponent is computer
H.G. Muller [Fri, 18 Jan 2013 14:59:18 +0000]
Claim win against illegal move if opponent is computer

Otherwise the game would hang in Two Machines mode, which is very undesirable
if the opponent is a connection adapter to a server.

11 years agoGive reason with Illegal move message in case of repeat
H.G. Muller [Fri, 18 Jan 2013 14:55:41 +0000]
Give reason with Illegal move message in case of repeat

11 years agoImprove potential debug print
H.G. Muller [Fri, 18 Jan 2013 14:05:20 +0000]
Improve potential debug print

11 years agoMake sure King-capture move is printed
H.G. Muller [Fri, 18 Jan 2013 14:04:41 +0000]
Make sure King-capture move is printed

11 years agoFix bug in Phoenix captures
H.G. Muller [Fri, 18 Jan 2013 14:02:55 +0000]
Fix bug in Phoenix captures

Jumping pieces would capture as Knight when the victim was also attacked
b a Lion.

11 years agoAdd Tenjiku and other variants
H.G. Muller [Fri, 18 Jan 2013 14:00:36 +0000]
Add Tenjiku and other variants

11 years agoAdd Chess pieces
H.G. Muller [Thu, 12 Jul 2012 10:11:31 +0000]
Add Chess pieces

11 years agoSome work on incremental attack-map update
H.G. Muller [Thu, 12 Jul 2012 10:07:57 +0000]
Some work on incremental attack-map update

11 years agoAdd mobility eval
H.G. Muller [Thu, 12 Jul 2012 10:05:59 +0000]
Add mobility eval

Count moves during construction of atack map. The mobility weight is
based on the base value of the piece.

11 years agoBeter tuning of time control
H.G. Muller [Thu, 12 Jul 2012 10:02:36 +0000]
Beter tuning of time control

Reduce target time, and keep a larger safety margin.