MinimalChess 0.3 released

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
lithander
Posts: 353
Joined: Sun Dec 27, 2020 1:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

MinimalChess 0.3 released

Post by lithander » Tue Mar 09, 2021 9:33 am

There's a new release version of MinimalChess! 8-)

Version 0.3 adds MVV-LVA move ordering, Quiescence Search and replaces the material-only evaluation with Piece-Square Tables. With these changes it gains about 500 ELO in playing strength over the previous version.

This version also also introduces a rather unique feature:

The PSTs are defined in separate files and can be selected via an UCI option.
This allows the user to tweak the values or write their own tables from scratch which alters the playstyle of the engine considerably. No programming experience required! ;)

All example PSTs in the release are from other engines or the wiki. I can't do it myself but if anyone wants to contribute better PSTs I'll include them in the next release. Here's a great introduction into what PSTs are if you are not sure what I'm even talking about.

Let me know of your impressions should you play the engine! I hope there aren't any bugs but if you find something let me know!

You can find a more detailed description, the source code as well as builds for Windows, Mac and Linux on Github!
https://github.com/lithander/MinimalChessEngine
Minimal Chess. A simple engine written in C#! Details on Youtube & Github

Gabor Szots
Posts: 986
Joined: Sat Jul 21, 2018 5:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: MinimalChess 0.3 released

Post by Gabor Szots » Tue Mar 09, 2021 1:19 pm

I'm still at v0.2 and the other day I had a strange experience. MinimalChess did not want to move and the Shredder GUI told me it was not a UCI engine. After some time I decided to download it again and replace the installed version. Then I noticed that the already used engine was 2 bytes longer (26 796 300) than the freshly downloaded one (26 796 298). After replacing it worked again.
I don't know what happened although I did have virus alert at one time from Windows Defender but I don't know it it was related to MinimalChess.

And now I have almost the same thing with SebLagueChess. It does not want to move after leaving book. Crazy.
Gabor Szots
CCRL testing group

User avatar
lithander
Posts: 353
Joined: Sun Dec 27, 2020 1:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: MinimalChess 0.3 released

Post by lithander » Tue Mar 09, 2021 1:31 pm

Gabor Szots wrote:
Tue Mar 09, 2021 1:19 pm
I'm still at v0.2 and the other day I had a strange experience. MinimalChess did not want to move and the Shredder GUI told me it was not a UCI engine. After some time I decided to download it again and replace the installed version. Then I noticed that the already used engine was 2 bytes longer (26 796 300) than the freshly downloaded one (26 796 298). After replacing it worked again.
I don't know what happened although I did have virus alert at one time from Windows Defender but I don't know it it was related to MinimalChess.

And now I have almost the same thing with SebLagueChess. It does not want to move after leaving book. Crazy.
:(

Can you start the executable manually and check if the version reported is 0.2.1 in both versions? Or is the old one 0.2?
A few days after Release I made a small fix and replaced the builds (instead of making a new release) because I couldn't edit the links in the OP and didn't want them to still point to the old files.

But if the issue you describe happened in 0.2.1 I have no explanation. I will download Shredder GUI and test the engine there, maybe it happens for me too.

Regarding Windows Defender, when I download a new binary that it doesn't know it blocks the engine and performs a virus check that can take several seconds before the engine becomes responsive again. A little notification pops up to make me aware of this and for each binary that happens only once.
Minimal Chess. A simple engine written in C#! Details on Youtube & Github

Gabor Szots
Posts: 986
Joined: Sat Jul 21, 2018 5:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: MinimalChess 0.3 released

Post by Gabor Szots » Tue Mar 09, 2021 2:23 pm

lithander wrote:
Tue Mar 09, 2021 1:31 pm
Can you start the executable manually and check if the version reported is 0.2.1 in both versions? Or is the old one 0.2?
It is 0.2.1. The one with the problem was 0.2 because I downloaded it as soon as you released it.

I'll have to investigate the SebLague issue further.

BTW, with no knowledge implemented why are the files so huge in size?
Gabor Szots
CCRL testing group

User avatar
lithander
Posts: 353
Joined: Sun Dec 27, 2020 1:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: MinimalChess 0.3 released

Post by lithander » Tue Mar 09, 2021 3:17 pm

Gabor Szots wrote:
Tue Mar 09, 2021 2:23 pm
It is 0.2.1. The one with the problem was 0.2 because I downloaded it as soon as you released it.
That's a relief! :)
Gabor Szots wrote:
Tue Mar 09, 2021 2:23 pm
BTW, with no knowledge implemented why are the files so huge in size?
A compiled C# program usually is not bigger than a C++ program. But it requires the right version of the .Net Framework installed on your computer to run. Because I didn't want users to have to worry about installing dependencies I decided to pack all required parts of the .NET Framework into the executable. So 95% of the file-size has nothing to do with playing chess. ;)
Gabor Szots wrote:
Tue Mar 09, 2021 2:23 pm
I'll have to investigate the SebLague issue further.
It's possible that there are bugs in Sebastian Lagues engine that cause it to stall on a certain position. If it happens again and you can provide me with the move sequence that lead to the position I will try to reproduce it with a Debugger connected. But no guarantees that I can fix it! I just added the UCI part. :P
Minimal Chess. A simple engine written in C#! Details on Youtube & Github

User avatar
mvanthoor
Posts: 1284
Joined: Wed Jul 03, 2019 2:42 pm
Location: Netherlands
Full name: Marcel Vanthoor
Contact:

Re: MinimalChess 0.3 released

Post by mvanthoor » Tue Mar 09, 2021 4:08 pm

lithander wrote:
Tue Mar 09, 2021 9:33 am
There's a new release version of MinimalChess! 8-)
Congrats :) I'll do a run against Alpha 1 to see if it gives better sport than version 0.1 and 0.2 :) According to your own results, it should be playing close to 1600, so I expect to lose some games now.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL

