From: Ruchira Datta <datta@math.berkeley.edu>
To: caml-list@inria.fr
Subject: Re: [Caml-list] bitboard - howto (fwd)
Date: Thu, 18 Apr 2002 14:40:03 -0700 [thread overview]
Message-ID: <20020418144003.A26968@maputo.Math.Berkeley.EDU> (raw)
In-Reply-To: <Pine.A32.3.95.1020417143148.48198C-100000@ibm1.cicrp.jussieu.fr>; from Diego-Olivier.FERNANDEZ-PONS@cicrp.jussieu.fr on Wed, Apr 17, 2002 at 02:33:14PM +0200
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
prev parent reply other threads:[~2002-04-18 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-17 12:33 Diego Olivier Fernandez Pons
2002-04-18 21:40 ` Ruchira Datta [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020418144003.A26968@maputo.Math.Berkeley.EDU \
--to=datta@math.berkeley.edu \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox