Changes

Jump to: navigation, search

KnightCap

10,951 bytes added, 23:45, 22 June 2018
'''[[Main Page|Home]] * [[Engines]] * KnightCap'''

[[FILE:thingone.gif|border|right|thumb|link=http://www.samba.org/KnightCap/|KnightCap's [[3D Graphics Board|3D Board]] <ref>[http://samba.anu.edu.au/KnightCap/ Welcome to the KnightCap home page]</ref> ]]

'''KnightCap''',<br/>
a [[XBoard]] compliant [[Open Source Engines|open source chess engine]] under the [[Free Software Foundation#GPL|GNU General Public License]] by [[Andrew Tridgell]] <ref>[[Andrew Tridgell]] ('''1997'''). ''KnightCap — a parallel chess program on the AP1000+''.</ref>, [[Jonathan Baxter]] and [[Lex Weaver]].
To [[Automated Tuning|tune]] it's [[Evaluation|evaluation]] in game play, it uses [[Temporal Difference Learning|temporal difference learning]] applied to [[Minimax|minimax]] search in chess, [[Temporal Difference Learning#TDLeaf|TDLeaf]] <ref>[[Jonathan Baxter]], [[Andrew Tridgell]], [[Lex Weaver]] ('''1997''') ''Knightcap: A chess program that learns by combining td(λ) with minimax search''. 15th International Conference on Machine Learning</ref> <ref>[https://groups.google.com/group/rec.games.chess.computer/msg/4d6c328e8e8e0cd4 Re: Bit Board Bonkers?? - other alternatives] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], August 9, 1997</ref>. KnightCap features an own [[GUI]] with an optional [[3D Graphics Board]] <ref>[https://groups.google.com/group/rec.games.chess.computer/msg/ded7e4e4304d8d4e Re: Going commercial, maybe] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], March 9, 1997</ref>, and played multiple [[Australasian National Computer Chess Championship|Australasian National Computer Chess Championships]], and won two times, last one the [[NC3 2006]].

=Description=
==[[Board Representation]]==
KnightCap maintains an [[Incremental Updates|incremental updated]] [[Attack and Defend Maps|attack table]] of 64 [[Piece-Sets|piece-sets]] - for each square indicating all pieces attacking or defending that square. Despite [[Move Generation|move generation]], this approach pays off in determining [[Check#Detection|in-check]], and [[Square Control|square control]] evaluation.

==[[Search]]==
The program performs a [[Iterative Deepening|iterative deepening]] [[Parallel Search|parallel]] [[MTD(f)]] search utilizing the [[Shared Hash Table|shared transposition table]]. The variation of MTD(f) that KnightCap uses includes some convergence acceleration heuristics
that prevent the very slow convergence that can sometimes plague MTD(f) implementations. [[Selectivity]] is due to [[Null Move Pruning|null move pruning]], [[Razoring|razoring]] and various [[Extensions|extensions]]. The [[Transposition Table|transposition table]] with 128 bit entries keeps separate [[Depth|depth]] and [[Score|scores]] for the [[Lower Bound|lower]] and [[Upper Bound|upper bound]]. The [[Move Ordering|move ordering]] system is a combination of the commonly used [[History Heuristic|history]], [Killer Heuristic|killer]], [[Refutation Table|refutation]] and transposition table, along with [[Enhanced Transposition Cutoff|ETC]].

==[[Evaluation]]==
===Conventional===
KnightCap uses a quite slow evaluation function that evaluates a number of computationally expensive features such as [[Square Control|board control]] to reasonably accurately consider the presence of [[Hanging Piece|hung]], [[Trapped Pieces|trapped]] and [[Mobility|immobile]] pieces, and further has some [[Asymmetric Evaluation|asymmetric evaluation]] as well as search terms with a leaning towards careful play.

===TD Considerations===
One major modification for [[Temporal Difference Learning#TDLeaf|TDLeaf]] was that all evaluation coefficients became part of a weight vector. Another significant modification that was required was an increase in the bit resolution of the evaluation type so that a numerical [https://en.wikipedia.org/wiki/Partial_derivative partial derivative] of the evaluation function with respect to the evaluation coefficient vector could be obtained with reasonable accuracy. To ensure small fluctuations in the relative values of leaf nodes did not produce large temporal differences, the raw linear leaf evaluation score was squashed to a ±1 range of a [https://en.wikipedia.org/wiki/Hyperbolic_function#Hyperbolic_tangent hyperbolic tangent] [https://en.wikipedia.org/wiki/Sigmoid_function sigmoid function] with 0.25 equivalent a material superiority of one pawn. The outcome of the game was set to 1 for a win, -1 for a loss and 0 for a draw. Negative values of temporal differences (dt) were left unchanged as any decrease in the evaluation from one position to the next can be viewed as mistake. However, positive values of dt can occur simply because the opponent has made a blunder. To avoid KnightCap trying to learn to predict its opponent’s blunders, all positive temporal differences were set to zero unless KnightCap predicted the opponent’s move <ref>[[Jonathan Baxter]], [[Andrew Tridgell]], [[Lex Weaver]] ('''1997''') ''Knightcap: A chess program that learns by combining td(λ) with minimax search''. 15th International Conference on Machine Learning</ref>.

=Selected Games=
[[NC3 2006]], round 2, [[Bodo]] - [[KnightCap]]
<pre>
[Event "NC3 2006"]
[Site "RedHill, Canberra, Australia"]
[Date "2006.08.20"]
[Round "2"]
[White "Bodo"]
[Black "KnightCap"]
[Result "0-1"]

1.d4 h6 2.e4 a6 3.Nf3 d6 4.Nc3 e6 5.Bc4 Nc6 6.O-O Nf6 7.Qe2 b5 8.Bb3 Na5
9.e5 dxe5 10.dxe5 Nd7 11.Rd1 Bb7 12.Bf4 Nxb3 13.axb3 Bc5 14.Ne4 Bb6 15.c3
Qe7 16.Bg3 O-O 17.Bh4 Qe8 18.b4 Bd5 19.Rd2 Qc8 20.Re1 Re8 21.Qd3 Nf8 22.Nd4
Ng6 23.Bg3 Qb7 24.Qe2 Rad8 25.f3 Qa7 26.Kh1 Bb7 27.Red1 Rd5 28.Nc2 Red8
29.Rd3 Rxd3 30.Rxd3 Rd5 31.h4 Ne7 32.h5 Nf5 33.Bf4 Qa8 34.g3 Ne7 35.Kg2 Qd8
36.Rxd5 Nxd5 37.Bc1 Ne7 38.Nc5 Bxc5 39.bxc5 Qd5 40.b4 Nf5 41.Bd2 Qa2 42.Bf4
Qb1 43.Qd2 Bd5 44.Na3 Qb3 45.Nc2 Qa4 46.Kf2 a5 47.g4 Ne7 48.bxa5 Qxa5 49.Nb4
Qa7 50.Be3 Qa8 51.Qd1 c6 52.Kg2 Qb8 53.Qd4 Qa7 54.Qd2 Qc7 55.Qd4 Qa5 56.Bf2
Qa1 57.Qd2 Kf8 58.Bh4 Qa7 59.Bf2 Qd7 60.Qd3 Kg8 61.Be3 Qc8 62.Qd2 Qd8 63.Qd4
Kh8 64.Qf4 Qf8 65.g5 hxg5 66.Qxg5 Nf5 67.Nxd5 cxd5 68.Bg1 Qa8 69.Bf2 Kg8
70.Bg1 Qa2+ 71.Bf2 Kh7 72.Qc1 Nh4+ 73.Kg3 Qc4 74.Qd2 Kg8 75.Qb2 Nf5+ 76.Kg2
Qd3 77.c6 Qc4 78.c7 Qxc7 79.Qxb5 Nh6 80.Be3 Qd8 81.Bxh6 gxh6 82.Qb4 Qg5+
83.Qg4 Qxg4+ 84.fxg4 f6 85.exf6 Kf7 86.Kh1 Kxf6 87.Kh2 Kg5 88.Kg3 e5 89.Kf3
Kh4 90.Kg2 Kxg4 91.Kf2 Kf4 92.Kg1 Ke3 93.Kf1 e4 94.Ke1 Kd3 95.Kf2 e3+ 96.Kg3
Ke4 97.Kg2 e2 98.Kf2 Kd3 99.c4 Kd2 0-1
</pre>

=See also=
* [[MTD(f)]]
* [[TDChess]]
* [[Temporal Difference Learning]]

=Publications=
* [[Andrew Tridgell]] ('''1997'''). ''KnightCap — a parallel chess program on the AP1000+''. [http://ftp.riken.jp/pub/net/samba/tridge/knightcap_pcw97.ps.gz zipped ps]
* [[Jonathan Baxter]], [[Andrew Tridgell]], [[Lex Weaver]] ('''1997''') ''Knightcap: A chess program that learns by combining td(λ) with minimax search''. 15th International Conference on Machine Learning, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.54.8263&rep=rep1&type=pdf pdf] via [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.54.8263 citeseerX]
* [[Jonathan Baxter]], [[Andrew Tridgell]], [[Lex Weaver]] ('''1998''') ''Experiments in Parameter Learning Using Temporal Differences''. [[ICGA Journal#21_2|ICCA Journal, Vol. 21, No. 2]]
* [[Jonathan Baxter]], [[Andrew Tridgell]], [[Lex Weaver]] ('''1999'''). ''TDLeaf(lambda): Combining Temporal Difference Learning with Game-Tree Search''. [https://www.chatbots.org/journal/australian_journal_of_intelligent_information_processing_systems/ Australian Journal of Intelligent Information Processing Systems], Vol. 5 No. 1, [http://arxiv.org/abs/cs/9901001 arXiv:cs/9901001]
* [[Marco Block-Berlitz]] ('''2003'''). ''Reinforcement Learning in der Schachprogrammierung''. Studienarbeit, [[Free University of Berlin]], advisor: [[Raúl Rojas]], [http://page.mi.fu-berlin.de/block/Skripte/Reinforcement.pdf pdf] (German)

=Forum Posts=
* [https://groups.google.com/group/rec.games.chess.computer/browse_frm/thread/1f7ba9d3c31f071 KnightCap 1.0] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], February 27, 1997
* [https://groups.google.com/d/msg/rec.games.chess.computer/Wl7A-v-gWYQ/QLuvAp0l4_gJ Parallel searching] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], March 22, 1997 » [[Parallel Search]]
* [https://groups.google.com/group/rec.games.chess.computer/browse_frm/thread/e68ee1ab5a2603d3 KnightCap v1.8] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], April 03, 1997
* [https://groups.google.com/group/rec.games.chess.computer/msg/300171a5fa7ce7b6 Re: computer chess "oracle" ideas...] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], April 03, 1997 » [[Oracle]]
* [https://groups.google.com/group/rec.games.chess.computer/msg/730c03a83bf92807 Re: cheaper search ?] by [[Shaun Press]], [[Computer Chess Forums|rgcc]], April 26, 1997 » [[Copy-Make]], [[Vanilla Chess]]
* [https://groups.google.com/group/rec.games.chess.computer/msg/4d6c328e8e8e0cd4 Re: Bit Board Bonkers?? - other alternatives] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], August 9, 1997 » [[Piece-Sets]]
* [https://groups.google.com/group/rec.games.chess.computer/msg/f9bfe5d4457a19ad asymmetry] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], August 12, 1997 » [[Asymmetric Evaluation]], [[Parity Pruning]]
* [https://groups.google.com/group/rec.games.chess.computer/msg/ba9febc300f8698f Re: How to get chess program to solve KBN mate?] by [[David Blackman|David John Blackman]], [[Computer Chess Forums|rgcc]], September 18, 1997 » [[KBNK Endgame]]
* [https://www.stmintz.com/ccc/index.php?id=12458 KnightCap---A free chess program that learns] by [[Jonathan Baxter]], [[CCC]], November 26, 1997
* [https://www.stmintz.com/ccc/index.php?id=28584 Parameter Tuning] by [[Jonathan Baxter]], [[CCC]], October 01, 1998 » [[Automated Tuning]]
* [https://www.stmintz.com/ccc/index.php?id=28647 KnightCap and Windows] by [[Torsten Schoop]], [[CCC]], October 02, 1998
* [https://www.stmintz.com/ccc/index.php?id=100829 KnightCap installation question] by [[Sven Reichard]], [[CCC]], March 08, 2000
* [https://www.stmintz.com/ccc/index.php?id=306311 Question about the KnightCap find_pins function] by Matthew White, [[CCC]], July 14, 2003 » [[Pin]]
* [http://www.talkchess.com/forum/viewtopic.php?t=59304 KnightCap source code] by [[Robert Pope]], [[CCC]], February 19, 2016

=External Links=
* [http://samba.anu.edu.au/KnightCap/ Welcome to the KnightCap home page]
* [https://ftp.samba.org/pub/KnightCap/ Index of /pub/KnightCap] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=59304&start=1 Re: KnightCap source code] by [[Jim Ablett]], [[CCC]], February 19, 2016</ref>
* [https://en.wikipedia.org/wiki/KnightCap KnightCap from Wikipedia]
* [http://chessexpress.blogspot.de/2007/07/tridge.html chessexpress: Tridge] by [[Shaun Press]], July 23, 2007

=References=
<references />

'''[[Engines|Up one level]]'''
[[Category:Open Source]][[Category:GPL]]

Navigation menu