Changes

Jump to: navigation, search

Mailbox

2,111 bytes added, 11:00, 13 June 2021
no edit summary
* [[Vector Attacks]]
: [[0x88]]
 
=Pros & cons=
==Pros==
* Easy, straightforward to understand and implement
* Suitable with the same efficiency for any size of boards, from one can be fitted on 64-bit integers to much larger. Thus it is also easier to support multi-chess variants which boards’ sizes are quite different.
* Suitable for 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.
 
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.
 
==Cons==
In the view of developing chess engines:
* Programming must use many loop and branch commands such as for, while, if (compare with [[Bitboards]])
* Hard to store patterns and match them
* May have some inefficient high-frequency-use functions such as finding King locations, in-check
* Not efficient to generate moves in stages since generating all moves, captures only, non-captures may take quite similar periods
 
=Speed=
For basic tasks such as generating, making/unmaking moves, a "pure" mailbox maybe slower than [[Bitboards]]. However, when combining it with other methods such as [[Piece-Lists]] and optimize the code it could be as fast as Bitboards<ref>[http://talkchess.com/forum3/viewtopic.php?f=7&t=76773#p885878 The mailbox trials] by [[Pham Hong Nguyen|Nguyen Pham]], [[CCC]], Mar 04, 2021</ref>
=See also=
* [http://www.talkchess.com/forum/viewtopic.php?t=23191 move generation with one dimensional "12 x 10" array] by [[Andrew Short]], [[CCC]], August 22, 2008
* [http://www.talkchess.com/forum/viewtopic.php?t=48164 mailbox & CPW] by [[Harm Geert Muller]], [[CCC]], May 31, 2013
* [http://talkchess.com/forum3/viewtopic.php?f=7&t=76773 The mailbox trials] by [[Harm Geert Muller]], [[CCC]], March 04, 2021 <ref>[https://github.com/maksimKorzh/hgm-mailbox-trials/blob/main/mailbox7b.c hgm-mailbox-trials/mailbox7b.c at main · maksimKorzh/hgm-mailbox-trials · GitHub] hosted by [[Maksim Korzh]]</ref>
=External Links=
* [https://en.wikipedia.org/wiki/Board_representation_%28chess%29#Array_based Board representation (chess) - Array based from Wikipedia]
* [http://www.craftychess.com/hyatt/boardrep.html Chess board representations] by [[Robert Hyatt]]* [https://github.com/maksimKorzh/hgm-mailbox-trials/blob/main/mailbox7b.c hgm-mailbox-trials/mailbox7b.c at main · maksimKorzh/hgm-mailbox-trials · GitHub] hosted by [[Maksim Korzh]] <ref>[http://talkchess.com/forum3/viewtopic.php?f=7&t=76773 The mailbox trials] by [[Harm Geert Muller]], [[CCC]], March 04, 2021</ref>
* [https://en.wikipedia.org/wiki/Mailbox Mailbox (disambiguation) from Wikipedia]

Navigation menu