Retire KingDanger array

Rescales the king danger variables in evaluate_king() to
suppress the KingDanger[] array. This avoids the cost of
the memory accesses to the array and simplifies the non-linear
transformation used.

Full credits to "hxim" for the seminal idea and implementation,
see pull request #786.
https://github.com/official-stockfish/Stockfish/pull/786

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 9649 W: 1829 L: 1689 D: 6131

Passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 53494 W: 7254 L: 7178 D: 39062

Bench: 6116200
This commit is contained in:
Stéphane Nicolet
2016-09-07 23:37:06 +02:00
committed by Marco Costalba
parent 5c58d1f5cb
commit 01f2466f6e
4 changed files with 25 additions and 50 deletions

View File

@@ -21,7 +21,6 @@
#include <iostream>
#include "bitboard.h"
#include "evaluate.h"
#include "position.h"
#include "search.h"
#include "thread.h"
@@ -39,7 +38,6 @@ int main(int argc, char* argv[]) {
Position::init();
Bitbases::init();
Search::init();
Eval::init();
Pawns::init();
Threads.init();
Tablebases::init(Options["SyzygyPath"]);