Hello C World,
I am a beginner to programming and to the C language, so please forgive me if I am not as knowledgable as I should be. As a side project during my first year of programming I've been working on a chess playing program, with a built in AI (as of now it only plays the black pieces). I want it to be strong enough to beat a couple of chess-playing friends of mine(around 1800 strength), or barring that, a low-strength piece of commercial software like Chess-Titans.
However a problem I have been running into is that no matter what I try to do to prune the search tree, the search times seem to be unusually slow. As of now, with alpha-beta pruning, and some sorting functions, it can search at a depth of 5 ply at an average of about 1-2 min. per move. I know that in order to be decent, a program should be able to search at least 7-8 ply.
I know there are more pruning functions that I could add to prune the tree more aggressively. But I can't shake the feeling that that isn't the problem. My friend (non-programmer) suggested that maybe the program isnt' drawing enough resources from the computer. I am sure the basic functions of the code (i.e. the function which checks legality of moves, the piece functions etc.) are poorly optimized, which maybe could cause the slow down. But I have tested with trying to improve the efficiency of the code and it hasn't changed the search times one bit.
Is there anyone with experience as a programmer/Chess-AI programmer who could provide their insight? If requested I could post my code, but be warned its excessively long and maybe a bit obscure..
*(I ran the program locally and looked at it in taskmanager. under memory it says its using 680K. Could that be relevant to the slow search times?)



1Likes
LinkBack URL
About LinkBacks



