Simple open source program wanted

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

rreagan
Posts: 102
Joined: Sun Sep 09, 2007 6:32 am

Simple open source program wanted

Post by rreagan »

I am looking for a simple open source chess engine. The goal is to port it to other languages, as a learning exercise to learn other languages.

So the main criteria is that it should be simple. The fewer features the better. A minimal perft calculator would be sufficient.

I would like it if I could find several simple engines to work from. Maybe one written in a procedural style, and another written in a more object oriented style.
User avatar
silentshark
Posts: 327
Joined: Sat Mar 27, 2010 7:15 pm

Re: Simple open source program wanted

Post by silentshark »

rreagan wrote:I am looking for a simple open source chess engine. The goal is to port it to other languages, as a learning exercise to learn other languages.

So the main criteria is that it should be simple. The fewer features the better. A minimal perft calculator would be sufficient.

I would like it if I could find several simple engines to work from. Maybe one written in a procedural style, and another written in a more object oriented style.
tscp? http://www.tckerrigan.com/Chess/TSCP
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Simple open source program wanted

Post by JVMerlino »

Firstchess is another good choice.

http://www.devweb.cl/atari/cc65/FirstChess.c
alpha123
Posts: 660
Joined: Sat Dec 05, 2009 5:13 am
Location: Colorado, USA

Re: Simple open source program wanted

Post by alpha123 »

Micro-Max (I forget the link).

Peter
schlucke
Posts: 58
Joined: Thu Apr 09, 2009 1:38 pm

Re: Simple open source program wanted

Post by schlucke »

alpha123 wrote:Micro-Max (I forget the link).

Peter
Here you go: http://home.hccnet.nl/h.g.muller/max-src2.html
schlucke
Posts: 58
Joined: Thu Apr 09, 2009 1:38 pm

Re: Simple open source program wanted

Post by schlucke »

rreagan wrote:I am looking for a simple open source chess engine. The goal is to port it to other languages, as a learning exercise to learn other languages.

So the main criteria is that it should be simple. The fewer features the better. A minimal perft calculator would be sufficient.

I would like it if I could find several simple engines to work from. Maybe one written in a procedural style, and another written in a more object oriented style.
And this one is my favourite, but without perft and comments ;)

http://www.glaurungchess.com/viper/
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Simple open source program wanted

Post by Dann Corbit »

rreagan wrote:I am looking for a simple open source chess engine. The goal is to port it to other languages, as a learning exercise to learn other languages.

So the main criteria is that it should be simple. The fewer features the better. A minimal perft calculator would be sufficient.

I would like it if I could find several simple engines to work from. Maybe one written in a procedural style, and another written in a more object oriented style.
This is a much better design than TSCP, MSCP and far easier to understand than programs designed for maximal terseness.
http://www.3dkingdoms.com/chess/sam/samchess.html

Another good choice would be Olithink. Before embarking on the project I would consult with the authors of the programs.
bhlangonijr
Posts: 482
Joined: Thu Oct 16, 2008 4:23 am
Location: Milky Way

Re: Simple open source program wanted

Post by bhlangonijr »

In my opinion the best one is Sungorous, written by Pablo Vasques:
http://sites.google.com/site/sungorus/

It is written with a very clean and straightforward C code. The entire search code has only 154 lines of code. Although the code base of Sungorus is relatively small, it has a lot of important features such as a good move ordering function, hash tables, null move pruning (the version 1.2 had also LMR, but it seems the author removed it for some reason), fast move generation, etc

Currently the engine is #142 on CCRL with 2350 ELO.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Simple open source program wanted

Post by Dann Corbit »

bhlangonijr wrote:In my opinion the best one is Sungorous, written by Pablo Vasques:
http://sites.google.com/site/sungorus/

It is written with a very clean and straightforward C code. The entire search code has only 154 lines of code. Although the code base of Sungorus is relatively small, it has a lot of important features such as a good move ordering function, hash tables, null move pruning (the version 1.2 had also LMR, but it seems the author removed it for some reason), fast move generation, etc

Currently the engine is #142 on CCRL with 2350 ELO.
I just took a look, and you are right. This program is an excellent starting point.
User avatar
WinPooh
Posts: 267
Joined: Fri Mar 17, 2006 8:01 am
Location: Russia
Full name: Vladimir Medvedev

Re: Simple open source program wanted

Post by WinPooh »

You can take a look at GreKo. Some people say it is relatively readable.