From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA03103; Thu, 18 Apr 2002 23:40:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA03099 for ; Thu, 18 Apr 2002 23:40:06 +0200 (MET DST) Received: from Math.Berkeley.EDU (gold.Math.Berkeley.EDU [169.229.58.61]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3ILe5b15606 for ; Thu, 18 Apr 2002 23:40:05 +0200 (MET DST) Received: from maputo.math.Berkeley.EDU (maputo.Berkeley.EDU [128.32.183.116]) by Math.Berkeley.EDU (8.12.1/8.12.1) with ESMTP id g3ILe3q0028380; Thu, 18 Apr 2002 14:40:03 -0700 (PDT) Received: (from datta@localhost) by maputo.math.Berkeley.EDU (8.9.3/8.9.3) id OAA26977; Thu, 18 Apr 2002 14:40:03 -0700 (PDT) Date: Thu, 18 Apr 2002 14:40:03 -0700 From: Ruchira Datta To: caml-list@inria.fr Subject: Re: [Caml-list] bitboard - howto (fwd) Message-ID: <20020418144003.A26968@maputo.Math.Berkeley.EDU> Reply-To: datta@math.berkeley.edu References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: ; from Diego-Olivier.FERNANDEZ-PONS@cicrp.jussieu.fr on Wed, Apr 17, 2002 at 02:33:14PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Apr 17, 2002 at 02:33:14PM +0200, Diego Olivier Fernandez Pons wrote: > On Tue, 16 Apr 2002, V Krishnakumar wrote: > > > Hi! all, > > > > Iam new to OCaml. Iam trying to write a chess engine. > > In order to represent the board, I need bitvectors. How do I get bitvectors ? (i need exactly 64 bit vectors). > > Je réponds en français, j'espère que cela fera l'affaire "I answer in French, I hope that will do..." [In case it doesn't, my translation follows--RSD] > > En ce qui concerne la programmation de jeux d'échecs basés sur la > méthode des bitboards (laquelle consiste à représenter le tableau > d'échecs 8x8 sur un entier 64 bits) je conseille de jeter un coup > d'oeil aux programmes suivants : Regarding programming chess games based on the bitboard method (which consists of representing an 8x8 chessboard by a 64-bit integer), I advise you to take a look at the following programs: > > - crafty (main.c explique l'historique de la construction de crafty, > très intéressant à ce titre) crafty (main.c explains the history of the construction of crafty, very interesting for this title) > - dark thought (http://supertech.lcs.mit.edu/~heinz/dt/) > on y trouve en particulier plusieurs articles sur les algorithmes > utilisés par ce logiciel - dark thought (http://supertech.lcs.mit.edu/~heinz/dt/) in particular you'll find several articles there on the algorithms used by this program > > Je précise cependant qu'un jeu d'échecs basé sur la lib Int64 sera > nettement moins performant que ses concurrents écrits en C. Aussi > l'approche que je préconiserait plutôt est celle du développement d'un > petit programme Caml qui écrive du code C adapté (un peu à la FFTW) Let me make clear however that a chess game based on the Int64 library will be substantially less efficient than its peers written in C. Thus the approach I would recommend instead is to develop a little Caml program which writes adapted C code (a little like FFTW [Fastest Fourier Transform in the West]) > > Il vous faut à cet effet : For this you'll need: > - un noyau minimal simulant un processeur 64 bits comme celui que l'on > trouve dans le livre de P. Weis et X. Leroy (Le lagage Caml) - je > crois qu'il est également disponible dans les exemples de > programmation Caml par P. Weis - - a minimal kernel simulating a 64-bit processor, such as the one you'll find in the book by P. Weise and X. Leroy (_Le langage Caml_) - I think it can be downloaded as well from among P. Weis's Caml programming examples - > - un intérpréteur qui vous permette de déterminer la complexité (en > nombre de multiplications, additions, et, ou...) de vos algorithmes - an interpreter which lets you determine the complexity (in number of multiplications, additions, and's, or's...) of your algorithms > - un peu de sucre syntaxique - a little syntactic sugar > - un simplificateur local (expressions algébriques et booléennes) - a local simplifier (for algebraic and boolean expressions) > - un pretty printer qui fasse la sortie en code C - a pretty printer which makes the output in C code > > Je vous conseille également de jeter un coup d'oeil dans le code > source de la FFTW : I advise you to take a look at the FFTW source code as well: > - expr.ml définition des expression arithmétiques (100 lignes) - expr.ml definitions of arithmetic expressions (100 lines) > - exprdag.ml simplificateurs locaux et algébriques (1000 lignes) - exprdag.ml local and algebraic simplifiers (1000 lines) > - ast.ml arbre syntaxique C (200 lignes) - ast.ml C syntax trees (200 lines) > > En espérant que ces remarques vous auront été utiles Hoping these comments will have been helpful to you, > > Diego Olivier > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Ruchira Datta datta@math.berkeley.edu ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners