Changes

Jump to: navigation, search

Mailbox

171 bytes added, 10:14, 4 March 2021
Pro & Const
a square-centric board representation where the [[Pieces#PieceCoding|encoding]] of every [[Squares|square]] resides in a separately addressable [[Memory|memory]] element, usually an element of an [[Array|array]] for random access. The square number, or its [[Files|file]] and [[Ranks|rank]], acts like an address to a post box, which might be empty or may contain one chess piece. As pointed out by [[Harm Geert Muller]], not only the embedded [[10x12 Board|10x12 board]], but various implementations are all mailbox, independently from elements in the array for padding that can act as a [https://en.wikipedia.org/wiki/Sentinel_value sentinel value] <ref>[http://www.talkchess.com/forum/viewtopic.php?t=48164 mailbox & CPW] by [[Harm Geert Muller]], [[CCC]], May 31, 2013</ref>.
=Pro Pros & Constcons===ProPros==
* Easy, straightforward to understand and implement
* Suitable with the same efficiency for any size of boardboards, from one can be fitted on 64-bit integers to much larger Except for high level . Thus it is also easier to support multi-chess engines, mailbox is variants which boards’ sizes are quite suitable different. * Suitable for other almost all chess tasks and software where computing speed is not high requirements such as chess tools, [[GUI]] since it is much easier to develop and maintain. It is also easier to support multi-chess variants which boards’ sizes are quite different.
Newcomers are suggested to implement their first chess engines using Mailbox thus they can get some basic knowledge and skills before starting more complicated chess projects.
==ConstCons==In the view of developing chess engines:* Programming must use many loop and branch commands such as for, while, if(compare with [[Bitboard]])
* Hard to store patterns and match them
* May have some inefficient high-frequency-use functions such as finding King locations, incheckin-check* Not efficient to generate moves in stages since generating all moves, captures only, non-captures may take quite similar periods
=Implementations=

Navigation menu