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.
Iterative negamax?
Re: Iterative negamax?
Just to be clearer, I'm looking for iterative alpha-beta pruning. I can use conditionals and loops, but no gotos.
-
- Posts: 1242
- Joined: Thu Jun 10, 2010 2:13 am
- Real Name: Bob Hyatt (Robert M. Hyatt)
- Location: University of Alabama at Birmingham
- Contact:
Re: Iterative negamax?
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.
The idea is not so difficult, but the code is definitely more cluttered and difficult to read.
-
- Posts: 1
- Joined: Thu Nov 04, 2010 10:12 am
- Real Name: Oliver Uwira
- Location: Frankfurt, Germany
Re: Iterative negamax?
ftp://ftp.cis.uab.edu/pub/hyatt/crayblitz/hyatt wrote:The old Cray Blitz source is online somewhere
-
- Posts: 1242
- Joined: Thu Jun 10, 2010 2:13 am
- Real Name: Bob Hyatt (Robert M. Hyatt)
- Location: University of Alabama at Birmingham
- Contact:
Re: Iterative negamax?
Had forgotten I had it on my ftp box.
Re: Iterative negamax?
Thanks a lot for the code, I'm "decoding" now