Page 1 of 1

Iterative negamax?

Posted: Sat Nov 06, 2010 9:53 am
by armand
I want to change the usual recursive negamax search into an iterative one. I am implementing chess into a rather primitive environment (if not downright hostile) and the iterative approach would provide benefits.

I've been looking but I couldn't find one semi-legible working code. I'd love to see something that preferably uses a stack and doesn't use GOTOs (I can't use them).

The only place I could find something was on chessprogramming.wikispaces.com but nothing I could actually use.

Any help would be very much appreciated.

Re: Iterative negamax?

Posted: Sun Nov 07, 2010 6:53 pm
by armand
Just to be clearer, I'm looking for iterative alpha-beta pruning. I can use conditionals and loops, but no gotos.

Re: Iterative negamax?

Posted: Sun Nov 07, 2010 7:22 pm
by hyatt
The old Cray Blitz source is online somewhere (if not, I can email you the search.f function). It is an iterative approach, but it doesn't use a true stack. And it likely has a goto or two in it. But you'd need to know FORTRAN.

The idea is not so difficult, but the code is definitely more cluttered and difficult to read.

Re: Iterative negamax?

Posted: Sun Nov 07, 2010 8:52 pm
by Revilo
hyatt wrote:The old Cray Blitz source is online somewhere
ftp://ftp.cis.uab.edu/pub/hyatt/crayblitz/ ;)

Re: Iterative negamax?

Posted: Sun Nov 07, 2010 10:45 pm
by hyatt
Had forgotten I had it on my ftp box. :)

Re: Iterative negamax?

Posted: Mon Nov 08, 2010 3:12 pm
by armand
Thanks a lot for the code, I'm "decoding" now :)