Article View: gnu.chess
Article #5091genmoves
From: Joel Rivat
Date: Tue, 08 Feb 1994 11:00
Date: Tue, 08 Feb 1994 11:00
36 lines
2055 bytes
2055 bytes
A good solution would be to introduce a new function:
bool legal_move(move_t *move);
where *move contains valid information about square from, square to, promotion.
which returns true if the move is legal, false otherwise.
In case the move is legal, the function has also stored
in *move some special infos about the move,
like check, castle, en passant etc...
This function will then be used:
1/ to build a move list, useful for reading PGN etc...
2/ verify a move proposed by a pseudo legal move generator
The pseudo legal move generator should propose the moves
one by one (no pseudo legal move list which consumes time)
in the following order:
1/ Transposition Table move (if any)
2/ nullmove (if allowed)
3/ other special moves like PV moves, killers, butterfly killers, etc...
4/ captures with non negative gain in decreasing order of interest
5/ non capture moves in decreasing order of positionnal interest
6/ captures with negative gain
The interest of this method is that if a move produces a cutoff
we do not spend time to generate the other moves.
In a lot of positions the moves 1/ 2/ or 3/ produce a cutoff
and there is no move generation at all...
I know that it is not easy to program this pseudo legal moves generator,
but more speed is probably at this price...
Joel Rivat
Technical Details
Message-ID:
<2j7rcf$3vo@cismsun.univ-lyon1.fr>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!news.belwue.de!news.dfn.de!news.dfn.de!zib-berlin.de!zrz.TU-Berlin.DE!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!pipex!zaphod.crihan.fr!jussieu.fr!univ-lyon1.fr!declmdi.univ-lyon1.fr!rivatShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,9b66068f1c33625f,start X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 1994-02-08 03:00:31 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!news.belwue.de!news.dfn.de!news.dfn.de!zib-berlin.de!zrz.TU-Berlin.DE!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!pipex!zaphod.crihan.fr!jussieu.fr!univ-lyon1.fr!declmdi.univ-lyon1.fr!rivat From: rivat@univ-lyon1.fr (Joel Rivat) Newsgroups: gnu.chess Subject: genmoves Date: 8 Feb 1994 11:00:31 GMT Organization: C.I.S.M. Universite de Lyon 1 / INSA de Lyon Lines: 36 Message-ID: <2j7rcf$3vo@cismsun.univ-lyon1.fr> NNTP-Posting-Host: declmdi.univ-lyon1.fr X-Newsreader: TIN [version 1.2 PL2]