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].
Contents
The aims for the engine
- Readability
- Annotation
- Playing strength is less important
- Modularization
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
- CPW-Engine_stdafx_h (constants and most of function prototypes)
- CPW-Engine_book
- CPW-Engine_chronos (timing functions)
- CPW-Engine_console_ui
- CPW-Engine_main
- CPW-Engine_com
- CPW-Engine_eval_init
- CPW-Engine_quiescence
- CPW-Engine_recognize
- CPW-Engine_root (obsolete)
- CPW-Engine_search
- CPW-Engine_transposition
- CPW-Engine_0x88_math
- CPW-Engine_board(0x88)
- CPW-Engine_movegen(0x88)
- CPW-Engine_move(0x88)
- CPW-Engine_algebraic
- CPW-Engine_eval
- CPW-Engine_attacks
- CPW-Engine_utils
- CPW_King
Features
- 0x88 board
- Search
- Evaluation
- Material (with some scaling)
- Piece-Square Tables
- Weak and Passed Pawns
- Enemy King Tropism
- UCI support
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
- Lack of a separate capture generator
- 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 [3] [4]
See also
- Glass, the UCI engine by the authors of the CPW-Engine.
Forum Posts
- Cpw : encore un UCI Engine sans intérêt by Patrick Buchmann, Le Fou numérique Forum, August 08, 2008 (French)
- fixing CPW-engine by Pawel Koziol, CCC, December 30, 2014
- Re: Debugging a transposition table by Vivien Clauzon, CCC, May 30, 2018 » CPW-Engine_search
- Re: Plea for a computerchess beginners forum or FAQ by Marcel Vanthoor, CCC, March 09, 2021
External Links
References
- ↑ fixing CPW-engine by Pawel Koziol, CCC, December 30, 2014
- ↑ nescitus/cpw-engine · GitHub
- ↑ Re: Debugging a transposition table by Vivien Clauzon, CCC, May 30, 2018
- ↑ Re: Plea for a computerchess beginners forum or FAQ by Marcel Vanthoor, CCC, March 09, 2021