Difference between revisions of "CPW-Engine"

From Chessprogramming wiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 57: Line 57:
 
* [[CPW-Engine_attacks]]
 
* [[CPW-Engine_attacks]]
 
* [[CPW-Engine_utils]]
 
* [[CPW-Engine_utils]]
 +
* [[CPW_King]]
  
 
=Features=  
 
=Features=  
 
* [[0x88]] board
 
* [[0x88]] board
* [[Alpha-Beta|Alpha-beta]] with [[Principal Variation Search|PVS]]
+
* [[Search]]
* [[Quiescence Search|Quiescence search]] with [[Delta Pruning|delta pruning]]
+
** [[Alpha-Beta]] with [[Principal Variation Search|PVS]]
* [[Null Move Pruning#AdaptiveNullMovePruning|Adaptive null move pruning]]
+
** [[Transposition Table]]
* [[Futility Pruning|Futility pruning]]
+
** [[Quiescence Search]] with [[Delta Pruning]]
* [[Evaluation]]: [[Material|material]] (with some scaling), [[Piece-Square Tables|piece-square tables]], [[Weak Pawns|weak]] and [[Passed Pawn|passed pawns]], [[King Safety#KingTropism|enemy king tropism]]
+
** [[Null Move Pruning#AdaptiveNullMovePruning|Adaptive Null Move Pruning]]
 +
** [[Futility Pruning]]
 +
* [[Evaluation]]
 +
** [[Material]] (with some scaling)
 +
** [[Piece-Square Tables]]
 +
** [[Weak Pawns|Weak]] and [[Passed Pawn|Passed Pawns]]
 +
** [[King Safety#KingTropism|Enemy King Tropism]]
 
* [[UCI]] support
 
* [[UCI]] support
  
Line 77: Line 84:
 
Though CPW is a didactic program, it has a couple of features that should not be repeated in Your programs
 
Though CPW is a didactic program, it has a couple of features that should not be repeated in Your programs
 
* Lack of a separate capture generator
 
* Lack of a separate capture generator
* Hash table does not save the move itself, but only its position on the list, which limits development options
+
* [[Transposition Table]] (TT) does not save the move itself, but only its position on the list, which limits development options.
 +
* [[CPW-Engine_search]] has issues with storing [[Lower Bound]], [[Upper Bound]] and [[Exact Score]] into the TT <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=67599&start=2 Re: Debugging a transposition table] by [[Vivien Clauzon]], [[CCC]], May 30, 2018</ref> <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=76574&start=5 Re: Plea for a computerchess beginners forum or FAQ] by [[Marcel Vanthoor]], [[CCC]], March 09, 2021</ref>
  
 
=See also=  
 
=See also=  
Line 85: Line 93:
 
* [http://lefounumerique.xooit.com/t149-Cpw-encore-un-UCI-Engine-sans-interet.htm Cpw : encore un UCI Engine sans intérêt] by [[Patrick Buchmann]], [[UEL|Le Fou numérique Forum]],  August 08, 2008 (French)
 
* [http://lefounumerique.xooit.com/t149-Cpw-encore-un-UCI-Engine-sans-interet.htm Cpw : encore un UCI Engine sans intérêt] by [[Patrick Buchmann]], [[UEL|Le Fou numérique Forum]],  August 08, 2008 (French)
 
* [http://www.talkchess.com/forum/viewtopic.php?t=54802 fixing CPW-engine] by [[Pawel Koziol]], [[CCC]], December 30, 2014
 
* [http://www.talkchess.com/forum/viewtopic.php?t=54802 fixing CPW-engine] by [[Pawel Koziol]], [[CCC]], December 30, 2014
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=67599&start=2 Re: Debugging a transposition table] by [[Vivien Clauzon]], [[CCC]], May 30, 2018 » [[CPW-Engine_search]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=76574&start=5 Re: Plea for a computerchess beginners forum or FAQ] by [[Marcel Vanthoor]], [[CCC]], March 09, 2021
  
 
=External Links=
 
=External Links=
Line 94: Line 104:
 
[[Category:Open Source]]
 
[[Category:Open Source]]
 
[[Category:UCI]]
 
[[Category:UCI]]
 +
[[Category:Didactic]]

Latest revision as of 21:04, 11 March 2021

Home * Engines * CPW-Engine

The CPW-Engine (the ChessProgramming Wiki Engine) was developed by Pawel Koziol and Edmund Moshammer, who tried to put some of the theory presented on this pages into practice. The CPW is a fully functional chess engine intended as guidance to new programmers and exemplify some ideas. If You have any ideas how to simplify it, feel free to use "discussion" option. See also CPW history on how the engine has evolved. A revised 2014 version 1.1 was provided Pawel Koziol [1], full code is further available at GitHub [2].

The aims for the engine

Playing strength

Version 1.0 of the CPW-Engine (CPW 1.00 beta 1) scored 5.5 out of 11 in ChessWar XIII F, earning there a rating of 1828. For the sake of comparison the same number of points has been gained by Gerbil (1894) and Faile (1900). Crosstables and games can be found at the ChessWar site.

Version 1.1 is probably about 2200 Elo on CCRL scale, but this needs to be tested.

The following game represents the current strength of the engine:

[Event "Test game"]
[Date "2008.08.19"]
[Round "7"]
[White "Tscp181"]
[Black "CPW 1.0"]
[Result "0-1"]
[TimeControl "300"]
[Termination "adjudication"]
[PlyCount "67"]

1.d4 Nf6 2.Nf3 e6 3.c4 c5 4.d5 exd5 5.cxd5 d6 6.Nc3 g6 7.e4 Bg7 8.Bb5+ Bd7 9.Qd3 O-O 
10.Bf4 Nxe4 11.Nxe4 Qa5+ 12.Qd2 Qxb5 13.O-O-O Qa6 14.Bxd6 Re8 15.Qc2 Bf5 16.Nfg5 Bh6 
17.Nf6+ Kh8 18.Qxf5 gxf5 19.Nxe8 Bxg5+ 20.Kb1 Nd7 21.Be5+ Nxe5 22.Nc7 Qf6 23.Rhe1 Rc8 
24.Nb5 Nc4 25.Re2 Qa6 26.Nc3 Bf6 27.Rde1 Na3+ 28.Ka1 Qc4 29.d6 Bxc3 30.d7 Rd8 31.Re8+ 
Kg7 32.R8e4 fxe4 33.Rc1 Bxb2+ 34.Kxb2
{0-1 Arena Adjudication} 0-1

This is it: lousy positional play and some luck aided by king tropism evaluation. The engine scores about 90% against TSCP.

Parts

Features

To do

This list represents things that are to be done in order to be ready for a release

  • create a text interface for testing and debugging
  • comment the source
  • get some more speed
  • add a WinBoard command parser

Known Deficiencies

Though CPW is a didactic program, it has a couple of features that should not be repeated in Your programs

See also

Forum Posts

External Links

References

Up One Level