Difference between revisions of "Bitfoot"

From Chessprogramming wiki
Jump to: navigation, search
(Created page with "'''Home * Engines * Bitfoot''' '''Bitfoot''',<br/> a version of Clubfoot, the UCI open source chess engine written by Shaw...")
 
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
'''Bitfoot''',<br/>
 
'''Bitfoot''',<br/>
a version of [[Clubfoot]], the [[UCI]] [[Open Source Engines|open source chess engine]] written by [[Shawn Chidester]] in [[Cpp|C++]], that uses [[Bitboards|bitboards]] <ref>[https://github.com/zd3nik/Bitfoot/blob/master/README.md Bitfoot/README.md at master · zd3nik/Bitfoot · GitHub]</ref>. The [[Search|search]] mechanics of this engine are identical to those used in Clubfoot. The differences are [[Board Representation|board representation]], [[Move Generation|move generation]], and [[Evaluation|positional evaluation]]. Bitfoot uses bitboard for board representaion, Clubfoot uses [[0x88]] board representation. Move generation is strongly tied to board representation so move generation between the two engines is implicitly different. Positional evaluation in Bitfoot takes advantage of the capabilities enabled by using bitboards. So Bitfoot's positional evaluation is much more advanced than Clubfoot's. That being said, Bitfoot's positional evaluation is still relatively dump compared to many of today's top engines.
+
a version of [[Clubfoot]], the [[UCI]] [[:Category:Open Source|open source chess engine]] written by [[Shawn Chidester]] in [[Cpp|C++]], that uses [[Bitboards|bitboards]] <ref>[https://github.com/zd3nik/Bitfoot/blob/master/README.md Bitfoot/README.md at master · zd3nik/Bitfoot · GitHub]</ref>. The [[Search|search]] mechanics of this engine are identical to those used in Clubfoot. The differences are [[Board Representation|board representation]], [[Move Generation|move generation]], and [[Evaluation|positional evaluation]]. Bitfoot uses bitboard for board representaion, Clubfoot uses [[0x88]] board representation. Move generation is strongly tied to board representation so move generation between the two engines is implicitly different. Positional evaluation in Bitfoot takes advantage of the capabilities enabled by using bitboards. So Bitfoot's positional evaluation is much more advanced than Clubfoot's. That being said, Bitfoot's positional evaluation is still relatively dump compared to many of today's top engines.
 
<span id="ABBitboards"></span>
 
<span id="ABBitboards"></span>
 
=A/B  Bitboards=
 
=A/B  Bitboards=
Line 22: Line 22:
 
}
 
}
 
</pre>
 
</pre>
There are further versions of the routines leaving distinct sets of attacked blocker (and possible [[Captures|capture]] targets) or attacked empty squares, target of [[Quiet Moves|quiet moves]].  
+
There are further versions of the routines leaving distinct sets of attacked blocker (and possible [[Captures|capture]] targets) or attacked empty squares, target of [[Quiet Moves|quiet moves]]. In a February 2020 [[CCC]] discussion, [[Martin Sedlak]] came up with a similar idea <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73082 scan-cut slider attack generation] by [[Martin Sedlak]], [[CCC]], February 13, 2020</ref>.
  
 
=See also=
 
=See also=
Line 33: Line 33:
 
=External Links=  
 
=External Links=  
 
