Commits on Sep 28, 2014
  1. Move ONE_PLY to be 1 instead of 2: final patch!

    Convert search() to recurse on a depth divided by 2
    No functional change.
    committed Sep 28, 2014
  2. Move ONE_PLY to be 1 instead of 2: qsearch(), MovePicker and TT

    No functional change.
    committed Sep 28, 2014
  3. Move ONE_PLY to be 1 instead of 2: reduction()

    No functional change.
    committed Sep 28, 2014
  4. Move ONE_PLY to be 1 instead of 2: split()

    Update minimumSplitDepth and split()
    No functional change.
    committed Sep 28, 2014
  5. Move ONE_PLY to be 1 instead of 2: search()

    This is the first patch of a very invasive and
    difficult series to remove the concept of half-ply
    from the engine.
    This is an important simplification but should be done in
    steps becuase it is easy to brake many things.
    - Fixed Perft
    - Fixed margins and reductions
    - Fixed ext
    - Fixed update_stats
    - Fixed move loop
    - Fixed IID
    - Fixed null search
    - Fixed razor margin
    No functional change.
    committed Sep 28, 2014
Commits on Sep 27, 2014
  1. Remove use of half-ply reductions from LMR, Null-move, IID and

    Singular extensions.
    ELO: 3.80 +-3.1 (95%) LOS: 99.2%
    Total: 19727 W: 4190 L: 3974 D: 11563
    LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
    Total: 7647 W: 1356 L: 1214 D: 5077
    Bench: 6545733
    Resolves #55
    uriblass committed with glinscott Sep 27, 2014
Commits on Sep 25, 2014
  1. Cap evaluation based null move extra reduction to three plies

    It's a zero elo patch, and a reasonable safeguard against uncontrolled extreme reductions.
    ELO: -0.08 +-2.0 (95%) LOS: 46.9%
    Total: 40000 W: 6728 L: 6737 D: 26535
    ELO: -0.14 +-1.8 (95%) LOS: 44.0%
    Total: 40000 W: 5557 L: 5573 D: 28870
    Bench: 7201830
    zamar committed Sep 25, 2014
  2. Change history reduction in LMR to be a full ply.

    LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
    Total: 9829 W: 2142 L: 1998 D: 5689
    LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
    Total: 27162 W: 4802 L: 4692 D: 17668
    Bench: 7284120
    Resolves #53
    uriblass committed with glinscott Sep 25, 2014
Commits on Sep 21, 2014
  1. Evaluate king safety when no queen is present.

    LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
    Total: 16657 W: 3547 L: 3391 D: 9719
    LLR: 2.95 (-2.94,2.94) [0.00,6.00]
    Total: 31258 W: 5664 L: 5403 D: 20191
    Bench: 8331165
    Resolves #51
    uriblass committed with glinscott Sep 21, 2014
  2. Fix spacing.

    No functional change.
    glinscott committed Sep 21, 2014
  3. Rearrange evaluation constants definitions

    Make them more uniform and consistent.
    No functional change.
    committed with lucasart Sep 20, 2014
  4. Rename time variable to reflect UCI parameters

    On top of previous patch, rename time variables to
    reflect the simplification of UCI parameters.
    It is more correct to use as varibales directly the
    corresponding UCI option, without intorducing redundant
    intermediate variables.
    This allows also to simplify the code.
    No functional change.
    committed with lucasart Sep 18, 2014
Commits on Sep 19, 2014
  1. King-pawn threat bonus for endgames.

    LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
    Total: 10224 W: 1765 L: 1638 D: 6821
    LLR: 2.96 (-2.94,2.94) [0.00,6.00]
    Total: 6923 W: 1027 L: 899 D: 4997
    bench 7818100
    Resolves #49
    mbootsector committed with glinscott Sep 19, 2014
Commits on Sep 16, 2014
  1. Rename "Contempt Factor" to "Contempt"

    Suggested by Ronald and Lucas on talkchess.
    No functional change.
    committed with zamar Sep 8, 2014
  2. Retire struct Log

    No more used now that we have removed
    "Write Search Log" UCI option.
    No functional change.
    committed with zamar Sep 14, 2014
Commits on Sep 15, 2014
  1. Simplify Time Management UCI options

    No functional change
    lucasart committed with zamar Sep 15, 2014
Commits on Sep 4, 2014
  1. Small tweak to idle_loop()

    In case of a succesful late join we set again
    'searching' flag, so we can restart search
    immediately without an useless lock/unlock
    No functional change.
    committed with zamar Aug 29, 2014
Commits on Aug 30, 2014
  1. Simplify idle_loop()

    No functional change
    zamar committed Aug 30, 2014
Commits on Aug 24, 2014
  1. Retire Search Log

    No functional change
    Bench: 7461881
    lucasart committed with zamar Aug 24, 2014
