Convert from formulas to tables in passed pawns

Allows an easier tuning of this very important
part of evaluation. Also make it easier to
further expand the logic without messing up
the code.

I think that this patch, that was really no trivial to
implement (it took me many attempts to get it right) paves
the way to further functional changes both by SPSA tuning
and by better logic or even try some simplification (that
would be very good!): now it is much easier to work in this
part of code and I think developers will be glad, so
please apply.

No functional change.
In my opinion yes, but I understand is subjective.

What is different now is that AllSafe, BlockSafe, AllDefended,
BlockDefended are Scores not integers, so they can take in account both
midgame and endgame, not only endgame as is now. So after tuning, this is
potentially stronger than before (but I agree tuning is needed).

On Mon, Dec 29, 2014 at 2:28 AM, lucasart <notifications@github.com> wrote:

> In src/evaluate.cpp
> <https://github.com/official-stockfish/Stockfish/pull/174#discussion-diff-22301553>
> :
>
> > -
> > -                // If the path to queen is fully defended, assign a big bonus.
> > -                // Otherwise assign a smaller bonus if the block square is defended.
> > -                if (defendedSquares == squaresToQueen)
> > -                    k += 6;
> > -
> > -                else if (defendedSquares & blockSq)
> > -                    k += 4;
> > -
> > -                mbonus += k * rr, ebonus += k * rr;
> > +                // If the path to queen is fully defended, add a big bonus.
> > +                // Otherwise add a smaller bonus if the block square is defended.
> > +                score += k * ( (! unsafe                   ? AllSafe       :
> > +                                !(unsafe & blockSq)        ? BlockSafe     : SCORE_ZERO)
> > +                             + (defended == squaresToQueen ? AllDefended   :
> > +                                defended & blockSq         ? BlockDefended : SCORE_ZERO));
>
> Is that supposed to make the code easier to understand?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/official-stockfish/Stockfish/pull/174/files#r22301553>
> .
>