Author: William Bryant
Date: 10:29:53 09/22/99
Go up one level in this thread
>If you use "malloc" as a regular part of your search you'll go really slow. If >you are talking about generating moves, I think the best way to go is a >special-case mark and release heap. > >What this means is that you have an array of like 0..32767 generated moves. >When you enter the search, you generate moves for the current position, which >will fill elements 0..N in the array. When you execute the move at element zero >and recurse into "search", you fill elements N+1..M in the array. When you are >done with those, you come back and execute the move at element one, and then >recurse and once again use array elements starting at position N+1. > >My explanation is complicated but it is simple to implement and involves no >memory allocations other than the first one. > >bruce If you would like a simple example of this technique, TSCP uses a single array called the move stack to place moves in as generated just as described above. William wbryant@ix.netcom.com
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.