Subversion Repositories Games.Chess Giants

Rev

Rev 108 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 108 Rev 154
Line 61... Line 61...
61
 *  Set the counter-move for the move at the previous ply   *
61
 *  Set the counter-move for the move at the previous ply   *
62
 *  to be this move that caused the fail-high.              *
62
 *  to be this move that caused the fail-high.              *
63
 *                                                          *
63
 *                                                          *
64
 ************************************************************
64
 ************************************************************
65
 */
65
 */
66
    if (counter_move[tree->curmv[ply - 1] & 4095].move1 != move) {
66
    if (tree->counter_move[tree->curmv[ply - 1] & 4095].move1 != move) {
67
      counter_move[tree->curmv[ply - 1] & 4095].move2 =
67
      tree->counter_move[tree->curmv[ply - 1] & 4095].move2 =
68
          counter_move[tree->curmv[ply - 1] & 4095].move1;
68
          tree->counter_move[tree->curmv[ply - 1] & 4095].move1;
69
      counter_move[tree->curmv[ply - 1] & 4095].move1 = move;
69
      tree->counter_move[tree->curmv[ply - 1] & 4095].move1 = move;
70
    }
70
    }
71
/*
71
/*
72
 ************************************************************
72
 ************************************************************
73
 *                                                          *
73
 *                                                          *
74
 *  Set the move-pair for the move two plies back so that   *
74
 *  Set the move-pair for the move two plies back so that   *
Line 76... Line 76...
76
 *  move to continue the "plan".                            *
76
 *  move to continue the "plan".                            *
77
 *                                                          *
77
 *                                                          *
78
 ************************************************************
78
 ************************************************************
79
 */
79
 */
80
    if (ply > 2) {
80
    if (ply > 2) {
81
      if (move_pair[tree->curmv[ply - 2] & 4095].move1 != move) {
81
      if (tree->move_pair[tree->curmv[ply - 2] & 4095].move1 != move) {
82
        move_pair[tree->curmv[ply - 2] & 4095].move2 =
82
        tree->move_pair[tree->curmv[ply - 2] & 4095].move2 =
83
            move_pair[tree->curmv[ply - 2] & 4095].move1;
83
            tree->move_pair[tree->curmv[ply - 2] & 4095].move1;
84
        move_pair[tree->curmv[ply - 2] & 4095].move1 = move;
84
        tree->move_pair[tree->curmv[ply - 2] & 4095].move1 = move;
85
      }
85
      }
86
    }
86
    }
87
/*
87
/*
88
 ************************************************************
88
 ************************************************************
89
 *                                                          *
89
 *                                                          *
90
 *  Adjust the history counter for the move that caused the *
90
 *  Adjust the history counter for the move that caused the *
91
 *  fail-high, limiting the max value to +2^20.             *
91
 *  fail-high, limiting the max value to 2048.              *
92
 *                                                          *
92
 *                                                          *
93
 ************************************************************
93
 ************************************************************
94
 */
94
 */
95
    if (depth > 5) {
95
    if (depth > 5) {
96
      mindex = HistoryIndex(side, move);
96
      mindex = HistoryIndex(side, move);
Line 98... Line 98...
98
/*
98
/*
99
 ************************************************************
99
 ************************************************************
100
 *                                                          *
100
 *                                                          *
101
 *  Adjust the history counters for the moves that were     *
101
 *  Adjust the history counters for the moves that were     *
102
 *  searched but did not cause a fail-high, limiting the    *
102
 *  searched but did not cause a fail-high, limiting the    *
103
 *  min value to -2^20.                                     *
103
 *  min value to 0.                                         *
104
 *                                                          *
104
 *                                                          *
105
 ************************************************************
105
 ************************************************************
106
 */
106
 */
107
      for (i = 1; i <= searched[0]; i++) {
107
      for (i = 1; i <= searched[0]; i++) {
108
        index = HistoryIndex(side, searched[i]);
108
        index = HistoryIndex(side, searched[i]);