* [https://github.com/zd3nik/Bitfoot zd3nik/Bitfoot · GitHub]
 
* [https://github.com/zd3nik/Bitfoot zd3nik/Bitfoot · GitHub]
* [https://en.wikipedia.org/wiki/Brecker_Brothers Brecker Brothers] - Above and Below, [https://en.wikipedia.org/wiki/Barcelona Barcelona], 1992, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
+
* [https://en.wikipedia.org/wiki/Brecker_Brothers Brecker Brothers] - Above and Below, ..., from [https://en.wikipedia.org/wiki/Return_of_the_Brecker_Brothers#Return_of_the_Brecker_Brothers_%E2%80%93_Live_in_Barcelona_(VHS) Return of the Brecker Brothers], [https://en.wikipedia.org/wiki/Barcelona Barcelona], 1992, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
: [[Videos#MichaelBrecker|Michael Brecker]], [[Videos#RandyBrecker|Randy Brecker]], [[Videos#MikeStern|Mike Stern]], [[Videos#DennisChambers|Dennis Chambers]], [https://en.wikipedia.org/wiki/George_Whitty George Whitty], [https://en.wikipedia.org/wiki/James_Genus James Genus]
+
: [[:Category:Michael Brecker|Michael Brecker]], [[:Category:Randy Brecker|Randy Brecker]], [[:Category:Mike Stern|Mike Stern]], [[:Category:Dennis Chambers|Dennis Chambers]], [https://en.wikipedia.org/wiki/George_Whitty George Whitty], [https://en.wikipedia.org/wiki/James_Genus James Genus]
: {{#evu:https://www.youtube.com/watch?v=MdtjIw7Of-E|alignment=left|valignment=top}}
+
: {{#evu:https://www.youtube.com/watch?v=AbRiCy6rXsE|alignment=left|valignment=top}}
  
 
=References=  
 
=References=  
Line 41: Line 41:
  
 
'''[[Engines|Up one Level]]'''
 
'''[[Engines|Up one Level]]'''
[[Category:Engine]][[Category:Open Source]][[Category:UCI]]
+
[[Category:Open Source]]
 +
[[Category:UCI]]
 +
[[Category:X86]]
 +
[[Category:X64]]
 +
[[Category:PC]]
 +
[[Category:Windows]]
 +
[[Category:Linux]]
 +
[[Category:Michael Brecker]]
 +
[[Category:Randy Brecker]]
 +
[[Category:Dennis Chambers]]
 +
[[Category:Mike Stern]]

Latest revision as of 13:43, 16 February 2020

Home * Engines * Bitfoot

Bitfoot,
a version of Clubfoot, the UCI open source chess engine written by Shawn Chidester in C++, that uses bitboards [1]. The search mechanics of this engine are identical to those used in Clubfoot. The differences are board representation, move generation, and positional evaluation. Bitfoot uses bitboard for board representaion, Clubfoot uses 0x88 board representation. Move generation is strongly tied to board representation so move generation between the two engines is implicitly different. Positional evaluation in Bitfoot takes advantage of the capabilities enabled by using bitboards. So Bitfoot's positional evaluation is much more advanced than Clubfoot's. That being said, Bitfoot's positional evaluation is still relatively dump compared to many of today's top engines.

A/B Bitboards

Bitfoot applies an own technique to determine sliding piece attacks dubbed A/B Bitboards or Above/Below Bitboards [2]. Similar to the classical approach, it works ray-wise and uses pre-calculated ray-attacks for each of the eight ray-directions and each of the 64 squares. It has to distinguish between positive and negative directions, because it has to isolate or bitscan the first blocker (if any) from the ray-attack intersection with the occupancy in different orders. The exclusion of squares behind the first blocker works by intersection with its appropriate below or above separation. This is how the routines look like conform to the classical approach prototype:

U64 rayAttacks[8][64];

U64 getPositiveRayAttacks(U64 occupied, enumDir dir8, enumSquare square) {
  U64 x = rayAttacks[dir8][square] & occupied;
  x = x & -x; // LSB (if any)
  return x | (rayAttacks[dir8][square] & (x-1)); // BELOW
}

U64 getNegativeRayAttacks(U64 occupied, enumDir dir8, enumSquare square) {
  U64 x = rayAttacks[dir8][square] & occupied;
  x = x ? C64(1) << bitScanReverse(x) : C64(0); // MSB (if any)
  return x | (rayAttacks[dir8][square] & (x^-x)); // ABOVE
}

There are further versions of the routines leaving distinct sets of attacked blocker (and possible capture targets) or attacked empty squares, target of quiet moves. In a February 2020 CCC discussion, Martin Sedlak came up with a similar idea [3].

See also

Forum Posts

External Links

Michael Brecker, Randy Brecker, Mike Stern, Dennis Chambers, George Whitty, James Genus

References

Up one Level