home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / GNU Chess 3.0.2 / DOCUMENTATION / HEURISTICS < prev    next >
Encoding:
Text File  |  1992-01-27  |  5.9 KB  |  111 lines  |  [TEXT/MSWD]

  1. y, modify and redistribute
  2. CHESS, but only under the conditions described in the
  3. CHESS General Public License.   A copy of this license is
  4. supposed to have been given to you along with CHESS so you
  5. can know your rights and responsibilities.  It should be in a
  6. file named COPYING.  Among other things, the copyright notice
  7. and this notice must be preserved on all copies.  */
  8.  
  9.  -- requested by main author
  10. Heuristic descriptions for CHESS.
  11.  
  12. Revision: 12-16-87
  13.  
  14. Copyright (c) 1987 by John Stanback
  15.  
  16.   Here is a brief description of the heuristics used in the positional 
  17.   evaluator of the GNU Chess program. Many heuristics are functions of the 
  18.   stage of the game which is based on the total non-pawn material remaining 
  19.   for both sides. 
  20.     
  21.  
  22. PAWNS
  23.     The material value of a pawn is 100 points. Isolated pawns get a 
  24.     penalty depending on which file they occupy: 
  25.        (12,14,16,20,20,16,14,12) for files (a..h).
  26.     Doubled pawns (which are not also isolated) get a penalty of 12 
  27.     points. Backward pawns (defined simply as not being defended by a 
  28.     pawn with the square in front also not defended by a a pawn) are 
  29.     penalized 6 points. A 4 point penalty is also invoked for each attack 
  30.     by the opponent to a backward pawn and for a backward pawn on a 
  31.     half-open file. Pawn Advancement in the centre is given a bonus of 
  32.     about 4 points per rank in the opening increasing to about 8 points 
  33.     per rank in the ending. Advancement on the edges is given a lower 
  34.     bonus. Pawns on the e and d files and on the 2nd rank are given a 10 
  35.     point penalty. An additional penalty of 15 points is invoked if these 
  36.     pawns are also blocked. Pawns within 2 squares of the king are given 
  37.     a 10 point bonus. Passed pawns are given a bonus for increasing rank 
  38.     which is a function of stage of the game and of whether the opponent 
  39.     blocks or attacks one or more squares in front of the pawn or if the 
  40.     opponents king is in the square of the pawn. This bonus ranges from 
  41.     about 15 points for a pawn on the second rank up to about 300 points 
  42.     for a passed pawn on the 7th rank which can't be stopped from 
  43.     queening. 
  44.               
  45.  
  46. KNIGHTS
  47.     The material value of a knight is 330 points. The main heuristic for 
  48.     knights is a bonus for proximity to the centre. This varies from 0 
  49.     points in the corners to 30 points in the centre. Knights are also 
  50.     given a bonus for being within 2 squares of each enemy piece. This 
  51.     bonus is a function of the stage of the game, equalling 4 points in 
  52.     the end game. A penalty of 1 point per square is given for distance 
  53.     from either king. A bonus of up to 8 points (depends on stage) is 
  54.     given for knights which can't be driven away by enemy pawns. 
  55.  
  56.  
  57. BISHOPS
  58.     The material value of a bishop is 330 points. Bishops are given a 
  59.     bonus as material falls off the board equalling 10 points in the end 
  60.     game. Bishops get a bonus for mobility and Xray mobility thru pieces 
  61.     but not pawns. This bonus ranges from -4 points for a totally blocked 
  62.     bishop up to 18 points for a bishop attacking 12 or more squares. 
  63.     Xray attacks on an enemy R,Q,K or any undefended piece are given an 8 
  64.     point bonus. Bishops are given a bonus of 14 points if they lie on 
  65.     the edge of the board up to 22 points if the lie in the centre. A 
  66.     bishop is given a bonus of up to 5 points for each attack to a square 
  67.     adjacent to the enemy king. 
  68.  
  69.  
  70. ROOKS
  71.     The material value of a rook is 520 points. Rook mobility is handled 
  72.     similiarly to bishops with a bonus of 0 points if blocked up to 20 
  73.     points if attacking 12 squares or more. A bonus of 8 points for Xray 
  74.     attacks is handled as it is for bishops. Rooks are given a bonus of 
  75.     10 points for occupying a file with no friendly pawns and a bonus of 
  76.     4 points if no enemy pawns lie on that file. After the opening Rooks 
  77.     are penalized slightly depending on "taxicab" distance to the enemy 
  78.     king. 
  79.   
  80.  
  81. QUEENS
  82.     The material value of a queen is 980 points. The only heuristic for a 
  83.     queen is that after the opening it is penalized slightly for 
  84.     "taxicab" distance to the enemy king. 
  85.  
  86.  
  87. KINGS
  88.     Kings are given a penalty for proximity to the centre in the opening 
  89.     and a bonus for proximity to the centre in the endgame. The penalty 
  90.     is about 24 points for being in the centre in the opening with a 
  91.     bonus of about 36 points for being in the centre in the endgame. 
  92.     Kings are penalized for lying on an open or half-open file or if the 
  93.     adjacent file closest to the corner is open or half-open. This 
  94.     penalty is up to 23 points in the opening and goes to zero in the end 
  95.     game. The King is penalized up to 8 points if there are no pawns 
  96.     immediately adjacent. A penalty is invoked depending on the number of 
  97.     "safe" checks available by the opponent. This penalty ranges from 6 
  98.     points for one such check to 50 points for 4 or more. Depending on 
  99.     game stage, Kings are given up to 10 points for castling and a 
  100.     penalty of up to 40 points for moving before castling. 
  101.   
  102.  
  103. SPECIAL
  104.     If more than one piece is "hung" (attacked and not defended or 
  105.     attacked by an enemy piece of lower value) an extra penalty of 10 
  106.     points is invoked for that side and the search may be extended one 
  107.     ply. Pinned or trapped pieces are treated similarly. A special mating 
  108.     routine is used if one side has only a king and the other has mating 
  109.     material. 
  110.  
  111.