Author: leonid
Date: 04:36:17 08/25/00
Go up one level in this thread
On August 25, 2000 at 01:42:52, Stefano Gemma wrote: >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. Reached your page! Great graphics! Liked very much way all was put on the screen. Changes of the levels and all basic fonctions. Alive picture that say you that program is in thinking process is also well done. I looked to your numbers. Today expect to go and to see Windows version. If I did not mistake while seeing DOS version, between your two big numbers, one on the right say total number of positions looked during the time when program was thinking about its last move. When I take this as the number of completely legal moves numbers (even king's moves are legal) then it really shine. This number goes neatly after the numbers that I see in one of mine searches. This one, in my program, create all the legal moves before making its search for each ply. Even your time is pretty close if I take your "level" as number of plies indicated for brute force search. If I did no mistake, this could confirm that finally all the program done in Assembler, never mind their way to thinking, must reach finally very close numbers as positions/second. My impression is that your program need nothing more but time to reach every possible level as best program. Initial speed is already there. >>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. Here we are different. In mine the legality of all the moves is verified, almost all the time, in move generator. But in one ply it is done in the way very similar to your. There all the moves are illegal and only later goes into verification. Move is verified only if it give enough value to end search for this ply, otherwise it is rejected without even any search. >>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? Could be. This is possible all the time. Many time I was able to find something very simple that changed completely my program. Funny thing is that after each change in my program I was able to find the explanation why my numbers (NPS) are "the same" like in other best programs. Now your program is likely to confirm my old fixed idea that NPS in the program is more related to the computer speed that to something else. Difference is never that dramatic and could be reached only in the distance of some 30%. Before I dreamed about 500% difference. >>>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... Yes, I speak about the same. For me each position is each node that you see by your program. >>>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... Will watch this. Actually I created my move generator some 6 years ago and almost never came back for the last 4 years. It could be that different way of implementing the move generator could produce much higher number of moves. Was curious to see that you started your program (looked one of your description in Italian) in July of 1993. This was the years when I started my program. >>>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. This way I tried but was not able to produce good result. Came back to my 100% legal moves generator. Exception existe, like I mentioned, for one ply. >[...] >>>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. Yes, but this could be done only lately and it will be better to do this lately. At least it is my thinking. After the estimation of one of the programmers (Tom Kerrigan) later this part of program will consume around 20% of the initial speed. It could be that in very advanced program it take even 40%, but I doubt that it will take more that this. Taking this in consideration you can even now see how promissing your program actually is. >[...] >>Are you using "on line Assembler" inside of C++? > >No at all. It is more flexible to use .asm sources. You have more controls. Maybe you do your program in some kind of modules. >>>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). I never found any Italian Chess Club so big and wide like here. I only have seen accasionally here and there some italian messages on few chess sites. And finally, I go very rarelly to talk. Only here I come from time to time to glance on the messages and that is all. I am just too busy. >Italian programmers will conquest the world ;-))))) Lei parla como "Italiano vero". >[...] >>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. It could be that I am lost in wording. I am trying to speak like everybody else since real names I don't know that much. When I said "sorting" I wanted to say that I align all moves in special chain of moves in order to make later search more efficent. This alignment I do for the first time in move generator and later already inside of each ply, before moves are regarded one by one. >[...] >>>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!!! 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.