- // Evaluate the position statically
- ss[0].eval = !isCheck ? evaluate(pos, ei, 0) : VALUE_NONE;
+ // Step 1. Initialize node and poll (omitted at root, but I can see no good reason for this, FIXME)
+ // Step 2. Check for aborted search (omitted at root, because we do not initialize root node)
+ // Step 3. Mate distance pruning (omitted at root)
+ // Step 4. Transposition table lookup (omitted at root)
+
+ // Step 5. Evaluate the position statically
+ // At root we do this only to get reference value for child nodes
+ if (!isCheck)
+ ss[0].eval = evaluate(pos, ei, 0);
+ else
+ ss[0].eval = VALUE_NONE; // HACK because we do not initialize root node
+
+ // Step 6. Razoring (omitted at root)
+ // Step 7. Static null move pruning (omitted at root)
+ // Step 8. Null move search with verification search (omitted at root)
+ // Step 9. Internal iterative deepening (omitted at root)