User avatar
Roland Chastain
Posts: 476
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: MinimalChess 0.3 released

Post by Roland Chastain » Tue Mar 09, 2021 9:47 pm

I like the idea of PST in text files. Very nice!
Qui trop embrasse mal étreint.

User avatar
mvanthoor
Posts: 1284
Joined: Wed Jul 03, 2019 2:42 pm
Location: Netherlands
Full name: Marcel Vanthoor
Contact:

Re: MinimalChess 0.3 released

Post by mvanthoor » Wed Mar 10, 2021 4:44 pm

lithander wrote:
Tue Mar 09, 2021 9:33 am
There's a new release version of MinimalChess! 8-)
As promised, I've run MinimalChess through two gauntlets.

Against Rustic Alpha 1, with which it has (almost) a parity of features. MinimalChess 0.3 has PVMove ordering, which Alpha 1 does not. A1 is faster however, and it seems to be fast enough to compensate for this feature. When watching some games, it looks as if Rustic's PST's are a little bit better.

Code: Select all

Score of Rustic Alpha 1 vs MinimalChess 0.3: 45 - 24 - 31 [0.605]
...      Rustic Alpha 1 playing White: 27 - 8 - 15  [0.690] 50
...      Rustic Alpha 1 playing Black: 18 - 16 - 16  [0.520] 50
...      White vs Black: 43 - 26 - 31  [0.585] 100
Elo difference: 74.1 +/- 57.8, LOS: 99.4 %, DrawRatio: 31.0 %
100 of 100 games finished
Even though Rustic Alpha 1 is still stronger, a match against MinimalChess 0.3 is by no means a slaughterfest any longer. The error bars are a bit large because of playing only 100 games, but it seems as if a 1600 rating for MinimalChess 0.3 is in the cards, if it's a bit lucky with the opponents it faces in CCRL testing.

Another gauntlet against Alpha 2, which has a TT and TT Move ordering:

Code: Select all

Score of Rustic Alpha 2 rc5 Mate vs MinimalChess 0.3: 72 - 10 - 18 [0.810]
...      Rustic Alpha 2 rc5 Mate playing White: 36 - 5 - 9  [0.810] 50
...      Rustic Alpha 2 rc5 Mate playing Black: 36 - 5 - 9  [0.810] 50
...      White vs Black: 41 - 41 - 18  [0.500] 100
Elo difference: 251.9 +/- 75.4, LOS: 100.0 %, DrawRatio: 18.0 %
100 of 100 games finished.
It seems MinimalChess 0.3 takes a serious hit when paired against an opponent that uses a transposition table, in contrast to, for example, Celestial 1.0, which drops only 14 Elo points. In the rating list, Rustic Alpha 2 was about 105 Elo above Alpha 1, so I had expected Alpha 2 to score around +180 Elo. +251 is decidedly worse, but still... the error bars are rather large.

