Changes

Jump to: navigation, search

Make Move

No change in size, 21:38, 15 May 2018
m
no edit summary
=Operations=
The general arithmetical and/or bitwise-logical operations to convert a node to its child are either reversible (even for [[Irreversible Moves|irreversible moves]]), by [https://en.wikipedia.org/wiki/Inverse_function inverse] (e.g. addition and subtraction) or [https://en.wikipedia.org/wiki/Involution_%28mathematics%29 own inverse] ([[General Setwise Operations#ExclusiveOr|exclusive or]]) operations, or are irreversible, for instance a sequence of addition and conjunction (add, and) of move aspects, to update [[En passant|ep state]], [[Castling rightsRights|castling rights]] and the [[Halfmove Clock|halfmove clock]].
=Update=
Aspects of a position altered by reversible operations may be kept in global structures, shared by all nodes of the [[Search Tree|tree]], for instance square centric [[Mailbox|mailbox]] board arrays or [[Bitboard Board-Definition|bitboard board-definition]], and require [[Incremental Updates|incremental updates]] by make '''and''' [[Unmake Move|unmake]]. Irreversible aspects of the position, which can not generally restored from a child-position by unmaking a move, need to be restored by either re-playing the whole game record from the root position (too slow), or to be memorized inside an array indexed by [[Ply|ply]] or on a [[Stack|stack]] ([https://en.wikipedia.org/wiki/LIFO_%28computing%29 LIFO]), most notably [[En passant|ep state]], [[Castling rightsRights|castling rights]] and the [[Halfmove Clock|halfmove clock]] enforcing the [[Fifty-move Rule|fifty-move rule]].
All those aspects of a position, no matter if reversible by unmake or not, which may need random access in a branch of moves from the [[Root|root]] (or initial position of the game) to the current position inside a certain implementation of a search algorithm, require an array of those aspects, indexed by ply, and updated by a [[Copy-Make]] approach.

Navigation menu