Iterative negamax?

Code, algorithms, languages, construction...
Post Reply
armand
Posts: 5
Joined: Sat Nov 06, 2010 8:25 am
Real Name: Armand

Iterative negamax?

Post 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.
armand
Posts: 5
Joined: Sat Nov 06, 2010 8:25 am
Real Name: Armand

Re: Iterative negamax?

Post by armand »

Just to be clearer, I'm looking for iterative alpha-beta pruning. I can use conditionals and loops, but no gotos.
hyatt
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?

Post 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.
Revilo
Posts: 1
Joined: Thu Nov 04, 2010 10:12 am
Real Name: Oliver Uwira
Location: Frankfurt, Germany

Re: Iterative negamax?

Post by Revilo »

hyatt wrote:The old Cray Blitz source is online somewhere
ftp://ftp.cis.uab.edu/pub/hyatt/crayblitz/ ;)
hyatt
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?

Post by hyatt »

Had forgotten I had it on my ftp box. :)
armand
Posts: 5
Joined: Sat Nov 06, 2010 8:25 am
Real Name: Armand

Re: Iterative negamax?

Post by armand »

Thanks a lot for the code, I'm "decoding" now :)
Post Reply