0.	Purpose of options

The default options are chosen to improve the engine's EFFICIENCY in games.

If you wish CORRECT results,
1. set "blur" to zero!!!
2. turn nullmove off! (this may not be necessary, if you can judge that no side is threatened by Zugzwang)
3. turn the "remember" option off.
(there is still no guarantee of correctness because I have doubts about the accuracy of draw score handling;
 please let me know if you have a position for which Feuerstein gives incorrect results
 with "nullmove=false", "blur=0" and "remember=false")

Feuerstein extends a lot by default because being positionally dumb it hopes for tactical combinations;
however, it may worthwile to
1. reduce "extend forced" to "on" (little speedup, hardly any drawbacks)
2. turn "extend gambit" off (moderate speedup, unless the best lines have many gambits/recaptures)
3. turn "QExt" off (some speedup, misses some mate threats)
4. turn "extend check" off (moderate speedup, but tactically much weaker)
(5. turn "extend forced" off: little speedup, but noticeable drawbacks)
because turning several extensions off usually yields SPEED improvements.


Options:

A. "2nd":		Evaluate the second best move

- "off":
The second best move is never evaluated.
Therefore, the engine takes as much time for forced moves as for the rest.

- "on":
The second best move is evaluated except when checkmate has been found.
Forced moves (where only one move avoids being checkmated) are played
  almost instantly (the minimum search depth is 4).

- "full":
The second best move is always evaluated.
After each move, the search results for this move is displayed.
Among moves with the same evaluation, the engine chooses one of "least impact",
  e.g. the minimal promotion among the best moves.


Recommendation:
Use "off" for analysis, when there is no interest in the 2nd best move (e.g. test suites).
Use "on" for games, if you favour speed once a checkmate has been found.
Use "full" for games/analysis, if you want to know whether a solution is singular.


B. Extensions

- not optional: checks in quiescence search
In order to find checkmates in search depth one, checks in Q-search are always enabled.
As there is no pruning, "mate in n moves" is discovered at search depth 2n-1 or earlier.
(Therefore, such a move is certain to be best possible at search depth 2n-3,
 and the computation stops here unless "2nd" is set to full.)


B.1 "extend check"
Extends all moves that check the opponent.

>  Rather expensive, but improves strength in tactical test suites and helps detecting forced repetition draws.


B.2 "extend force" ("full" new in 0.4.5 beta 2)
"off":	  off
"on" :    extends a move, if it is the only legal one
"full":   extends a move, if all others are known to lead to lost positions
Example: fen "5n2/B3K3/2p3p1/4k3/7P/3bN1P1/2PrnNP1/1q6 w - - 0 1" from ChestUCI.epd
"full":	 fen "7k/4pBp1/1p2r1pq/R2p1p2/R1p3n1/1r3bP1/p4P2/Q5K1 w - - 0 1" from ChestUCI.epd

>  "on" is rather cheap (branching factor 1), so it is stronger than "off"
>  Leads to search of long combinations in combination with "extend check"

> "full" behaves very similar to "on", except in very tactical positions


B.3 "extend gambit" (new in 0.4.5 beta 1)
Extends a move, if it occurs in a main variant and it accepts a sacrifice

The last two conditions are introduced to discover traps (an extension similar to pruning).

Examples: "2r1b1k1/R4pp1/4pb1p/1pBr4/1Pq2P2/3N4/2PQ2PP/5RK1 b - - 0 1" from Ecm.epd
          "4r1k1/p1qr1p2/2pb1Bp1/1p5p/3P1n1R/1B3P2/PP3PK1/2Q4R w - - 0 1" from Wac.epd, "extend check" disabled

>  Expensive, but slight improvement in tactical test suites, and slightly more surprising style.

B.3 "QExt"
Continues to extend moves in quiescence search



C. Asymptotic tweaks

C.1 "nullmove"
Since 0.4.5 beta 2, Feuerstein applies the conventional technique "nullmove pruning".

WARNING: Once nullmove is applied, solutions of mate problems are not always correct.
         Most problems arise in typical "zugzwang" positions; if both players have sufficient mobility,
         the option has hardly any drawback.


C.2 "blur"
Since 0.4.5.2, Feuerstein uses a VERY CRUDE implementation of a reduction similar to
what Tord Romstad introduces as "LMR (late move reduction)":

The general principle of Feuerstein's implementation is to reduce the search depth for ALL moves,
as long as we know that at least one of them prevents being checkmated within in the current search depth.

Exceptions are:
- we never reduce moves which are likely to become best moves according to hash table information
- we never reduce captures or pawn moves
- we don't reduce in expected continuations of principal moves unless blur>1
- we don't reduce extended moves unless blur>2

WARNING: The chance of tactical mistakes increases when the blur value is raised.
         If you want to be reasonably sure of an analysis, set "blur = 0".
         

However, the maximum blur value is chosen as the default because
- the engine becomes more competitive against engines who use similar techniques, especially in fast games;
- future versions of Feuerstein might profit from the analysis of blunders.


C.3 "IID"
Since 0.4.5, Feuerstein also uses internal iterative deepening; if this option is enabled,
a reduced depth search is performed, if the information on the search in the previous depth is lost.
This introduces additional search costs, but because it "smoothes" some problems with extensions
and reduces hash usage, it seems to give a slight asymptotic speedup in tactical positions.



D. Permanent memory
If the option "remember" is enabled, the hash table is not cleared after each move.
Instead, only information on positions which cannot be reached from the current position are invalidated.

Disadvantages:
- may cause incorrect evaluation (especially draw scores may be wrongly assigned because of history dependency)
- when time controls are long and hash size is small, search is slowed down
  because old results block the slots for new information

Advantages:
- old search results oft speed up search is in quiet positions and late endgames
- less evaluation changes allow faster moves in clear positions
for analysis:    In the backwards analysis of a game, the engine profits from knowing the outcome
for lightning:   The (very short) period of time for clearing the hash table is saved