Author: Stefano Gemma
Date: 22:42:52 08/24/00
Go up one level in this thread
On August 24, 2000 at 18:39:45, leonid wrote: >On August 24, 2000 at 15:54:57, Stefano Gemma wrote: [...] >>faster than Drago, not just because of the 32 bit. She reaches about 4/5 million >I tried to go to the address that you left but was not lucky. Will try now see >after the name of your program. Have you tried www.linformatica.com? You should find the sources in the chess page. >Are those moves all legal? If they are completely illegal but verified but each >next ply, it could slightly explain so high number of moves. They are all legal moves, but i don't check for those who leave the king in check. So alla the moves are right moves, they captures pieces of the other colors, never go outside the chessboard and so on. But, if the King is under check, the move generator will find this situation only in the next ply, when the colour that do check will "capture" the king. >Rightly or wrong, I think that the most time in the program is lost by >generation of legal moves. If your program generate 4/5 millions illegal moves >per second, this come close to what I probably see. I don't speak about >positions but moves at all. I can see in one of my special, simplified search >where generation of legal moves (not positions) goes between 900000 and 1300000 >moves per second. This values can be reached in C, maybe there are something wrong in your assembly implementation? >>moves generated per second. But this is not so amazing as it can seeems. This >>numbers can easly been reached if you use a small evaluation function. The >>resulting program is faster than any other one... but it play weaker. As i often >Still I can repeat myself, if you have high number of legal moves generation you >have almost everything. The rest will take only some time but nothing more. Good >usage of legal moves for evaluation could cut your speed at half, but hardly >more that this. If your numbers of positions/second (not moves per second) will >reach on your computer 400k, you are the best. If you call "position" what i call "node", i can easly reach more than 400.000 nodes (position) per second. The version without alfa-beta (only negamax) reaches that value... >>said: my programs generates millions of... bad moves per second ;-)))) > >Even bad moves but 12 millions in one second is good. But what is for you "bad >moves" For bad moves i think about legal moves that are not good moves. For sample, this is bad moves, but legals: 1. Na3, Nh6 [...] >My dream was to obtain with Assembler 5 times speed but it is likely be not the >case. Only if somebody else will do this, it will be nice to watch. It could be >that this idea is real but must be implemented more skillfully. I've done ~3x in 16 bit... ~5x in 32 bit... i'm doing ~8x in the new version... you can do 20x, if you just want to do it ;-) All it needs is time... >>The counting includes all legal moves (captures and not captures) plus those who >>leave the King in chess (discovered in the next ply, obviously). >The last sentence is not clear for me. If in your move generator all the legal >moves found in advance for each ply, including the moves for king? I am asking Including the moves of King, obviously. >this because checking the legality of king's moves could be expensive but still >not that much. It will slow evaluation, when done without king's legality, only >in some 15 %. The king's moves are legal or illegal as any other move. You can put King in check by moving it, you can leave him in check without to moving it but you can put the king in check by moving another piece. I generate and cound even those moves, then i execute the best move that i have found, i pass the control to the other color, i generate the moves for the other color and find that it capture the king. This cause a cut of the tree, i come back to thew previous level and i unmake the wrong move, then i try another one. If all the moves leave or put the king in check, i come back to the previous level again, carrying the right value for mate or stale, after verifying wich one occurs. [...] >>The evaluation take care just about of piece values and position. >Basically about everything. I'm not explained very well. For position i was meaning the value of the square reached from any piece. I don't compute pawn structure, king safety etc. [...] >Are you using "on line Assembler" inside of C++? No at all. It is more flexible to use .asm sources. You have more controls. >>The moves generation (in the new engine) is based on a simple chess-board >>rapresentation: 16x16 (equal to 12x12, but simpler to program). I don't use >Here I am lost. Will try to find this on your Web site later. I hope that the sources are readable. You have to buy a dictionary, because i have commented them in italian. [...] >I am Italian speaking but living for too long (to be that good in Italian like >before)in Canada. Have you never seen the G6 group? You can write to g_6@egroups.com to be added to the group. It is a chess programming group of italian programmers (G6 menas: Gruppo Scacchi E Informatica). Italian programmers will conquest the world ;-))))) [...] >I use very much macros but mainly procedures. Only for the sake of speed I have >special move generator for each color. Evaluation goes also after specific color >and even specific ply. I use special generation only for pawns and castling. >>MUOVI_RE macro scacco_mr, prima [...] >Your description is very different from mine. I can write here my general part >of move generator but I am sure it will be hardly understandable. In mine, I >start with finding all the pieces for given color on the board. > Special data is >found in advance before moves for those pieces are found. This data will be used >for checking the legality of all the moves and executing first move alignment. >Later list of pieces is seen one at a time. For each piece special procedure is >called and it find all legal moves. Found moves are added to the moves chain. >First sorting of the moves (aligning the moves in special order) is done >generally in move generator. I don't sort moves, i simply search for the best one when i need to execute a move. This seems to be faster than sorting. I was calling this "no-sort", but someone else call it otherwise. [...] >>lenght. I'm working to tear away one ore two of this 12 istructions. I optimize >>by hand for Pentium pipes, with the help of Quantasm PentOpt. I' even working on >This is something that I never even started to do. Very useful! It is more simplest that anyone could think. There are some rule for pairing istruction. The simplest one is this: mov eax,a add eax,b mov ebx,c add ebx,d mov ecx,e add ecx,f is slower than the equivalent: mov eax,a mov ebx,c mov ecx,e add eax,b add ebx,d add ecx,f >>a genethical version, but is not more than a joke, for now (is the version with >>the C++ engine of "just" 2 million moves per second). >Good number for me. I have less that this on 100% Assembler. Only now my code is >16 bits. But this is tiny excuse. yes, it is a tiny excuse... ;-)))))))))) Ciao!!!
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.