MinimalChess 0.6 released

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

Moderator: Ras

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

MinimalChess 0.6 released

Post by lithander »

I have just released the binaries of a new version 0.6 of MinimalChess.

https://github.com/lithander/MinimalChe ... s/tag/v0.6

This version uses an improved transposition table with two buckets and aging. It also adds late move reductions and deep futility pruning. Quiet moves are now sorted based on a simple history heuristic which has shown a nice synergy with LMR. The PST based evaluation is updated incrementally.

In total these changes allow MinimalChess to search twice as deep but at the cost of missing some good moves do to the more aggressive pruning and reductions. I'm a bit worried that this might affect it's playstyle negatively but at least in my engine vs engine tests it gained about 200 ELO in playing strength over the previous version.

The removal of the triangular PV table and other simplifications mean that the size of the codebase is about equal to the previous version.

And a personal note:

Over the time the process of developing the engine has shifted from being about solving interesting programming puzzles (which I enjoyed) more and more to meticulously testing different potential viable implementations in large engine-vs-engine tests. I didn't enjoy that quite as much. The temptation is high to look at other engines source code to streamline the testing process by narrowing what you try down to something more closely resembling what has worked for others. But for hobby projects I like learning by doing much more then studying established practices. So I think this might be the last engine release for a while from me.
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MinimalChess 0.6 released

Post by amanjpro »

Congrats Thomas, and I must agree with you... the tweaking phase of engine development is the least fun part...

Probably adding NNUE or something along this line might make it fun again, maybe NN for move ordering? or outright for eval?
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 »

In MinimalChess I use the simplest expression of a solution (and not the fastest one) and for the longest time I felt that it helped me avoid bugs and implement new features faster.

But that has changed when progress became ultimately about testing. I was briefly considering to buy a new computer with twice the amount of cores so that I could run twice the amount of tests in the same time. But you know what would have the same effect and be much cheaper? To make an effort double the NPS of the engine and then halve the time control. With the added benefit of the engine gaining 100 ELO or something just because it would be much faster now.

There are move generators that are orders of magnitude faster. And it's not beyond reach to do something similar in C#. But 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#. And more similar to the other engines out there.
amanjpro wrote: Mon Aug 30, 2021 3:04 am Probably adding NNUE or something along this line might make it fun again, maybe NN for move ordering? or outright for eval?
Yeah, that's interesting for sure. But I would want to train my own networks based on games that MMC has played. Generating data will take lots of time. Training nets will take a lot of time. Testing will take a lot of time. I don't think it really solves my problem. ;) A speedier foundation would be most helpful here, too.

If I decide to fully embraces the competitive nature of chess programming I'd rather start from scratch with a new engine that is not trying to be simple but as fast as possible.

Or I could add to the video series that was meant to chronicle the development of MMC. I could make a video about each of the major features currently implemented. Try to make the engine more useful to other beginners like me...

Or I could make a port of minimal chess to one of the more exotic languages that I always wanted to try like Zig or Nim.

Or I could learn to actually play better chess myself instead programming engines that do that for me. ;)
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MinimalChess 0.6 released

Post by amanjpro »

I don't think you need to start with generating own data for MMC NNUE, the steps can be:

- Implement a trainer
- Get some data
- Train with the trainer
- Replace eval with the trained NN
- test
- If it proved to be useful, then you can go ahead and generate own data, I am sure there are people who do not mind donating their CPU to generate data for you


BTW, for generating data, you really don't need all that much time, you can play games with fixed depth (standard is 9), and each game literally takes a second or two. I generated around 200K games in one night, you need a few times that much... a week of data generation? or something like this
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 »

amanjpro wrote: Mon Aug 30, 2021 4:20 pm - Implement a trainer
- Get some data
- Train with the trainer
- Replace eval with the trained NN
- test
- If it proved to be useful, then you can go ahead and generate own data, I am sure there are people who do not mind donating their CPU to generate data for you
Yeah, makes sense to do it in that order and to only generate and use your own data as a finishing touch. How far are you into that process with Zahak? Will the next version feature a NNUE eval?
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MinimalChess 0.6 released

