Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: When building big arrays make sense?

Author: Uri Blass

Date: 11:06:54 10/28/02

Go up one level in this thread


On October 28, 2002 at 13:17:56, Uri Blass wrote:

<snipped>
>My question is if array is the fastest way to do other things like finding if a
>rook move is pseudo legal.
>
>rook move is pseudo legal if the file is the same file or the rank is the same
>rank(I can ignore the case when both are the same because this case never happen
>and I never expect hash move or killer move when both are the same even in case
>of hash collision)

After thinking more about the problem it seems that my 2 dimentional array is
not the same as checking if the move is pseudo legal because when I get the
direction between the squares I get more information than knowing if the move is
pseudo legal(the exact direction between the squares(left,right,up,down)
and this information is used later.

The main question if there is a fast way to calculate the function
direction(x,y) when
1)direction(x,y)=0 for up direction
2)direction(x,y)=1 for down direction
3)direction(x,y)=2 for left direction
4)direction(x,y)=3 for right direction

only a function that is faster than 64*64 array is productive.

I am interested in the same question for bishop when direction(x,y) can get
4,5,6,7.

Uri



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.