How do you generates moves ?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Re: How do you generates moves ?

Postby Matthias Hartwich » 15 Aug 2005, 22:01

Sven Sch?le wrote:Hi Matthias,

the link is slightly wrong, remove the dot "." at the end. Nevertheless, a nice source, close to an assembler program! :D

Matthias Hartwich wrote:The moves are generated incrementally in small chunks.

Do you mean "incrementally" in the sense of updating only that part of the move list which is affected by the most recent move, or in the sense of generating moves one (or few) at a time?

Sven

I corrected the link, thanks.

The move list is build like in most programs by starting with an empty list at the entry of a node. Then the moves are added few at a time. There are two main subfunctions generating all moves from and all to a given square.

Example:
The first move (taken from the pv) ist Ng1-f3, then all moves from G1 are generated (or all moves to F3, look at the source). Two bitboards gento and genfr are updated as well to hold track on already generated moves.

This approach is not bad as you have atkto[64] and atkfr[64] all the time. My version of chess 0.5 in C in the early 90s got some 120 Nodes/s on an Atari ST with a 68000 CPU at 8MHz.
Even with this simple search the tree was considerably smaller than that of my mailbox approach of that time.
Last time I tried, I got half the speed of crafty 9.x on a 486.

Those were the times.
:wink:

Matthias
Matthias Hartwich
 
Posts: 3
Joined: 12 Jul 2005, 16:13
Location: Dormagen / Germany

Previous

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 31 guests