Changes

Jump to: navigation, search

0x88

381 bytes added, 17:16, 1 October 2020
no edit summary
==<span id="SquareRelations"></span>Square Relations==
The difference of valid 0x88 coordinates A and B is uniquely with respect to [[Distance|distance]] and [[Direction|direction]], which is not true for classical packed three bit rank and file coordinates (for instance -+7 may occur on [[Ranks|ranks]], [[Anti-Diagonals|anti-diagonals]]). That makes lookups for [[Distance|distance]], [[Manhattan-Distance|Manhattan-distance]], possible piece attacks and that like, much more resource friendly. While classical square coordinates in the 0..63 range require 4K (64*64) sized tables, the 0x88 difference takes 1/16 or 256 sized tables - or even 16 less.
An offset of 119 (0x77 as max valid square index) is added, to make +-119 a 0..238 range (size of 240 for alignment reasons).
About its origin [[Bruce Moreland]] wrote <ref>[http://web.archive.org/web/20070716111804/www.brucemo.com/compchess/programming/0x88.htm 0x88 Move Generation] by [[Bruce Moreland]]</ref> :
When I was at the Hong Kong [[WCCC 1995|WCCC in 1995]], I had some conversations with [[David Kittinger]]. He told me about a [[Move Generation|move generation scheme]], whose name I promptly forgot. When I came back home, I explained this scheme online many times. Since I didn't know the name, I couldn't give it the proper name, and it kind of acquired a name. The name that seems to have stuck is "0x88", which is means [https://en.wikipedia.org/wiki/Hexadecimal hexadecimal] 88. The reason it's called 0x88 is that this constant is critical in the implementation of the scheme.
[[David Kittinger]] further in 2012 <ref>[http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=462693&t=43447 Re: Hello all] by [[David Kittinger|Dave Kittinger]], [[CCC]], April 26, 2012</ref>
I was told this technique at I believe the [[WMCCC 1981|Travemunde world championship]]. It just involved using 0rrr0ccc encoding. The advantage was that (sq + offset) & 0x88 would tell you if off board. Many of the devices I programmed on took longer to read ram than test a register result. Also, immediate test for < 0 (byte value) could test for off board, so faster off board test than accessing a 'collar' of off board values. The fellow who told me this attributed it to [[Mikhail Botvinnik|Michael Botvinnik]] (Former USSR World Champion) as something used in a version of [[Kaissa]] <ref>presumably in [[Pioneer]], see also [[Boris Stilman]] ('''1994'''). ''A Linguistic Geometry of the Chess Model''. [[Advances in Computer Chess 7]]</ref>. However, when I was riding an elevator w/Mr. Botvinnik and asked him about this to confirm the derivation, one of his handlers asked that I not ask Mr. Botvinnik any questions.
I was told this technique at I believe the [[WMCCC 1981|Travemunde world championship]] . It just involved using 0rrr0ccc encoding. The advantage was that (sq + offset) & 0x88 would tell you if off board. Many of and on the devices I programmed on took longer to read ram than test a register result. Also, immediate test for < 0 (byte value) could test for off board, so faster off board test than accessing a 'collar' utilization of off board values. The fellow who told me this attributed it to [[Mikhail Botvinnik|Michael Botvinnik]] (Former USSR World Champion) as something used in a version of [[KaissaMemory]] <ref>presumably in [[Pioneerhttp://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=462700&t=43447 Re: Hello all]], see also by [[Boris StilmanDavid Kittinger|Dave Kittinger]] ('''1994'''). ''A Linguistic Geometry of the Chess Model''. , [[Advances in Computer Chess 7CCC]], April 26, 2012</ref>. However, when I was riding an elevator w/Mr. Botvinnik and asked him about this to confirm the derivation, one of his handlers asked that I not ask Mr. Botvinnik any questions.
Another advantage of the 0rrr0ccc was that I put the 'ioboard' at 0rrr1ccc so basically used 1/2 a page of ram efficiently for both boards... I would then have the piece table at 1000wwww and on 1000bbbb for the utilization of [[Memory]] <ref>[http://www.talkchess.com/forum/viewtopicwhite and black pieces respectively just to pack things in.php?topic_view=threads&p=462700&t=43447 Re: Hello all] by [[David Kittinger|Dave Kittinger]], [[CCC]], April 26, 2012</ref>
Another advantage ... and the difference of the 0rrr0ccc was that I put the 'ioboard' at 0rrr1ccc so basically used 10x88 coordinates <ref>[http://2 a page of ram efficiently for both boardswww.talkchess. I would then have the piece table at 1000wwww and 1000bbbb for the white and black pieces respectively just to pack things incom/forum/viewtopic.php?topic_view=threads&p=462734&t=43447 Re: Hello all] by [[David Kittinger|Dave Kittinger]], [[CCC]], April 27, 2012</ref>
... and the difference of 0x88 coordinates <ref>[http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=462734&t=43447 Re: Hello all] by [[David Kittinger|Dave Kittinger]], [[CCC]], April 27, 2012</ref>  The whole 0x88 is pretty obvious. In fact, another big benefit is that you could take the difference of two sqs and use that to look into a table to see the legal piece types that could be attackers. Having bit 3 cleared prevented wrap around on this look up. Hence, for most my programs the basic capture routine iterated from [[MVV-LVA|largest to smallest captured piece]], using smallest to largest capturing piece, taking the difference of the sqs, looking up in att_table and seeing if nz, if nz, then if & with attacker type bit nz then just had to check if [[Sliding Pieces|slider]] and had [[Square Attacked By#By0x88Difference|path clear]]. Of course, w and b pawns had different [[Pieces#PieceTypeCoding|type]] bits. Made for a decently fast and ordered [[Quiescence Search|capture search]].
=Conclusion=
: [[CPW-Engine_0x88_math]]
: [[CPW-Engine_board(0x88)]]
: [[CPW-Engine_constants]]
: [[CPW-Engine_move(0x88)]]
: [[CPW-Engine_movegen(0x88)]]
=Forum Posts=
==1995 ...==
* [https://groups.google.com/d/msg/rec.games.chess.computer/b-LPW2cvbSU/X7c__HhVXh8J 0x88?] by [[Jan Eric Larsson]], [[Computer Chess Forums|rgcc]], August 31, 1995
* [https://groups.google.com/d/msg/rec.games.chess.computer/MrZsomJL5wU/wvw97iD-PncJ What is X88 in computing chess ?] by Guido Stepken, [[Computer Chess Forums|rgcc]], April 07, 1996
* [https://groups.google.com/d/msg/rec.games.chess.computer/qzs01XFt_6I/yyX6rwauT8UJ X88 board representations] by [[Valavan Manohararajah]], [[Computer Chess Forums|rgcc]], April 17, 1996
* [http://www.talkchess.com/forum/viewtopic.php?t=22316 O88 chess] by [[William H. Rogers]], [[CCC]], July 12, 2008
* [http://www.talkchess.com/forum/viewtopic.php?t=24466 0x88 board representation : basic question from beginner] by Von_Dingle, [[CCC]], October 18, 2008
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=50635 0x88 FRC castle questions] by [[Daniel Uranga]], [[Computer Chess Forums|Winboard Forum]], December 12, 2009 » [[Chess960]]
==2010 ...==
* [http://www.talkchess.com/forum/viewtopic.php?t=33276 0x88 move generation] by Jorma Nieminen, [[CCC]], March 15, 2010
=References=
<references />
 
'''[[Vector Attacks|Up one Level]]'''
[[Category:Kittinger Quotes]]

Navigation menu