MinimalChess 0.6 released

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

Moderator: Ras

User avatar
Rebel
Posts: 7515
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: MinimalChess 0.6 released

Post by Rebel »

I will put MinimalChess on the GRL TODO list.

But why is the executable 18.9 Mb?

Sounds more as MaximumChess :wink:
90% of coding is debugging, the other 10% is writing bugs.
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MinimalChess 0.6 released

Post by amanjpro »

Rebel wrote: Sat Sep 11, 2021 1:29 am I will put MinimalChess on the GRL TODO list.

But why is the executable 18.9 Mb?

Sounds more as MaximumChess :wink:
It is written in C#, and to save the burden of forcing the user to install .NET separately it ships with one

The actual engine is written in some 700 lines of code only


The expected rating is about 2500
User avatar
Rebel
Posts: 7515
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: MinimalChess 0.6 released

Post by Rebel »

Gauntlet MinimalChess 06

Games : 1000

Elo pool : 2488

http://rebel13.nl/b/grl.htm
90% of coding is debugging, the other 10% is writing bugs.
Cornfed
Posts: 511
Joined: Sun Apr 26, 2020 11:40 pm
Full name: Brian D. Smith

Re: MinimalChess 0.6 released

Post by Cornfed »

mvanthoor wrote: Sat Sep 11, 2021 1:21 am
Ras wrote: Sat Sep 11, 2021 1:15 am
mvanthoor wrote: Sat Sep 11, 2021 12:46 amI transitioned my entire workflow to Linux.
See how nice the cookies are in Antarctica. :)
Not that I had any problems with Windows, but I just REALLY dislike where they are going with it since Windows 8. (But that's for a different thread or a PM as not to pollute Thomas' thread.)
Many find 10 so much better in so many ways...11, TBD.
User avatar
Rebel
Posts: 7515
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: MinimalChess 0.6 released

Post by Rebel »

New entry - MinimalChess 06 : 2421

Code: Select all

Gambit Rating List
Running      : gauntlet MinimalChess 0.6
Time Control : Time control : 40/120
Games        : 1000

Results from file gauntlet-MinimalChess.pgn:

No. Name             Win Draw Loss Unf.  Score Games       %
------------------------------------------------------------
  1 MinimalChess 06 +273 =233 -494   *0  389.5  1000   39.0%
  2 Nalwald 1.8.1   +114  =54  -32   *0  141.0   200   70.5%
  3 Loki 3.5.0       +90  =57  -53   *0  118.5   200   59.2%
  4 Monolith 0.3     +96  =45  -59   *0  118.5   200   59.2%
  5 Orion 04         +97  =39  -64   *0  116.5   200   58.2%
  6 CT800 1.42       +97  =38  -65   *0  116.0   200   58.0%

Total Games:    1000
White Wins:      368 (36.8%)
Black Wins:      399 (39.9%)
Draws:           233 (23.3%)
Unfinished:        0 (0.0%)

Estimated ratings for this elo 2488 pool
 
   # PLAYER             :  RATING  POINTS  PLAYED   (%)
   1 Nalwald 1.8.1      :  2574.2   141.0     200    71
   2 Loki 3.5.0         :  2487.1   118.5     200    59
   3 Monolith 0.3       :  2487.1   118.5     200    59
   4 Orion 04           :  2479.9   116.5     200    58
   5 CT800 1.42         :  2478.1   116.0     200    58
   6 MinimalChess 06    :  2421.5   389.5    1000    39
Not bad at all for 700 lines of code :wink:
90% of coding is debugging, the other 10% is writing bugs.
User avatar
lithander
Posts: 925
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: MinimalChess 0.6 released

Post by lithander »

Rebel wrote: Sat Sep 11, 2021 1:29 am But why is the executable 18.9 Mb?

Sounds more as MaximumChess :wink:
I thought that users would be more bothered with having to download and install the .Net Runtime on their system than with having to download a larger but self contained executable.

The actual chess engine specific binary is a 36KB sized DLL called MinimalChess.dll (for basic chess playing logic) and a 13KB sized DLL called MinimalChessEngine.dll (implementing the UCI interface and time control logic) and that's quite small I think.

