Author: Robert Hyatt
Date: 19:29:58 01/08/04
Go up one level in this thread
On January 08, 2004 at 21:30:16, scott farrell wrote: >I know there was a huge thread about the array being 32, I think it might only >need 4. I also didnt read that howle thread, so someone can just tell me if you >came to this conclusion already. > >Given the rules of what is in crafty: >- minimax outcome >- LVA - fixed ordering, must always use smallest first >- king can take, and is scored as mate (or thereabouts if you capture) >- currently crafty goes through all attackers, until on side has none, it uses a >32 sized array to hold capture values, that are built up, and then minimaxed > >now that maximum score returned than can be minimaxed, is the whole piece you >are capturing, any more and it will be minimaxed away. > >the minimum score is the piece being captured, less the attacking piece, >anything less will be minimaxed away. Correct, that is the _largest_ score. But not the smallest. You could start off taking a queen with the queen, then re-capturing with a rook, and so forth until you win a pawn at the end. > >I hope the 2 statements above are sound. > >The next part of my argument is I think you only 3-4 entries in the array, and >you dont need to iterate all pieces, just the first 1 or 2 captures each >(depending how you count them - and if you count the first one or not). > > >after the initial capture, the other side either has a good capture, or they >dont. To determine if there is a good capture or not, I dont see that we need to >pile a nearly unlmited number of pieces on. The minimax could would need a >slight tweak to disregard the last capture I think. Think about this sequence of moves to win a rook: QxQ RxQ RxR RxR RxR > >if we have a position that starts of pawn x pawn, we dont need to minimax >through all the RxR and RxR QxR QxQ KXQ stuff to work out that somewhere adding >in more captures will always be minimaxed away. Until you get to the _end_ and "minimax" your way back, how can you do that? That is the definition of "minimax". "depth-first". > >I need to think more on exactly the maximum number of captures is required, but >I am sure it is way less than 32, no matter what is on the board. So I am saying >instead of exhausting the captures for one side, make an early exit after a >maximum of 2 captures each - or some other similar small number. > >Or I could be completely wrong. > >I might try coding it up both ways, and see if the answer ever differs. > >Scott
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.