Difference between revisions of "LTChess"

From Chessprogramming wiki
Jump to: navigation, search
(Created page with "'''Home * Engines * LTChess''' '''LTChess''',<br/> a didactic open source chess program by Laurie Tunnicliffe, written in Pa...")
 
 
Line 7: Line 7:
 
It features separate mutually recursive procedures for the main [[Search|search]] and [[Quiescence Search|quiescence search]] for White and Black. [[Evaluation]] is done by [[Piece-Square Tables|piece square tables]], with some positional features added in.  
 
It features separate mutually recursive procedures for the main [[Search|search]] and [[Quiescence Search|quiescence search]] for White and Black. [[Evaluation]] is done by [[Piece-Square Tables|piece square tables]], with some positional features added in.  
 
[[Move Ordering|Move ordering]] uses the PST, [[Killer Heuristic|killer heuristic]] and [[History Heuristic|history heuristic]].  
 
[[Move Ordering|Move ordering]] uses the PST, [[Killer Heuristic|killer heuristic]] and [[History Heuristic|history heuristic]].  
The classic [[Triangular PV-Table|triangular array]] is used to return the [[Principal variation|PV]]. So far, LTChess has a simple text style [[User Interface|user interface]].  
+
The classic [[Triangular PV-Table|triangular array]] is used to return the [[Principal Variation|PV]]. So far, LTChess has a simple text style [[User Interface|user interface]].  
 
LTChess 2, released in December 2016, changed to [[Negamax|NegaMax]], added [[Piece-Lists|piece-lists]] to 0x88, now using [[Copy-Make|copy/make]] instead of [[Make Move|make]]/[[Unmake Move|unmake]] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=62365 LTchess 2] by [[Laurie Tunnicliffe]], [[CCC]], December 03, 2016</ref> .
 
LTChess 2, released in December 2016, changed to [[Negamax|NegaMax]], added [[Piece-Lists|piece-lists]] to 0x88, now using [[Copy-Make|copy/make]] instead of [[Make Move|make]]/[[Unmake Move|unmake]] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=62365 LTchess 2] by [[Laurie Tunnicliffe]], [[CCC]], December 03, 2016</ref> .
  

Latest revision as of 20:44, 30 December 2019

Home * Engines * LTChess

LTChess,
a didactic open source chess program by Laurie Tunnicliffe, written in Pascal. The development started in January 2012. LTChess may be compiled using either Turbo Pascal, Free Pascal or Virtual Pascal compilers [1]. LTChess uses a 0x88 board representation and applies alpha-beta with iterative deepening, NMP, LMR and transposition table. It features separate mutually recursive procedures for the main search and quiescence search for White and Black. Evaluation is done by piece square tables, with some positional features added in. Move ordering uses the PST, killer heuristic and history heuristic. The classic triangular array is used to return the PV. So far, LTChess has a simple text style user interface. LTChess 2, released in December 2016, changed to NegaMax, added piece-lists to 0x88, now using copy/make instead of make/unmake [2] .

Code Sample

ClearPVDisplay;
GoToXY(51, 13);
Write('I''m Thinking.......');

FillChar(PV, SizeOf(PV), 0);
FillChar(HistoryTable, SizeOf(HistoryTable), 0);
FillChar(KillerMoves, SizeOf(KillerMoves), 0);
InitTT;

MaxDepth := 3; {-- do a 4 ply search first to fill history table etc }
TimesUp := False;
PVscore := 0;

Time := StopWatch(Start);
WHILE (MaxDepth < FixedDepth) AND NOT TimesUp AND (Abs(PVscore) < 30000) DO
BEGIN
    Inc(MaxDepth); {-- search the next ply...iterative deepening }
    ShufflePV(MaxDepth); {-- so the PV is the correct order for the next ply }
    SearchingPV := True; {-- we will search the PV moves first }
    PVscore := AlphaBetaMinMax(MaxDepth); {-- call the search }
    Time := StopWatch(Now);
    WriteInfoToScreen;
END;
{-- now return the best move from the PV array }
TheMove := PV[MaxDepth, MaxDepth];

Forum Posts

External Links

References

Up one level