Difference between revisions of "Unmake Move"

From Chessprogramming wiki
Jump to: navigation, search
m
 
(4 intermediate revisions by the same user not shown)
Line 30: Line 30:
  
 
=Forum Posts=
 
=Forum Posts=
==1999==
+
==1998 ...==
 +
* [https://groups.google.com/d/msg/rec.games.chess.computer/EQxCixpytBg/e1R0a7u1WMsJ Working with moves or with positions] by Guillem Barnolas, [[Computer Chess Forums|rgcc]], February 22, 1998 » [[KC Chess]]
 
* [https://www.stmintz.com/ccc/index.php?id=40653 Unmake move v copy the board] by Hugh Cumper, [[CCC]], January 24, 1999
 
* [https://www.stmintz.com/ccc/index.php?id=40653 Unmake move v copy the board] by Hugh Cumper, [[CCC]], January 24, 1999
 +
* [https://www.stmintz.com/ccc/index.php?id=60557 Move Make/Unmake Questions] by [[Daniel Homan]], [[CCC]], July 15, 1999
 
==2000 ...==
 
==2000 ...==
 
* [http://groups.google.com/group/rec.games.chess.computer/browse_frm/thread/64f953b94ae312b Does Unmake Move Really Save Time?] by Adrian Jackson, [[Computer Chess Forums|rgcc]], March 08, 2001
 
* [http://groups.google.com/group/rec.games.chess.computer/browse_frm/thread/64f953b94ae312b Does Unmake Move Really Save Time?] by Adrian Jackson, [[Computer Chess Forums|rgcc]], March 08, 2001
Line 46: Line 48:
 
* [http://www.open-chess.org/viewtopic.php?f=5&t=665 Copy Board vs Unmake Move] by ChrisJ, [[Computer Chess Forums|OpenChess Forum]], September 29, 2010  
 
* [http://www.open-chess.org/viewtopic.php?f=5&t=665 Copy Board vs Unmake Move] by ChrisJ, [[Computer Chess Forums|OpenChess Forum]], September 29, 2010  
 
* [http://www.talkchess.com/forum/viewtopic.php?t=39938 performance of copy-make] by [[Rein Halbersma]], [[CCC]], August 02, 2011
 
* [http://www.talkchess.com/forum/viewtopic.php?t=39938 performance of copy-make] by [[Rein Halbersma]], [[CCC]], August 02, 2011
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=42665 make and unmake statistics] by [[Fermin Serrano]], [[CCC]], February 28, 2012 » [[Search Statistics]]
 +
* [http://www.open-chess.org/viewtopic.php?f=5&t=2250 Make and Unmake implementation] by [[Christian Daley|CDaley11]], [[Computer Chess Forums|OpenChess Forum]], February 01, 2013  » [[Make Move]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=47882 How costly is taking moves back ?] by [[Piotr Lopusiewicz]], [[CCC]], April 30, 2013
 
* [http://www.talkchess.com/forum/viewtopic.php?t=47882 How costly is taking moves back ?] by [[Piotr Lopusiewicz]], [[CCC]], April 30, 2013
 
* [http://www.talkchess.com/forum/viewtopic.php?t=50805 copy/make vs make/unmake] by [[Robert Hyatt]], [[CCC]], January 07, 2014
 
* [http://www.talkchess.com/forum/viewtopic.php?t=50805 copy/make vs make/unmake] by [[Robert Hyatt]], [[CCC]], January 07, 2014

Latest revision as of 11:33, 21 June 2020

Home * Chess * Moves * Unmake Move

Unmake Move is a function inside a chess program to update the internal chess position and its Board representation as well as associated or dependent state variables and data by a move unmade on the internal board. In unmake move, reversible aspects of a position can be incrementally updated by the inverse or own inverse operation of Make Move. Irreversible aspects of a position, such as ep state, castling rights and the halfmove clock are either restored from a stack (LIFO), or simply kept in arrays indexed by current search or game ply. Alternatively, one may capacitate the move with all the necessary information to recover those irreversible aspects of a position as well.

Negamax

This is how make and Unmake Move are applied inside a recursive search routine, for simplicity Negamax:

int negaMax( int depth ) {
    if ( depth == 0 ) return evaluate();
    int max = -oo;
    generateMoves(...);
    while ( m = getNextMove(...) )  {
        makeMove(m); 
        score = -negaMax( depth - 1 );
        unmakeMove(m); 
        if( score > max )
            max = score;
    }
    return max;
}

See also

Forum Posts

1998 ...

2000 ...

2005 ...

2010 ...

2015 ...

Up one Level