Which engines are open source, with easy to read and extend code, and reasonably strong?
Moderators: hgm, Rebel, chrisw
-
- Posts: 31
- Joined: Thu Oct 29, 2020 9:32 am
- Full name: Evert Jan Karman
Which engines are open source, with easy to read and extend code, and reasonably strong?
I'm asking this so that I can perhaps modify it for a chess variant idea.
-
- Posts: 31
- Joined: Thu Oct 29, 2020 9:32 am
- Full name: Evert Jan Karman
Re: Which engines are open source, with easy to read and extend code, and reasonably strong?
W.r.t. Fairy-Max, I tried this link http://hgm.nubati.net/Fairy-Max.zip but it's not downloading anything, and my anti-virus is not telling me that it blocked a download.
-
- Posts: 314
- Joined: Tue Dec 08, 2009 1:37 pm
- Location: Milan, Italy
- Full name: Alex Brunetti
-
- Posts: 31
- Joined: Thu Oct 29, 2020 9:32 am
- Full name: Evert Jan Karman
-
- Posts: 314
- Joined: Tue Dec 08, 2009 1:37 pm
- Location: Milan, Italy
- Full name: Alex Brunetti
-
- Posts: 28079
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Which engines are open source, with easy to read and extend code, and reasonably strong?
Fairy-Max is public domain, and the most recent sources are available from my on-line repository. (Now only available as mirror at http://winboard.nl .) It also exists as a Debian package ('fairymax'). The source code is extremely cryptic, though, as it is a derivative of micro-Max. By engine standards it is not very strong (~1850 on the CCRL scale).
Sjaak II by Evert Glebbeek is a configurable multi-variant engine that is also available in source code, and probably has a more readable source.
In my on-line repository there also is a section called 'simple', which contains a highly commented source of a simple engine stronger than Fairy-Max. But it is for orthodox Chess, and might not be very easy to convert for variant use. (Although I did make a derivative to play Chess wih Different Armies.) It uses an 8x8 board, and maximally 7 piece types, and it would require a lot of changes to alter that. It does use a mailbox board, though, so a board-size expansion is not as hopeless as with bitboard engines.
Sjaak II by Evert Glebbeek is a configurable multi-variant engine that is also available in source code, and probably has a more readable source.
In my on-line repository there also is a section called 'simple', which contains a highly commented source of a simple engine stronger than Fairy-Max. But it is for orthodox Chess, and might not be very easy to convert for variant use. (Although I did make a derivative to play Chess wih Different Armies.) It uses an 8x8 board, and maximally 7 piece types, and it would require a lot of changes to alter that. It does use a mailbox board, though, so a board-size expansion is not as hopeless as with bitboard engines.
-
- Posts: 314
- Joined: Tue Dec 08, 2009 1:37 pm
- Location: Milan, Italy
- Full name: Alex Brunetti
Re: Which engines are open source, with easy to read and extend code, and reasonably strong?
Hi,hgm wrote: ↑Fri Oct 25, 2024 9:42 am Fairy-Max is public domain, and the most recent sources are available from my on-line repository. (Now only available as mirror at http://winboard.nl .)
what is the most recent version? In your mirror I can find only 4.8S, while in hccnet there's 5.0.
Alex
-
- Posts: 208
- Joined: Tue Apr 09, 2024 6:24 am
- Full name: Michael Chaly
Re: Which engines are open source, with easy to read and extend code, and reasonably strong?
The strongest chess variant engine is fairy stockfish AFAIK.
-
- Posts: 266
- Joined: Thu Jul 21, 2022 12:30 am
- Full name: Chesskobra
Re: Which engines are open source, with easy to read and extend code, and reasonably strong?
Have you looked at Fruit? You may want to look at the file "technical_10.txt" in Fruit's source code first to see if it interests you.
-
- Posts: 28079
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Which engines are open source, with easy to read and extend code, and reasonably strong?
Fruit is indeed an engine with very clear source code, and quite strong. Main problem is that it is also pretty large, and you would have to read through a lot of code to find the places where you have to change something, if you really change something fundamental. (Such as board size; Fruit uses a 16x16 board with 0x88 square numbering, which requires at most half the board files are used for some of its algorithms to work.)
It is difficult to give good advice without knowing your goals. Strong engines typically use many tricks to speed them up, like dedicated check detection. These might not work at all in the presence of some variant pieces; they are tailored for orthodox Chess. So it all depends on how unusual the variant is you want to use this for.
BTW, the AI of the Interactive Diagram is written for supporting a very large range of chess variants. But it is still a very basic engine. It is written in JavaScript, since it is a web applet, but it should not be very much work to translate it to C.
It is difficult to give good advice without knowing your goals. Strong engines typically use many tricks to speed them up, like dedicated check detection. These might not work at all in the presence of some variant pieces; they are tailored for orthodox Chess. So it all depends on how unusual the variant is you want to use this for.
BTW, the AI of the Interactive Diagram is written for supporting a very large range of chess variants. But it is still a very basic engine. It is written in JavaScript, since it is a web applet, but it should not be very much work to translate it to C.