Author: leonid
Date: 14:15:13 02/08/00
Go up one level in this thread
On February 08, 2000 at 12:36:33, KarinsDad wrote: >On February 08, 2000 at 07:11:10, leonid wrote: > >[snip] >> >>All your way to put the logic going is so different that I must one day look >>into it. In this moment I am not in programming. In my logic I do not >>differenciate the capture against "empty moves". This is done only after the >>generation of all the moves for given position. Exception is only one ply where >>I have special move generator that find only "capture". > > >Yes, I do not differentiate either. > > >> >>Probably you use some efficent way where you can generate one move at once and >>immidiately try it. > > >No, I do not do this yet. But it sounds like a good idea. I actually do >something worse than most everyone else. Instead of generating all moves and >then checking for illegality at the point in time that the move is checked (and >hence, if you get a cutoff, you have not checked for illegality on a bunch of >moves that were not even used), I prevent the creation of illegal moves in move >generation. Very interesting what you are saying but I am almost sure that a lot of things I understand in a wrong way. For instance your passage: ...if you get a cutoff, you have not checked for illegality on a bunch of moves... Maybe you want say that when you found a "cutoff" many moves will be useless to check for legality. Anyway, from my side, only in some plies checking for legality of the king's moves goes at the end of the ply logic. In the logic, at the beginning, only legal moves beside the king moves are generated and alined. The most promissing goes first. Only if in those moves "cutoff" was never reached, king's moves are generated and revisioned. This help in cutting in checking the king's moves that are very expensive in "legality check". >I do this in a sophisticated manner. I back away from the king in all directions >(using the bitboards) until I come to the next piece. If it of the same color, I I have strange impression that we are here more indentical that I thought at the beginning. Only you use bitboards that I never use. It could be that you are, in your own way, is explaining how you recollect data for checking the legality of all the moves (that are not the king's moves) before even generating them. And this is exactly what I do. >then continue on the same row, column, or diagonal until I come to the next >piece. If it is of a different color and is a rook or queen (for rows and >columns) or a bishop or queen (for diagonals), I then eliminate certain types of >moves for the piece that was pinned. For example, a pinned bishop on a diagonal >can still move towards and away from the king, but not into the other >directions. Here I am a little bit lost but probably it is nothing but new wording that make me wonder. You look in all directions (after my understanding) like rook goes, like bishop and knight. You see, probably, in the same time what of your pieces that serve now as "human shield" could put in danger the king if they will change their place. In few words it is exactly how my logic works. >I do this before generating any moves, hence, each piece has directions of moves >which are allowed. All directions are allowed for non-pinned pieces, but only >certain directions are allowed for pinned pieces. > >Note: the problem with this approach is that you have to do special things for >EP moves. Here I am lost. What is EP move? I wait until all moves are generated and then see if any were EP. If >so, then I go through special code to see if the EP taking pawn is pinned or the >combination of the EP taking and the EP taken pawns are pinned (i.e. you could >have a horizontal pin of both pawns where both pawns would be removed from the >row if the EP was allowed, but that would expose a king to check). > >And what is worse than this, I sort the moves before returning them. Actually, I miss completely this sentence: "I sort the moves before returning them." In general have now impression that we are probably very close. It could be that this impression is wrong. Problem is in my capabilty to recognize general picture from few details that you provide. Leonid. I >sort them as each is generated and the sort is quick, but I'm sure this makes >some of the programmers shudder. > > > I never could see how to do this beside one ply. I am forced >>to find all the moves for the ply in order to aline that later in best way >>possible. After all, general data needed to recognize the legality of each move >>is found in advance for entire ply. From where is the strange result - less >>efficent is my logic (forced to see more moves for each ply) better the nodes >>per second rate it provide. >> >>Leonid. > >KarinsDad :)
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.