Commits on Aug 9, 2014
  1. Fix perft 1

    Compute correct number of moves for this corner case.
    A smal bug crept in after recent perft rework.
    No functional change.
    committed with lucasart Aug 9, 2014
  2. Retire move_to_san()

    Now "Write Search Log" will pring moves in UCI format, consistent with all the rest. This functionality is
    not aimed at end-users anyway. It's hardly useful at all, in fact. Also, pretty-printing SAN moves is
    something that better belongs in the GUI than in the engine.
    No functional change.
    lucasart committed Aug 9, 2014
  3. Move to_char() and to_string() to notation

    Where they better belong.
    Also, this removes '#include <string>' from types.h, which reduces the amount of code to compile (every
    translation unit includes types.h).
    No functional change.
    lucasart committed Aug 9, 2014
  4. Rework perft implementation

    Unify various perft functions and move all the code
    to search.cpp.
    Avoid perft implementation to be splitted between
    benchmark.cpp (where it has no reason to be) and
    No functional and no speed change (tested).
    committed with lucasart Aug 8, 2014
Commits on Aug 7, 2014
  1. Write perft(N-1) into cout

    So that one can redirect cout to /dev/null and only print print cerr in the terminal (for more accurate speed
    Suggested by Marco.
    No functional change.
    lucasart committed Aug 7, 2014
  2. Fix Hash in bench

    The compiler tries to cast Options["Hash"] into a string, using:
    Option::operator std::string() const {
      assert(type == "string");
      return currentValue;
    And, as expected, the assert() fails.
    std::to_string() would be the right solution, but it's C++11. And using a stringstream is too much code to
    achieve so little. Let's keep it the way it was: hardcoded (ie. default hash defined in two places).
    No functional change.
    lucasart committed Aug 7, 2014
Commits on Aug 6, 2014
  1. Remove insufficient material rule

    The eval already returns zero in KK, KBK, KNK (see material.cpp). The difference is:
    - we lose the "TB pruning" benefit of the draw rule (ie. search goes on even if eval is zero)
    - we gain some speed by removing a useless test from the hot path
    LLR: 0.05 (-2.94,2.94) [-3.00,1.00]
    Total: 128000 W: 21357 L: 21560 D: 85083
    LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
    Total: 33023 W: 4613 L: 4509 D: 23901
    bench 7461881
    joergoster committed with lucasart Aug 6, 2014
Commits on Aug 5, 2014
  1. Remove useless code in Position::pretty()

    First, remove some dead code (function never called with a Move argument).
    Then, remove printing of legal moves, which does not belong here. Let's keep commands orthogonal and minimal:
    - the "d" command should display the board, nothing more, or less.
    - "perft 1" will display the list of legal moves.
    No functional change.
    lucasart committed Aug 5, 2014
  2. Reduce minimum memory requirement by 16MB

    Stockfish allocates the default hash (32MB) in main(), before entering UCI::loop(). If there is not enough
    memory, the program will crash even before UCI::loop() is entered and the GUI is given a change to specify a
    lower Hash value.
    This defective design could be resolved by doing a lazy allocation upon "isready" command, as the UCI protocol
    guarantees that "isready" will be sent at least once before any search. But it's a bit cumbersome when using
    Stockfish "manually" to have to remember to type "isready" everytime.
    So leave the current design, but reduce the default hash to 16MB instread of 32MB. In order to perform such
    quick searches (depth=13), there is no reason to use so much Hash anyway. Another benefit is to introduce a
    bit of hash pressure in bench, which increases chances to detect rare bugs related to TT replacement, for
    This is not a functional change, although it obviously changes the bench.
    bench 7461879
    lucasart committed Aug 5, 2014
  3. Default Hash defined in a single place

    Instead of defining it both in ucioption.cpp and benchmark.cpp. Obviously changing the default Hash will
    change the bench as a result.
    No functional change.
    lucasart committed Aug 5, 2014
Commits on Aug 4, 2014
  1. Retire divide command

    The main purpose of perft is to help debugging. But without the breakdown in sum of perft(N-1), it is a
    completely useless debugging tool.
    So perft now displays the breakdown, and divide is therefore removed.
    No functional change.
    lucasart committed Aug 4, 2014
Commits on Aug 2, 2014
  1. Ensure printing UCI info in multi-pv case

    After commit 94b1bbb, in case available root moves are less than multiPV, we
    could never reach condition:
    PVIdx + 1 == multiPV
    and as a consequence UCI output is not printed.
    Fixed suggested by Joerg Oster.
    No functional change.
    committed with lucasart Aug 2, 2014
Commits on Aug 1, 2014
  1. Correct bench timing

    No functional change.
    oskmeister committed with lucasart Aug 1, 2014
Commits on Jul 29, 2014
  1. Document Threat[] indices

    From Marco's repo.
    No functional change.
    lucasart committed Jul 28, 2014
Commits on Jul 28, 2014
  1. Fix a warning with MSVC 2010

    Warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
    No functional change.
    committed with lucasart Jul 26, 2014
  2. Small code style reformatting

    No functional change.
    zardav committed with lucasart Jul 27, 2014