Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Using just Upperbounds and Lowerbounds

Author: Alvaro Jose Povoa Cardoso

Date: 12:04:54 02/06/01

Go up one level in this thread


On February 05, 2001 at 15:47:55, Heiner Marxen wrote:

>On February 05, 2001 at 15:12:53, Alvaro Jose Povoa Cardoso wrote:
>
>>On February 05, 2001 at 04:38:40, Dan Newman wrote:
>>
>>>On February 04, 2001 at 17:08:07, Alvaro Jose Povoa Cardoso wrote:
>>>
>>>>I think I found the big problem with my program:
>>>>I don't store captures in the hashtable, so it is impossible to retrieve a long
>>>>PV from it (life can be cruel).
>>>>I do that because captures can be a real pain in the neck to store.
>>>>A king (dama in the portuguese version of checkers) can make multiple captures
>>>>(6-9 max).
>>>>A normal move can be something like  '30-16', but how do I store a capture like
>>>>'3x17x26x19x32' in the hash table?
>>>>Can someone give me an hint?
>>>>
>>>>Thank you
>>>>Alvaro Cardoso
>>>
>>>Assuming captures are made only by jumping diagonally (like in checkers in
>>>the US), then you only have 4 different directions that you capture in:
>>>NE, NW, SE, and SW.  That means you can encode a capture sequence as a
>>>series of 2-bit codes: NE=00, NW=01, SE=10, SW=11.  With 9 max captures
>>>this takes 18 bits.  You also need a 4 bit count of the captures so you
>>>know where the end of the sequence is.  Total for the capture sequence:
>>>22 bits.
>>>
>>>-Dan.
>>
>>
>>Yes, but in the portuguese version of checkers the king (dama) can jump over a
>>distante enemy piece, not just over its adjacents ones. Also, after the jump we
>>can 'land' our king in any free square along a given diagonal, not just the one
>>adjacent to the enemy pieces (like men pieces do).
>>Also in normal moves, the king can move to any free square along the diagonals
>>(like bishops in chess).
>>This makes the king endings very complex, with a very high branching factor.
>>So I need to store the captured square, the 'landing' (jumped to) square, and
>>the captured piece for a single capture. If I have a multiple capture then that
>>is a lot of info isn't it?
>>
>>Alvaro Cardoso
>
>The most compact way I can think of to store a legal move is:
>generate a list of legal moves in a canonical (fixed) order,
>and store the index of the move in the list.
>
>That index trick can be done for partial lists, also.
>So you may store some fixed parts of the move, like start square and landing
>square, and augment this with the index in the list of all legal moves that
>share these.
>
>Maybe along this line you find a suitable mix for your program.
>
>Heiner


I got the idea. I'll try it.
Thank you

Alvaro Cardoso




This page took 0 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.