Home * Engines * Amundsen

Amundsen, (Jonte)
a Chess Engine Communication Protocol compliant open source chess engine under the GNU General Public License, written in C by John Bergbom. Started as college course project at the Department of Numerical Analysis and Computing Science, Royal Institute of Technology, Stockholm [1], a name change from Jonte to Amundsen took place between version 0.25 and 0.3, since the initial name was already used at FICS [2]. Amundsen was first released in May 2004, as announced by Dann Corbit in Winboard Forum [3].

Victory awaits him, who has everything in order.
Luck we call it.
Defeat is definitely due for him,
who has neglected to take the necessary precautions.
Bad luck we call it.

    • Roald Amundsen [4]
Amundsen at wheel of the Maud [5]


Bitboard Infrastructure

Rotated Bitboards

Amundsen uses rotated bitboards with 1/2 MiB lookup tables, indexed by 8-bit line occupancy, to determine sliding piece attacks, ignoring the possible fourfold reduction excluding the redundant outer squares.

BitScan & PopCount

The memory bacchanal is attended by population count, bitscan forward and reverse with three 16-bit indexed, 64K lookup tables of double word integers, which is another 3/4 MiB [6].
int bits_in_16bits[65536];
int first_bit_in_16bits[65536];
int last_bit_in_16bits[65536];
/* This function returns the number of the first set bit in an int64.
   The search is done from LSB to MSB. */
int get_first_bitpos(int64 n) {
  if (first_bit_in_16bits[n & 0xffff] >= 0)
    return first_bit_in_16bits[n & 0xffff];
  if (first_bit_in_16bits[(n >> 16) & 0xffff] >= 0)
    return first_bit_in_16bits[(n >> 16) & 0xffff] + 16;
  if (first_bit_in_16bits[(n >> 32) & 0xffff] >= 0)
    return first_bit_in_16bits[(n >> 32) & 0xffff] + 32;
  if (first_bit_in_16bits[(n >> 48) & 0xffff] >= 0)
    return first_bit_in_16bits[(n >> 48) & 0xffff] + 48;
  return -1;


The search is PVS alpha-beta with transposition and refutation table inside an iterative deepening framework with aspiration windows, further using AEL-pruning à la Heinz, as well as LMR and IID in case of a missing hash move at PV-nodes. Checks, pawn moves to the 7th rank, and mate threatening moves are extended, killer- and history heuristic help to order moves, and a SEE swap routine is used to determine winning captures.


Amundsen's evaluation with a pawn structure cache features piece-square tables, and further considers mobility, passed pawns and hidden passed pawns, king safety through king piece tropism, and various features and defects such as outposts, rook on open file, seventh rank and behind passers, and bad bishop to name a few, and knows to trade pieces when ahead, but pawns when behind.

See also


  • John Bergbom (2004). Schackprogrammet Amundsen. (2D1464 Större avancerad individuell kurs i datalogi) pdf (Swedish) [7]

Forum Posts

External Links

Chess Engine



  1. ^ Master of Science - Nada, KTH
  2. ^ Amundsen chess program
  3. ^ A new chess program by Dann Corbit, Winboard Forum, May 22, 2004
  4. ^ Fram Museum - Polar Expeditions
  5. ^ Captain Roald Amundsen at wheel leaving Nome for North Pole, 1920, Source:Roald Amundsen from Wikipedia, Library of Congress | digital ID cph 3c21515, Lomen Bros
  6. ^ amundsen-0.80.tar.gz, bitboards.c
  7. ^ Amundsen chess program (old page)

What links here?

Up one level