It is painful, but the benefits are there for improved performance. But you sure do give up the clean negamax recursive code. That's why I have not yet done this. I still think there is more to be had from the recursive approaches, although DTS will always have an advantage. I am not just sure how big this advantage will always be. Current Crafty certainly narrows the gap a bit, anyway.Fabio Gobbato wrote:Thank you, I'll try it
Parallel iterative search function
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Parallel iterative search function
-
- Posts: 217
- Joined: Fri Apr 11, 2014 10:45 am
- Full name: Fabio Gobbato
Re: Parallel iterative search function
I think that I will keep a similar code to the recursive search, but with the stack that I can access directly and then step by step I will try some optimizations adapting the code to the iterative algorithm.
I try it, if it's too painful I have always the recursive version.
I try it, if it's too painful I have always the recursive version.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Parallel iterative search function
It won't work with a recursive search. DTS depends on the idea that thread 1 can split with 2, 3, ..., N at some node, and whichever thread is last to finish will complete that node and back up to the previous ply. A recursive search has a call stack that would break here.Fabio Gobbato wrote:I think that I will keep a similar code to the recursive search, but with the stack that I can access directly and then step by step I will try some optimizations adapting the code to the iterative algorithm.
I try it, if it's too painful I have always the recursive version.
-
- Posts: 217
- Joined: Fri Apr 11, 2014 10:45 am
- Full name: Fabio Gobbato
Re: Parallel iterative search function
It's difficult for me to imagine an iterative search, I have always used the recursive one.
I know the starting point but I don't have in mind the resulting form of the search.
I have had a look to the Scorpio source. Are there other sources that implemets DTS?
I know the starting point but I don't have in mind the resulting form of the search.
I have had a look to the Scorpio source. Are there other sources that implemets DTS?
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Parallel iterative search function
If you can read FORTRAN, the source for Cray Blitz (a fairly old version of DTS and such as the program is the 1989 version I believe). But it has an iterated search and does DTS so it will get you started in the right direction.Fabio Gobbato wrote:It's difficult for me to imagine an iterative search, I have always used the recursive one.
I know the starting point but I don't have in mind the resulting form of the search.
I have had a look to the Scorpio source. Are there other sources that implemets DTS?
-
- Posts: 217
- Joined: Fri Apr 11, 2014 10:45 am
- Full name: Fabio Gobbato
Re: Parallel iterative search function
It could help. It's very kind of you.
-
- Posts: 217
- Joined: Fri Apr 11, 2014 10:45 am
- Full name: Fabio Gobbato
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Parallel iterative search function
I am afraid to say yes or no.
It is certainly available on my web page.
www.cis.uab.edu/hyatt/crafty/crayblitz
Note that this program certainly works, but the parallel part does not. It depended on something called "task common" in Cray's fortran language, which is a local common block that is duplicated for each thread...
It compiled and ran (without threads) the last time I tried it on the gnu f77 compiler.
It is certainly available on my web page.
www.cis.uab.edu/hyatt/crafty/crayblitz
Note that this program certainly works, but the parallel part does not. It depended on something called "task common" in Cray's fortran language, which is a local common block that is duplicated for each thread...
It compiled and ran (without threads) the last time I tried it on the gnu f77 compiler.