Tucano's unique bitboard infrastructure heavily favors memory versus computation so far, with the option to gain some linear speedup if that becomes a bottleneck, i.e. using specific processor instructions. However, on recent Intel processors with huge caches, this might be rather insignificant concerning the strength of the engine.
Magic Bitboards
Tucano 2.00 uses magic bitboards with a quite extravagant memory-layout of 12-bit occupancy indices for all rook and even bishop squares - 4 MiB in total, despite using variable shifts for dense index ranges per square [3]. Tucano 3.00 uses 9-bit occupancy index for the bishops, but still variable shifts [4].
U64 rook_attack_table[64][4096];
U64 bishop_attack_table[64][4096];// bishop_attack_table[64][512] in 3.00;
BitScan & PopCount
The memory bacchanal is stretched by the BitScan and Population Count implementations using 576 KiB of lookup tables [5]. Assuming little-endianess, a C union [6] is used to either access the bitboard as native 64-bit quad word, two 32-bit double words, or four 16-bit words, allowing divide and conquer solutions of bitscan with hierarchical branches. Disjoint lookup tables for each of the four word indices is used without further calculation, rather than sharing one table for each word, adding 16, 32 or 48 offsets, as for instance in Spector:
// This union is used to get first and last index, and bit counts.typedefunion u_bitboard_index
{
U64 u64;
UINT u32[2];
U16 u16[4];} BBIX;
S8 first_index_table[4][65536];
S8 last_index_table[4][65536];
U8 bit_count_table[65536];
SINT bb_first(BBIX bbix){if(bbix.u32[1]){if(bbix.u16[3])return(SINT)first_index_table[0][bbix.u16[3]];elsereturn(SINT)first_index_table[1][bbix.u16[2]];}else{if(bbix.u16[1])return(SINT)first_index_table[2][bbix.u16[1]];elsereturn(SINT)first_index_table[3][bbix.u16[0]];}}
a Chess Engine Communication Protocol compliant open source engine under the GPL written by Alcides Schulz in C. Tucano was first released in September 2012 [1].
Table of Contents
Description
Bitboard Infrastructure
Tucano's unique bitboard infrastructure heavily favors memory versus computation so far, with the option to gain some linear speedup if that becomes a bottleneck, i.e. using specific processor instructions. However, on recent Intel processors with huge caches, this might be rather insignificant concerning the strength of the engine.Magic Bitboards
Tucano 2.00 uses magic bitboards with a quite extravagant memory-layout of 12-bit occupancy indices for all rook and even bishop squares - 4 MiB in total, despite using variable shifts for dense index ranges per square [3]. Tucano 3.00 uses 9-bit occupancy index for the bishops, but still variable shifts [4].BitScan & PopCount
The memory bacchanal is stretched by the BitScan and Population Count implementations using 576 KiB of lookup tables [5]. Assuming little-endianess, a C union [6] is used to either access the bitboard as native 64-bit quad word, two 32-bit double words, or four 16-bit words, allowing divide and conquer solutions of bitscan with hierarchical branches. Disjoint lookup tables for each of the four word indices is used without further calculation, rather than sharing one table for each word, adding 16, 32 or 48 offsets, as for instance in Spector:Search
Tucano's search applies PVS alpha-beta with transposition table inside an iterative deepening framework without aspiration windows. Since version 7.00, Tucano performs Lazy SMP using a shared hash table [7].Evaluation
The evaluation features most common terms [8] with speculative calculation and aggregation of opening and endgame scores. The final score is interpolated by game phase within a tapered evaluation, with an additional draw adjustment in pawnless endgames.Connected Passed Pawns
Candidate Passed Pawn
Backward Pawn
Doubled Pawn
Isolated Pawn
Pawn Shield
Pawn Storm
See also
Forum Posts
External Links
Chess Engine
Misc
References
What links here?
Up one Level