A freeware move generator source ccode for your own engines

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

Moderator: Andres Valverde

A freeware move generator source ccode for your own engines

Postby mainsworthy » 24 Aug 2008, 05:21

Hello , Ive finished Mainsworthy ( http://uk.geocities.com/avalomhilly/TextChes.zip ) and have started on Mainsworthy Advanced!

I remebered someone wanted a move generator and he was right a Rapid chess design system would need a premade move gen, so Ive put mine online ( http://uk.geocities.com/avalomhilly/movegen.zip )
its freeware its c++ source code and its 11kb only.

Mark
User avatar
mainsworthy
 
Posts: 7
Joined: 09 Aug 2008, 19:30

Re: A freeware move generator source ccode for your own engi

Postby mainsworthy » 24 Aug 2008, 05:56

Ive also included the source code for Mainsworthy here, so you have an example of putting the move generator to work, the code a little messy, but you will get the idea.

http://uk.geocities.com/avalomhilly/Mainsorc.zip
User avatar
mainsworthy
 
Posts: 7
Joined: 09 Aug 2008, 19:30

Re: A freeware move generator source ccode for your own engi

Postby Dann Corbit » 30 Aug 2008, 04:48

Here is a version which will compile under Microsoft Visual C++:
http://cap.connx.com/chess-engines/new- ... worthy.zip

I fixed a few obvious bugs and left one that I could not decipher (see comment with BUGBUG:DRC)
Dann Corbit
 

Re: A freeware move generator source ccode for your own engi

Postby mainsworthy » 30 Aug 2008, 06:25

Wow Dann didnt expect this, I will read through it tonight, thanks Mark
User avatar
mainsworthy
 
Posts: 7
Joined: 09 Aug 2008, 19:30

Re: A freeware move generator source ccode for your own engi

Postby mainsworthy » 30 Aug 2008, 07:26

if you change these function names in attack2.cpp

int xshiftright(unsigned char board[8])
int xshiftleft(unsigned char board[8])
int xshiftup(unsigned char board[8])
int xshiftdown(unsigned char board[8])

change them to:

int shiftright(unsigned char board[8])
int shiftleft(unsigned char board[8])
int shiftup(unsigned char board[8])
int shiftdown(unsigned char board[8])

drop the x from the name , then attack.cpp is no longer needed
so you can remove the include <attack.cpp> from move.cpp



thanks Mark
User avatar
mainsworthy
 
Posts: 7
Joined: 09 Aug 2008, 19:30


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 22 guests