Home * Engines * Tucano
tucano.JPG

Tucano, (TucanoChess)
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].
Keel-billed Toucan [2]

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].
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.
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]];
  }
}

Search

Tucano's search applies PVS alpha-beta with transposition table inside an iterative deepening framework without aspiration windows.


Evaluation

The evaluation features most common terms [7] 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.


See also


Forum Posts


External Links

Chess Engine


Misc


References

  1. ^ Tucano chess engine 1.00 by Alcides Schulz, CCC, September 09, 2012
  2. ^ Keel-billed Toucan (also known as Sulfur-breasted Toucan and the Rainbow-billed Toucan) Faunia, Madrid, Spain, Photo by Raúl Hernández González, April 23, 2009, Toucan from Wikipedua
  3. ^ Tucano chess engine release 2.00 by Alcides Schulz, CCC, May 12, 2013
  4. ^ Tucano 3.00 Release by Alcides Schulz, CCC, September 01, 2013
  5. ^ Introduction and (hopefully) contribution - bitboard methods by Alcides Schulz, CCC, June 03, 2011
  6. ^ c - How are the union members stored? by Happy Mittal, Stack Overflow, December 27, 2010
  7. ^ Eval development: is it better to tune or add new terms? by Alcides Schulz, CCC, March 17, 2013

What links here?


Up one Level