Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: One mate to solve.

Author: leonid

Date: 06:25:43 07/21/02

Go up one level in this thread



>>In my program moves generator look for entry squares (legal moves) only after
>>the list of pieces. Pieces list is dressed before asking moves generator to find
>>legal moves. Only moves for king is found the last one. King is put in the list
>>of pieces as last before moves generator.
>
>I do not understand exactly what you say but if the king is in check
>I have a different function and I do not look at every piece in my piece list to
>generate it's moves.


Probably You generate moves for each piece and look immideately if those moves
are enough for given ply. I do this only in one spcialized ply.

Before searching best move for given ply all moves for all pieces, for given
color, are found. Later list of found pieces goes into move generator that look
each piece in its list and generate all legal moves for it. When all legal moves
are found they are aligned in special



>>>>In mine limitation is indicated as maximum 10 bishops and 10 knights but this is
>>>>only for the sake of limiting initial position for program. Program by itself
>>>>don't care abnout number of pieces. It have only strict limitation in number of
>>>>moves since space for each chain of moves is limited. This number if never
>>>>beyond 200. Reason for this is limited space in my DOS program.
>>>
>>>I have limits for the number of bishops not only
>>>for the initial position and if the number of bishops becomes
>>>bigger than the maximal number during the search the program may crush.
>>>
>>>When the program generates moves it usually starts with the pawn moves,later
>>>continues with the knights moves,the bishop moves,...
>>>
>>>In order to generate the pawns moves it looks at the pawns array to see the
>>>square of the next pawn.
>>>
>>>The pawns array is defined as
>>>int pawns[8][2];
>>>
>>>I also had int bishops[9][2]; but I corrected it to int bishops[10][2];
>>>
>>>I could use bishops[64][2] and not have problems but I did not want to waste
>>>memory that i do not need.
>>
>>I understand only Assembler. I forget everything that I knew in C and Pascal.
>>Will be good thing for me to refresh my memory. Still I expect that if I will
>>have time to write my program for the next 64 bits chips, I will do it in
>>Assembler. I like it too much to give up.
>>
>>How much time it took for You to write initial version and for what platform?
>
>It took me some months to write the move generator and I decided to develop it
>to a chess program only when it was fast enough.
>
>>What kind of C do You use the most?
>
>I used simple C.
>I have microsoft visual C++
>
>Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.