Because of the less than predicted performance of MinimalChess 0.3 against Alpha 2, the rating of Alpha 2 becomes a bit higher, and thus all the engines that played against it also increased a few points in rating. Alpha 2 itself increased from 1781 to 1792 since the previous list. This is the current list, with the games of MinimalChess 0.3 included:

Code: Select all

1 Clueless 1.4			1888   63   59   100   69%  1734    9%
2 Wukong JS 1.4			1843   59   57   100   64%  1734   15%
3 Deepov 0.4			1831   58   56   100   63%  1734   15%
4 CDrill Build 4		1805   59   58   100   59%  1734   11%
5 Pigeon 1.5.1			1795   54   53   100   59%  1734   34%
6 Rustic Alpha 2 rc5		1792   23   23   600   57%  1741   20%
7 TSCP 1.81			1743   58   58   100   51%  1734   10%
8 Celestial 1.0			1733   55   55   100   50%  1734   22%
9 FracTal 1.0			1714   52   52   100   47%  1734   39%
10 Shallow Blue 2.0		1713   56   57   100   47%  1734   16%
11 Rustic Alpha 1		1677   23   23   600   42%  1741   19%
12 Mizar 3			1662   57   58   100   41%  1734   13%
13 MinimalChess 0.3		1582   40   41   200   29%  1734   25%
Congratulations with this massive increase of about 540 points. I think the main reason for the difference in Elo-rating would be Rustic's PST's, because the only other difference in features is PV Move ordering vs. raw speed (as far as I know).

Did you run a match against Rustic Alpha 1 using Rustic's PST's?

Congratulations. If you wanted to write a minimal chess engine, you did it.

- Include a few PST sets
- Include a PST-set that has all zero's, effectively disabling it
- Make a UCI-option to disable QSearch

Then you have an engine that can play from somewhere between 1000 Elo up to +/- 1600 CCRL, with QSearch enabled, depending on the PST's. That seems a perfect opportunity to call it MinimalChess 1.0, and call it quits on this engine :)

Assuming you want to write a bitboard engine and then go all-out with adding features. I'd be willing to help with this (with tips and hints, and some testing/profiling, not programming), as I went through that process a year before.

edit: Rustic Alpha 2 rc5 is going to be Alpha 2 shortly; the engine itself won't change. I just have to add the UCI options to it for setting and clearing the TT. The engine can do it from the command line, but I want it to be complete before releasing it.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL

User avatar
Roland Chastain
Posts: 476
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: MinimalChess 0.3 released

Post by Roland Chastain » Wed Mar 10, 2021 8:11 pm

The progress from v0.2 to v0.3 is impressive. Congratulations!
lithander wrote:
Tue Mar 09, 2021 3:17 pm
A compiled C# program usually is not bigger than a C++ program. But it requires the right version of the .Net Framework installed on your computer to run. Because I didn't want users to have to worry about installing dependencies I decided to pack all required parts of the .NET Framework into the executable. So 95% of the file-size has nothing to do with playing chess. ;)
I tried to compile the engine (v0.2) on Linux (with MonoDevelop), without success. In case you are interested, here is the output of the compiler:

Code: Select all

[[email protected] MinimalChessEngine]$ TERM=xterm
[[email protected] MinimalChessEngine]$ mcs Program.cs
Program.cs(82,50): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(85,47): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(88,52): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(88,100): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(94,46): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(95,46): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(96,51): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(97,47): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(100,52): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Program.cs(100,56): error CS0136: A local variable named `searchDepth' cannot be declared in this scope because it would give a different meaning to `searchDepth', which is already used in a `child' scope to denote something else
Compilation failed: 10 error(s), 0 warnings
[[email protected] MinimalChessEngine]$ 
The binary that you provided works fine, but it's disappointing when you cannot compile yourself an open source engine, especially when it is a didactic engine, whose interest is in the source code.
Qui trop embrasse mal étreint.

mar
Posts: 2494
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: MinimalChess 0.3 released

Post by mar » Wed Mar 10, 2021 8:37 pm

great name for a chess program! https://www.youtube.com/watch?v=jp3RixPSyog
Martin Sedlak

Post Reply