Post by amanjpro »

lithander wrote: Tue Aug 31, 2021 10:40 am
amanjpro wrote: Mon Aug 30, 2021 4:20 pm - Implement a trainer
- Get some data
- Train with the trainer
- Replace eval with the trained NN
- test
- If it proved to be useful, then you can go ahead and generate own data, I am sure there are people who do not mind donating their CPU to generate data for you
Yeah, makes sense to do it in that order and to only generate and use your own data as a finishing touch. How far are you into that process with Zahak? Will the next version feature a NNUE eval?
I haven't done much really, I have created 16M fens for start posisions (to use for my self-play games), read a bit about NN and that is it
My goal is, to reach 2800 points at least before I try NN, why 2800? because the stronger the engine eval/search, the better optimzied the network will be

So, I expect Zahak 6 to come with no NN, but Zahak 7 to come with one

I believe, my dev version is somewhere around 2780 or so, so I am not all that far from version 6 maybe?
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: Mon Aug 30, 2021 1:27 am I have just released the binaries of a new version 0.6 of MinimalChess.

https://github.com/lithander/MinimalChe ... s/tag/v0.6

This version uses an improved transposition table with two buckets and aging. It also adds late move reductions and deep futility pruning. Quiet moves are now sorted based on a simple history heuristic which has shown a nice synergy with LMR. The PST based evaluation is updated incrementally.

In total these changes allow MinimalChess to search twice as deep but at the cost of missing some good moves do to the more aggressive pruning and reductions. I'm a bit worried that this might affect it's playstyle negatively but at least in my engine vs engine tests it gained about 200 ELO in playing strength over the previous version.

The removal of the triangular PV table and other simplifications mean that the size of the codebase is about equal to the previous version.

And a personal note:

Over the time the process of developing the engine has shifted from being about solving interesting programming puzzles (which I enjoyed) more and more to meticulously testing different potential viable implementations in large engine-vs-engine tests. I didn't enjoy that quite as much. The temptation is high to look at other engines source code to streamline the testing process by narrowing what you try down to something more closely resembling what has worked for others. But for hobby projects I like learning by doing much more then studying established practices. So I think this might be the last engine release for a while from me.
Congratulations :)

You should be around 2450 now. As you may have noticed I've been out of the loop for some time. I've not given up on chess engine development; just being very busy with work, and in my spare time I transitioned my entire workflow to Linux. Today I've picked up where I left off by rerunning my last test, to determine which of the improvements I last made (in July) should go into the master branch.

Rustic 4 will be somewhere around 2150 (guesstimate), so it will take quite some time to catch up to MinimalChess 0.6. I'd need to implement null move, LMR, history, and some kind of mobility for that. (At least.)

Good work on your side.

And yes, somewhere around 2500 is the place where testing all of the evaluation terms is going to play a big role, and adding smaller and smaller improvements to the search....
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
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: Mon Aug 30, 2021 12:35 pm Zig
Go wash your mouth with soap. Twice.

IMHO, Zig is just a pared down Rust. If you want to use something exotic, go for Ada. Or Object Pascal (which is an exotic, nowadays).
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
Ras
Posts: 2751
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: MinimalChess 0.6 released

Post by Ras »

lithander wrote: Mon Aug 30, 2021 1:27 amThe temptation is high to look at other engines source code to streamline the testing process by narrowing what you try down to something more closely resembling what has worked for others.
And then it still doesn't just work so that you still need lots of testing. BTDT. Oh, and congrats for the release!
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. ;)
mvanthoor wrote: Sat Sep 11, 2021 12:46 amI transitioned my entire workflow to Linux.
See how nice the cookies are in Antarctica. :)
Rasmus Althoff
https://www.ct800.net
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 »

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.)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL