Quote: Original post by beneficiiQuote: Original post by ArtichokerQuote: Original post by beneficii
I retain redundant information about the pieces and the board. I retain the physical board representation and lists of pieces. I go through the list, look at the pseudo-legal moves, check to see if they don't leave the king in check, and add them to a list, which I then sort according to various factors. I can get about 2 or 300,000 nodes per second with this, with the debugging information turned off. It's way slower without it. (This is for a chess variant which has a bigger board and more pieces and about twice the branching factor, though that's largely irrelevant to the speed per node, it seems.)
EDIT: About the debugging information, your compiler/GUI should have an option to turn off the debugging information when you compile. What do you use?
Thanks for the info, I will try some of those suggestions. Also, I am using C# on Microsoft Visual Studio 2010.
@Alvaro. Thanks for your response. I will look into hash tables and a quiescence search once I can at least get my engine to a decent speed. I am not copying boards or generating the entire tree or anything like that. Rather, I think my problem may be in inefficient move generation.
I'm using C++ on Microsoft Visual C++ 2010, which is notorious for having slow memory deallocation when programs compiled with it are run in debug mode. Really do try turning it off. Go to Solution in the Solution Explorer, go to Properties, go to Compiling Properties, and make sure the Solution is built as Release, not Debug, when you test the speed (and then make sure you test the EXE in the Release folder). If you're testing other aspects, you would probably just want to search to a shallow depth, like 3 ply, when you do the testing in debug mode.
Hmmm, this might have to do with the fact that I'm running the express edition, but there is no Compiling Properties section, and no files in my Release folder.