![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: chess, program, testing |
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I have written a very small chess program in Visual Basic (using Excel as interface). It's only a couple of hundred lines of VB code. Don't start laughing now, this was only to get aquainted with the most important principles of chess programming (data structures, evaluation, tree search and move generation). This Excel program actually plays decent chess, using alpha-beta pruning and iterative deepening, that's it (no quiscence search, no hash tables, no opening books, a very simple evaluation function and vector representation of the chess board). It's rating is probably somewhere around 1000 or so (due to the computation speed and other VB limitations I can't go deeper than 5 plies without crashing :-( Now I want to start using Visual C++ (I'm new to C, C++, but not to programming), and my quesiotn is: as soon as this program starts playing chess I would like to test it against other human players, is there a possibility to do that, how? Another related question: any idea of the relation between rating and depth of search? In other words: if a program has strength X, how much will this improve by searching one ply deeper? Thanks (please post, I don't read my e-mail). |
| Ads |
|
#2
|
|||
|
|||
|
"pd42" wrote in message m... Hi, I have written a very small chess program in Visual Basic (using Excel as interface). It's only a couple of hundred lines of VB code. Don't start laughing now, this was only to get aquainted with the most important principles of chess programming (data structures, evaluation, tree search and move generation). This Excel program actually plays decent chess, using alpha-beta pruning and iterative deepening, that's it (no quiscence search, no hash tables, no opening books, a very simple evaluation function and vector representation of the chess board). It's rating is probably somewhere around 1000 or so (due to the computation speed and other VB limitations I can't go deeper than 5 plies without crashing :-( Now I want to start using Visual C++ (I'm new to C, C++, but not to Visual C++ is very good, but takes time to get used to it. When you know how it works, it is very good. programming), and my quesiotn is: as soon as this program starts playing chess I would like to test it against other human players, is there a possibility to do that, how? Another related question: any idea of the relation between rating and depth of search? In other words: if a program has strength X, how much will this improve by searching one ply deeper? Thanks (please post, I don't read my e-mail). |
|
#3
|
|||
|
|||
|
pd42 wrote:
Hi, I have written a very small chess program in Visual Basic (using Excel as interface). It's only a couple of hundred lines of VB code. Don't start laughing now, this was only to get aquainted with the most important principles of chess programming (data structures, evaluation, tree search and move generation). This Excel program actually plays decent chess, using alpha-beta pruning and iterative deepening, that's it (no quiscence search, no hash tables, no opening books, a very simple evaluation function and vector representation of the chess board). I could be wrong, but I don't believe iterative deepening actually works unless there is a transposition table to record results of previous iterations. Iterative deepening is meant to increase the likelihood of perfect move ordering for the search by filling the TTable with good moves. Unless you are recording results somehow, and the ttable is the most direct method, you are simply wasting time. It's rating is probably somewhere around 1000 or so (due to the computation speed and other VB limitations I can't go deeper than 5 plies without crashing :-( Yes, VB is not a very good language. Now I want to start using Visual C++ (I'm new to C, C++, but not to programming), and my quesiotn is: as soon as this program starts playing chess I would like to test it against other human players, is there a possibility to do that, how? First, make sure to follow the xboard protocol. Second use the Zippy(?) program to connect to FICS with a computer account. Then wait for the results. You might also have options with the UCI protocol, but I am not familiar with them. Another related question: any idea of the relation between rating and depth of search? In other words: if a program has strength X, how much will this improve by searching one ply deeper? So far, one ply of depth has surpassed any strength gained in knowledge. At least this was the result of one engine - Hitech(?). -- "I'm a war president. I make decisions here in the Oval Office in foreign policy matters with war on my mind." - Bush |
|
#4
|
|||
|
|||
|
"Noah Roberts" wrote in message
... Yes, VB is not a very good language. VB is a great language, just not good for programming chess engines. -- "Let thy speech be better than silence, or be silent." - Dionysius the Elder |
|
#5
|
|||
|
|||
|
SnowDog wrote:
"Noah Roberts" wrote in message ... Yes, VB is not a very good language. Let me fix this... VB is a great language, just not good for programming. There, your statement has been edited for factual content :P -- "I'm a war president. I make decisions here in the Oval Office in foreign policy matters with war on my mind." - Bush |
|
#6
|
|||
|
|||
|
Noah Roberts wrote in message ...
pd42 wrote: Hi, I have written a very small chess program in Visual Basic (using Excel as interface). It's only a couple of hundred lines of VB code. Don't start laughing now, this was only to get aquainted with the most important principles of chess programming (data structures, evaluation, tree search and move generation). This Excel program actually plays decent chess, using alpha-beta pruning and iterative deepening, that's it (no quiscence search, no hash tables, no opening books, a very simple evaluation function and vector representation of the chess board). I could be wrong, but I don't believe iterative deepening actually works unless there is a transposition table to record results of previous iterations. Iterative deepening is meant to increase the likelihood of perfect move ordering for the search by filling the TTable with good moves. Unless you are recording results somehow, and the ttable is the most direct method, you are simply wasting time. I am recording the best line (PV) from the previous iteration, that's it. No transposition table involved. There is some speed up, but I fully agree this can be improved with transposition tables.... It's rating is probably somewhere around 1000 or so (due to the computation speed and other VB limitations I can't go deeper than 5 plies without crashing :-( Yes, VB is not a very good language. Now I want to start using Visual C++ (I'm new to C, C++, but not to programming), and my quesiotn is: as soon as this program starts playing chess I would like to test it against other human players, is there a possibility to do that, how? First, make sure to follow the xboard protocol. Second use the Zippy(?) program to connect to FICS with a computer account. Then wait for the results. You might also have options with the UCI protocol, but I am not familiar with them. Another related question: any idea of the relation between rating and depth of search? In other words: if a program has strength X, how much will this improve by searching one ply deeper? So far, one ply of depth has surpassed any strength gained in knowledge. At least this was the result of one engine - Hitech(?). |
|
#7
|
|||
|
|||
|
Noah Roberts wrote in message ...
pd42 wrote: Hi, I have written a very small chess program in Visual Basic (using Excel as interface). It's only a couple of hundred lines of VB code. Don't start laughing now, this was only to get aquainted with the most important principles of chess programming (data structures, evaluation, tree search and move generation). This Excel program actually plays decent chess, using alpha-beta pruning and iterative deepening, that's it (no quiscence search, no hash tables, no opening books, a very simple evaluation function and vector representation of the chess board). I could be wrong, but I don't believe iterative deepening actually works unless there is a transposition table to record results of previous iterations. Iterative deepening is meant to increase the likelihood of perfect move ordering for the search by filling the TTable with good moves. Unless you are recording results somehow, and the ttable is the most direct method, you are simply wasting time. It's rating is probably somewhere around 1000 or so (due to the computation speed and other VB limitations I can't go deeper than 5 plies without crashing :-( Yes, VB is not a very good language. Now I want to start using Visual C++ (I'm new to C, C++, but not to programming), and my quesiotn is: as soon as this program starts playing chess I would like to test it against other human players, is there a possibility to do that, how? First, make sure to follow the xboard protocol. Second use the Zippy(?) program to connect to FICS with a computer account. Then wait for the results. You might also have options with the UCI protocol, but I am not familiar with them. Another related question: any idea of the relation between rating and depth of search? In other words: if a program has strength X, how much will this improve by searching one ply deeper? So far, one ply of depth has surpassed any strength gained in knowledge. At least this was the result of one engine - Hitech(?). That is what I would have guessed! My program philosophy is as follows: 1) The evaluation function should be kept as simple as possible (=fast), strictly evaluating the STATIC properties of a position (= mainly material balance). 2) The DYNAMIC properties of a position are being taken care of by the tree search. 3) To compensate for a limited search depth, two or three positional properties could be included in the evaluation function (like pawn structure and king safety, optionally: location of rooks, knights, ....). 4) If 'king safety' is 'properly defined', this strategy can also work in endgames. |
|
#8
|
|||
|
|||
|
pd42 wrote:
My program philosophy is as follows: 1) The evaluation function should be kept as simple as possible (=fast), strictly evaluating the STATIC properties of a position (= mainly material balance). 2) The DYNAMIC properties of a position are being taken care of by the tree search. The problem is that tree search is horribly slow. Making your program twice as fast will get you an extra ply if you're lucky so even the simplest possible evaluation function won't get you a significantly deeper search and the dynamic aspects *won't* be taken care of. This is why the top engines have very compicated evaluation functions. Dave. -- David Richerby Confusing Miniature Radio (TM): it's www.chiark.greenend.org.uk/~davidr/ like a radio but you can hold in it your hand and you can't understand it! |
|
#9
|
|||
|
|||
|
* Noah Roberts (19:18) schrieb:
I could be wrong, but I don't believe iterative deepening actually works unless there is a transposition table to record results of previous iterations. Iterative deepening is meant to increase the likelihood of perfect move ordering for the search by filling the TTable with good moves. Unless you are recording results somehow, and the ttable is the most direct method, you are simply wasting time. Actually the asymptotic complexity of iterative deepeing is the same as of fixed depth, it's b^d, b being the branching factor and d being the final/fixed depth. That's because the non-final depth calculations are far less expensive. I did it the same way, when i started my own lame engine: I started with fixed depth and then went to iterative deepening. There was no slowdown at all. At least iterative deeping gives you informationon how deep to search, with fixed depth you have to guess in advance. mfg, simon .... l |
|
| Thread Tools | |
| Display Modes | |
|
|