When I say the engine has 700 LOC what is counted there (by Visual Studio, it's an established metric for C# programs) is the number of Intermediate-Language instructions. The code get's compiled into ~450 instructions for MinimalChess.dll and ~150 instructions into the MinimalChessEngine.dll.

So I think that's not much but of course you still need a .Net Runtime to execute any of that. The advantage that C/C++ has is that the executables can be small because the runtime is already pre-installed on all OS. I'm sure most of you know that already but if you compile your chess programs statically you'll end with a much bigger executable (some megabytes, but certainly noth 20) too.
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
User avatar
lithander
Posts: 925
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: MinimalChess 0.6 released

Post by lithander »

Rebel wrote: Sat Sep 11, 2021 11:49 am New entry - MinimalChess 06 : 2421

Code: Select all

Gambit Rating List
Running      : gauntlet MinimalChess 0.6
Time Control : Time control : 40/120
Games        : 1000

Results from file gauntlet-MinimalChess.pgn:

No. Name             Win Draw Loss Unf.  Score Games       %
------------------------------------------------------------
  1 MinimalChess 06 +273 =233 -494   *0  389.5  1000   39.0%
  2 Nalwald 1.8.1   +114  =54  -32   *0  141.0   200   70.5%
  3 Loki 3.5.0       +90  =57  -53   *0  118.5   200   59.2%
  4 Monolith 0.3     +96  =45  -59   *0  118.5   200   59.2%
  5 Orion 04         +97  =39  -64   *0  116.5   200   58.2%
  6 CT800 1.42       +97  =38  -65   *0  116.0   200   58.0%

Total Games:    1000
White Wins:      368 (36.8%)
Black Wins:      399 (39.9%)
Draws:           233 (23.3%)
Unfinished:        0 (0.0%)

Estimated ratings for this elo 2488 pool
 
   # PLAYER             :  RATING  POINTS  PLAYED   (%)
   1 Nalwald 1.8.1      :  2574.2   141.0     200    71
   2 Loki 3.5.0         :  2487.1   118.5     200    59
   3 Monolith 0.3       :  2487.1   118.5     200    59
   4 Orion 04           :  2479.9   116.5     200    58
   5 CT800 1.42         :  2478.1   116.0     200    58
   6 MinimalChess 06    :  2421.5   389.5    1000    39
Not bad at all for 700 lines of code :wink:
Thanks for including MMC in your Gambit list, Ed!

It's great to see that MMC is (almost) in state where it can keep up with the big kids!
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
User avatar
lithander
Posts: 925
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: MinimalChess 0.6 released

Post by lithander »

mvanthoor wrote: Sat Sep 11, 2021 12:46 am Congratulations :)
Welcome back! I started to fear the new cats might have eaten you or something! :)
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: MinimalChess 0.6 released

Post by mvanthoor »

lithander wrote: Sat Sep 11, 2021 12:24 pm Welcome back! I started to fear the new cats might have eaten you or something! :)
Nah. Cats are fine (I'll send you some pictures as promised), I've just been very busy with work during the day, and transitioning my personal system over to Linux in the evening, one piece at time. I only need to figure out how to port my gpg / git signing keys from the Windows installation to Linux, and I should be good to go again. Everything else already works, including the games I had installed on Windows 8-)

(I'll pare down the Windows installation and keep it; it's on its own SSD. I may need it somehow, before I write off this system.)

This night I ran the first test to see which refactorings actually work (still one to go), and after I port those keys, I'll update the master branch. Then I'll be good to go and write the tuner for version 4. That will (hopefully) put me beyond my first target (2100), and then I'll be able to try and reach the next (2500).
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
lithander
Posts: 925
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: MinimalChess 0.6 released

Post by lithander »

Ras wrote: Sat Sep 11, 2021 1:15 am
lithander wrote: Mon Aug 30, 2021 12:35 pmBut if I replace everything that is simple but a bit slow with established faster alternatives MinimalChess would lose it's identity. Not simple anymore. Not compact. Not written in idiomatic C#.
That's one nice thing about C: I just labelled my project as "high performance hack", and that's perfectly idiomatic C in its own right. Which is also a downside of C. ;)
That's true. No-one's going to critisize you for writing cryptic C code. It starts with the variable names who rarely have more then 2 characters in most sources I've come across... ;)

But in all seriousness: C/C++ is perfect if you want full control. If speed is your focus and you got the skills it's one of the best language choices, no doubt about it. But I think it would be unfair to judge C# by how fast (or rather slow) an engine like MinimalChess is. I focused on simplicity over speed.

I've learned the basics about chess programming now. And I've been exposed to the competitive nature of the community long enough that I want to start from scratch and make something fast. And of course C/C++ would be the obvious choice but I think it would also be interesting to see how to squeeze maximum performance out of C#.

There are still only a few C# engines... the personal goal of making the strongest C# engine around would not be quite as lunatic as wanting to compete with Stockfish and peers. ;)
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess