Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: About chess programming

Author: Robert Hyatt

Date: 18:31:02 12/22/99

Go up one level in this thread


On December 22, 1999 at 21:22:52, Will Singleton wrote:

>On December 22, 1999 at 21:11:12, Tom Kerrigan wrote:
>
>>Personally, I like linked lists, but I think most people just have arrays of
>>integers that hold the squares of pieces.
>>-Tom
>>
>>On December 22, 1999 at 20:20:00, Will Singleton wrote:
>>
>>>On December 22, 1999 at 19:26:40, Tom Kerrigan wrote:
>>>
>>>>The program will be 300% faster if you use piece lists of some sort. ;)
>>>>-Tom
>>>>
>>>>
>>>
>>>What kind of piece-lists?
>>>
>>>Will
>
>I'm not the most observant guy, I guess, so I don't use any piece lists.  In
>what way can they help? (btw, posting at the top of msgs makes it tough for
>others to follow)
>
>Will


The idea is that if you are trying to generate moves for white, you have to
loop over 64 squares looking for white pieces to generate moves for.  If you
have a piece list, you only loop over the 16 entries as they point to the
squares where the white pieces are.  4x faster in the outer loop, if you
think about it....




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.