Author: Uri Blass
Date: 05:04:52 03/18/02
Go up one level in this thread
On March 18, 2002 at 07:01:49, Travers Waker wrote: >Hi all programmers. > >I've been wondering: How big do people make their move list (i.e. the list of >legal/pseudo-legal moves in a particular position)? I assume that most people >don't want to use a dynamic list (e.g. linked list), because it's slow, but if >you allocate an array as your list, what length do you make it? It's easy for >captures, since their can only be 16 possible captures (if you allow capturing >the king), but non-captures are not so easy, I think. If you take a guess about >what the greatest number of possible non-captures is in any legal chess >position, how do you know your program won't crash in certain unusual positions? > >Looking forward to hearing your ideas. > >Travers My list is done in the same way that tscp does it's list except the fact that I generate only legal moves. The list includes all the legal moves of the line that the computer search It means that if the computer searches the position after e4 e5 the list includes all the 20 legal moves in the opening position, all the 20 legal moves after e2e4 and all the legal moves after e2e4 e7e5. I use an array that can include 30000 moves and it is a global variable in my program. Tscp is using a smaller array of 1120 moves but I do not get significant speed advantage if I use a smaller array(I am even not sure if there is a speed advantage) and I do not want to take risks of errors even if they happen one time in 1000 games so I prefered to do the array longer. I remember from hyatt's post in the past that there is a good solution without an array but I doubt if it can help me because of the fact that doing the array shorter does not help me. Uri
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.