Tucano

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. || toc =Description=
 * Home * Engines * Tucano**
 * [[image:tucano.JPG link="https://en.wikipedia.org/wiki/File:Ramphastos_sulfuratus_-Spain_-Zoo_-upper_body-8a.jpg"]] ||~ || **Tucano**, (TucanoChess)
 * Keel-billed Toucan ||~ ||^ ||

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. Tucano 3.00 uses 9-bit occupancy index for the bishops, but still variable shifts. code format="cpp" U64 rook_attack_table[64][4096]; U64 bishop_attack_table[64][4096]; // bishop_attack_table[64][512] in 3.00; code 

BitScan & PopCount
The memory bacchanal is stretched by the BitScan and Population Count implementations using 576 KiB of lookup tables. Assuming little-endianess, a C union 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: code format="cpp" // This union is used to get first and last index, and bit counts. typedef union 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]]; else return (SINT)first_index_table[1][bbix.u16[2]]; } else { if (bbix.u16[1]) return (SINT)first_index_table[2][bbix.u16[1]]; else return (SINT)first_index_table[3][bbix.u16[0]]; } } code

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.


 * Principal Variation Search
 * Internal Iterative Deepening at PV-nodes
 * Null Move Pruning
 * Mate Threat Extensions
 * Check Extensions
 * Passed Pawn Extensions
 * Futility Pruning
 * Move Count Based Pruning
 * Late Move Reductions
 * Killer Heuristic
 * History Heuristic
 * Static Exchange Evaluation

Evaluation
The evaluation features most common terms 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
 * Material
 * Evaluation of Pieces
 * Piece-Square Tables
 * Passed Pawn
 * Pawn Structure
 * King Safety
 * Mobility
 * Texel's Tuning Method since **7.00**

=See also=
 * Bird

=Forum Posts=
 * [|Tucano chess engine 1.00] by Alcides Schulz, CCC, September 09, 2012
 * [|Tucano chess engine release 2.00] by Alcides Schulz, CCC, May 12, 2013
 * [|Tucano 3.00 Release] by Alcides Schulz, CCC, September 01, 2013
 * [|Tucano 4.00 release] by Alcides Schulz, CCC, March 30, 2014
 * [|Tucano 5.00 release] by Alcides Schulz, CCC, August 31, 2014
 * [|Tucano 6.00 released !] by Alcides Schulz, CCC, February 14, 2016
 * [|Tucano 7.00 Release - SMP version] by Alcides Schulz, CCC, December 16, 2017

=External Links=

Chess Engine

 * [|TucanoChess]
 * [|Tucano 6.00] in CCRL 40/40

Misc
> media type="youtube" key="dE5pI7cgIYw"
 * [|Toucan from Wikipedia]
 * [|Tucano - Wikipédia.pt] (Português)
 * Tania Maria, [|Boto] & [|Helio] - Transamazonica, Via Brasil, 1977, [|YouTube] Video

=References= =What links here?= include page="Tucano" component="backlinks" limit="30"
 * Up one Level**