alg1_search.h

Go to the documentation of this file.
00001 /***********************************************************************************
00002 * Filename      $RCSfile: alg1_search.h,v $
00003 * Current CVS       $Revision: 1.12 $
00004 * Checked-in by     $Author: yves $ 
00005 *
00006 * $Log: alg1_search.h,v $
00007 * Revision 1.12  2005/03/28 22:26:20  yves
00008 * Add typedef for position
00009 *
00010 * Revision 1.11  2004/12/24 01:25:33  yves
00011 * Opening book in binary mode implemented.
00012 * Version 0.2.6
00013 *
00014 * Revision 1.9  2004/12/18 15:34:15  yves
00015 * export printable move
00016 *
00017 * Revision 1.8  2004/12/18 10:48:23  yves
00018 * Move boardmapper and applymove to board source
00019 *
00020 * Revision 1.7  2004/12/18 02:31:04  yves
00021 * When double moves exist, make sure to write the correct move
00022 *
00023 * Revision 1.6  2004/12/17 17:36:42  yves
00024 * move to board
00025 *
00026 * Revision 1.5  2004/12/16 00:18:24  yves
00027 * Standard CVS command tags added
00028 * FEN notation inverted, now uppercase is white and lowercase is black
00029 *
00030 *
00031 ***********************************************************************************/
00032 
00033 #if !defined(__ALG1_SEARCH_H__)
00034 #define __ALG1_SEARCH_H__
00035 
00036 #include "belofte.h"
00037 #include "board.h"
00038 
00039 // --------------------------------------------------------------------
00040 
00041 #define MAX_DEPTH_EXTENTION 2
00042 #define NON_SILENT_EXTENTION 0.333
00043 #define CAPTURE_MOVE_EXTENTION 0.666
00044 #define SILENT_EXTENTION 1
00045 
00046 // set low for debugging
00047 #define ALLOWED_DEVIATION 0.001   
00048 #define LIST_LENGTH 9
00049 
00050 // --------------------------------------------------------------------
00051 
00052 #define CAPTURE_COLOUR_WHITE COLOUR_WHITE
00053 #define CAPTURE_COLOUR_BLACK COLOUR_BLACK
00054 
00055 #define TO_WHITE(x)     ((x))
00056 #define TO_BLACK(x)     ((x) + (LOWERCASEBIT))
00057 
00058 // --------------------------------------------------------------------
00059 
00060 void search_constructor(void);
00061 void search_init(void);
00062 int  search_root(t_depth iDepth, char *szMove, int iLenMove);
00063 int  search_apply_move(const char *szMove);
00064 void search_initboard(void);
00065 void search_printablemove(const int iSelectedMove, char *szMove);
00066 
00067 int fill_movelist(const t_colour nColour, const t_boolean bQuieuscience, const enum tFillMoves bFill);
00068 void normalize_movelist(void);
00069 
00070 unsigned int isUnderAttack(const posid iKingPos, const t_boolean bEvaluateForWhite);
00071 unsigned int isUnderMinorAttack(const posid iPiecePos, const t_piece cPiece, const t_boolean bEvaluateForWhite);
00072 t_boolean isInCheck(const t_boolean lEvaluateForWhite);
00073 
00074 // --------------------------------------------------------------------
00075 
00076 #endif
00077 
00078 

Generated on Tue Jan 31 00:14:05 2006 for BelofteDoc by  doxygen 1.4.6