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 » Sat Nov 06, 2010 9:53 am

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 » Sun Nov 07, 2010 6:53 pm

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 » Sun Nov 07, 2010 7:22 pm

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 » Sun Nov 07, 2010 8:52 pm

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 » Sun Nov 07, 2010 10:45 pm

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 » Mon Nov 08, 2010 3:12 pm

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

Post Reply