Article View: gnu.chess
Article #1949Seeking Easy Way to Calculate Legal Moves
From: Ed Suominen
Date: Mon, 13 Aug 2001 21:50
Date: Mon, 13 Aug 2001 21:50
20 lines
1759 bytes
1759 bytes
I'm looking for a chunk of code that I can port to GNU Octave (=MATLAB) for some chess analysis work I'm doing. The code needs to calculate all legal moves (including captures, castling, etc.) for one side given a particular board position. It looks like GNU Chess has what I need, in the nextpos and nextdir arrays, but I would rather not take the time to figure out the code that generates those arrays. Could someone provide me with the data of those arrays as initialized by INITIALI.C) along with some explanatory text of how to use the data to calculate legal moves? Each array should have 8x64x64=32K elements of initialized data, which is no problem for GNU Octave. If there's an easier way to do the legal move calculations using MATLAB's high-level array calculation language, I'd certainly appreciate knowing about it. Thanks, Ed Remove the piece names to reply via directly email: edQueen@eeKnightpatentsBishop.Rookcom
Technical Details
Message-ID:
<42bca911.0108131350.5d9dd143@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,4012bb1dd5ae9e1b,start X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 2001-08-13 14:50:56 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mail From: startedmar01@yahoo.com (Ed Suominen) Newsgroups: gnu.chess Subject: Seeking Easy Way to Calculate Legal Moves Date: 13 Aug 2001 14:50:56 -0700 Organization: http://groups.google.com/ Lines: 20 Message-ID: <42bca911.0108131350.5d9dd143@posting.google.com> NNTP-Posting-Host: 65.165.13.44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 997739456 12931 127.0.0.1 (13 Aug 2001 21:50:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Aug 2001 21:50:56 GMT