Changes

Jump to: navigation, search

Vector Attacks

137 bytes added, 11:02, 15 April 2018
m
no edit summary
During offset [[Move Generation|move generation]], each piece applies a specific displacement or '''increment vector''' (offset) for each move direction, added to the position vector of the [[Origin Square|origin square]] to determine the next potential [[Target Square|move target]] in that direction, [[Sliding Pieces|sliding pieces]] continuing in the same direction as long the targets are empty. Due to the additional padded files and possibly ranks, off the board test are as simple as the [[10x12 Board|10x12 board]] with surrounding files and ranks containing off the board codes as [https://en.wikipedia.org/wiki/Sentinel_value sentinel values]. The [[0x88]] approach, a special 16x8 implementation of Vector Attacks, already indicates outside squares by its upper [[Nibble|nibble]] bits masked by 0x88.
One may argue, the 0x88 test is cheaper for off the board tests, because it does not need to lookup if the 0x88 test is true. On the other hand, for most cases, if false, it needs a lookup anyway, to perform a second test whether the square is empty, or occupied by an own or opponent piece <ref>[httphttps://www.stmintz.com/ccc/index.php?id=114377 Re: Question:1.hashtable 2.board 3.C] by [[Christophe Théron]], [[CCC]], June 13, 2000</ref> <ref>[httphttps://www.stmintz.com/ccc/index.php?id=114438 0x88 is not so smart] by [[Christophe Théron]], [[CCC]], June 13, 2000</ref>.
=<span id="NewArchitecture"></span>New Architecture=
==Conclusion==
A combination of 0x88 and [[10x12 Board]] with surrounded ranks, that is 16x12 or even 16x16 for a symmetric treatment of files and ranks (or 15x12, 15x15) seems slightly more efficient than pure 0x88 aka 16x8, making the "off the board" index condition almost redundant, since it can be combined with the coding of the guard or sentinal squares <ref>[httphttps://www.stmintz.com/ccc/index.php?id=114377 Re: Question:1.hashtable 2.board 3.C] by [[Christophe Théron]], [[Computer Chess Forums|CCC]], June 13, 2000</ref> <ref>[http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=2407&p=11195#p11109 Re: Fruit's Board Representation?] by [[Fabien Letouzey]], [[Computer Chess Forums|Winboard Forum]], April 28, 2005</ref> <ref>[[Fritz Reul]] ('''2009'''). ''New Architectures in Computer Chess''. Ph.D. Thesis, 2.2.1 ''Computer Chessboard Representation''</ref> <ref>[http://www.talkchess.com/forum/viewtopic.php?t=62279&start=6 Re: Recommended board representation for a rookie] by [[Harm Geert Muller]], [[CCC]], November 26, 2016</ref> .
=See also=
=Forum Posts=
* [https://www.stmintz.com/ccc/index.php?id=114311 Question:1.hashtable 2.board 3.C] by [[Teerapong Tovirat]], [[CCC]], June 13, 2000: [https://www.stmintz.com/ccc/index.php?id=114377 Re: Question:1.hashtable 2.board 3.C] by [[Christophe Théron]], [[CCC]], June 13, 2000
: [https://www.stmintz.com/ccc/index.php?id=114385 Re: Question:1.hashtable 2.board 3.C] by [[Eugene Nalimov]], [[CCC]], June 13, 2000
: [https://www.stmintz.com/ccc/index.php?id=114438 0x88 is not so smart] by [[Christophe Théron]], [[CCC]], June 13, 2000 » [[0x88]]

Navigation menu