[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Ruchira Datta <datta@m...> |
| Subject: | Re: [Caml-list] bitboard - howto (fwd) |
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