MinimalChess 0.6 released

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

Moderator: Ras

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: Sat Sep 11, 2021 12:16 pmI 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.
That's not how frameworks are meant to be used. It also means that when MS fixes bugs and ships updates, the users won't profit. The correct way is to offer the engine and put a link to a Microsoft page where the framework can be downloaded - but chances are users already have it installed anyway.
lithander wrote: Sat Sep 11, 2021 12:51 pmThere 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. ;)
Given that Tomitank is in JavaScript and still sits at 2900 Elo, the language isn't really that important for mid-range engines. :)
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 2:43 pm Given that Tomitank is in JavaScript and still sits at 2900 Elo, the language isn't really that important for mid-range engines. :)
But you'd have to run such an engine in nodejs or something. And that will destroy the universe.

Image

Personally, I think it's utterly crazy that we're wasting computing power by writing complete applications using web technologies. For a front-end in which a user clicks here or there or types a bit, which may need to be changed rapidly, such as an editor, or even a chess interface, fine. For code that needs high performance, I think it's crazy. I've read many an article where big websites and services are transitioning away from Javascript and Python to Go and Rust, saving millions of dollars in computation and memory costs in the cloud. Discord even switched from Javascript / Python to Go, and THEN to Rust. (Latest step detailed here .)

For hobby stuff, I think it's fine to use whatever language you please; so by all means, write a chess engine in Javascript or Python (a language of which I am of the opinion that it's fundamentally broken, especially with their "break everything on every release" mentality), but if you need software to perform real work, all the time, as fast as possible, nothing else but natively complied languages will do... or Go / C# at the very minimum if you don't want to go really low level with C, C++ or Rust..
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MinimalChess 0.6 released

Post by amanjpro »

mvanthoor wrote: Sun Sep 12, 2021 2:53 am
Ras wrote: Sat Sep 11, 2021 2:43 pm Given that Tomitank is in JavaScript and still sits at 2900 Elo, the language isn't really that important for mid-range engines. :)
But you'd have to run such an engine in nodejs or something. And that will destroy the universe.

Image

Personally, I think it's utterly crazy that we're wasting computing power by writing complete applications using web technologies. For a front-end in which a user clicks here or there or types a bit, which may need to be changed rapidly, such as an editor, or even a chess interface, fine. For code that needs high performance, I think it's crazy. I've read many an article where big websites and services are transitioning away from Javascript and Python to Go and Rust, saving millions of dollars in computation and memory costs in the cloud. Discord even switched from Javascript / Python to Go, and THEN to Rust. (Latest step detailed here .)

For hobby stuff, I think it's fine to use whatever language you please; so by all means, write a chess engine in Javascript or Python (a language of which I am of the opinion that it's fundamentally broken, especially with their "break everything on every release" mentality), but if you need software to perform real work, all the time, as fast as possible, nothing else but natively complied languages will do... or Go / C# at the very minimum if you don't want to go really low level with C, C++ or Rust..
This is actually Rust :P
BrokenKeyboard
Posts: 24
Joined: Tue Mar 16, 2021 11:11 pm
Full name: Het Satasiya

Re: MinimalChess 0.6 released

Post by BrokenKeyboard »

Rust doesnt break everything on each release. Thats why they have the editions system, rustfix, and the fact that they are never going to release a rust 2.0. Could you give some examples of code that doesnt work with the latest rustc?
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MinimalChess 0.6 released

Post by amanjpro »

BrokenKeyboard wrote: Sun Sep 12, 2021 5:49 am Rust doesnt break everything on each release. Thats why they have the editions system, rustfix, and the fact that they are never going to release a rust 2.0. Could you give some examples of code that doesnt work with the latest rustc?
Good luck compiling this: https://github.com/amanjpro/rusmtp
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 »

mvanthoor wrote: Sun Sep 12, 2021 2:53 amFor hobby stuff, I think it's fine to use whatever language you please; so by all means, write a chess engine in Javascript or Python
Yeah, what I meant was just that a JavaScript engine sitting at 2900 Elo proves that C#, which is a lot faster than JavaScript, isn't a limitation for a midrange engine.
I've read many an article where big websites and services are transitioning away from Javascript and Python to Go and Rust
Where static websites (insetad of e.g. WordPress) make sense, such as ours, they're even faster. :)
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 »

amanjpro wrote: Sun Sep 12, 2021 6:04 am Good luck compiling this: https://github.com/amanjpro/rusmtp
Challenge accepted.

Code: Select all

marcel@WORKSTATION:~/Code/rusmtp$ cargo build --release
   Compiling openssl-sys v0.9.66
   Compiling miniz_oxide v0.4.4
   Compiling num-integer v0.1.44
   Compiling ordered-float v1.1.1
   Compiling ring v0.13.5
   Compiling serde_derive v1.0.130
   Compiling regex v1.5.4
   Compiling openssl v0.10.36
   Compiling native-tls v0.2.8
   Compiling chrono v0.4.19
   Compiling flate2 v1.0.21
   Compiling serde v1.0.130
   Compiling log v0.4.14
   Compiling serde_json v1.0.67
   Compiling docopt v1.1.1
   Compiling serde-value v0.5.3
   Compiling serde_yaml v0.8.21
   Compiling protocol v0.2.0-SNAPSHOT (/home/marcel/Code/rusmtp/protocol)
warning: trait objects without an explicit `dyn` are deprecated
   --> protocol/src/lib.rs:140:31
    |
140 |                       check: &Fn(&str) -> bool,
    |                               ^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Fn(&str) -> bool`
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
    = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>

   Compiling common v0.2.0-SNAPSHOT (/home/marcel/Code/rusmtp/common)
   Compiling log4rs v0.8.3
warning: `protocol` (lib) generated 1 warning
   Compiling main v0.2.0-SNAPSHOT (/home/marcel/Code/rusmtp/main)
warning: unnecessary trailing semicolon
  --> main/src/rusmtpc.rs:83:41
   |
83 |         let rand: u64 = random::<u64>();;
   |                                         ^ help: remove this semicolon
   |
   = note: `#[warn(redundant_semicolons)]` on by default

warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
  --> main/src/clients/external.rs:56:72
   |
56 |                         error!("Couldn't write to smtp stdin: {}", why.description());
   |                                                                        ^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: `main` (bin "rusmtpc") generated 2 warnings
warning: `main` (bin "rusmtpd") generated 1 warning (1 duplicate)
    Finished release [optimized] target(s) in 17.94s
marcel@WORKSTATION:~/Code/rusmtp$
Profit.

Compiled on the latest Rust 1.55.
Fix: Install pkg-config, because the SSL crate needs this to find where "openssl.pc" is installed. "openssl.pc" is in libssl-dev. So I did "sudo apt-get install pkg-config libssl-dev", then ran "cargo build --release", and your project compiled with some warnings about using deprecated functionality. (This functionality will be removed in the next edition, but there is already a replacement now, in 1.55, which is still edition 2018.)

You're welcome. (Oh, and don't EVER use nightly features, or worse, SNAPSHOT features or crates, or you WILL get into trouble at some point.)

Back to MinimalChess :)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MinimalChess 0.6 released

Post by amanjpro »

mvanthoor wrote: Sun Sep 12, 2021 2:16 pm
amanjpro wrote: Sun Sep 12, 2021 6:04 am Good luck compiling this: https://github.com/amanjpro/rusmtp
Challenge accepted.

Code: Select all

marcel@WORKSTATION:~/Code/rusmtp$ cargo build --release
   Compiling openssl-sys v0.9.66
   Compiling miniz_oxide v0.4.4
   Compiling num-integer v0.1.44
   Compiling ordered-float v1.1.1
   Compiling ring v0.13.5
   Compiling serde_derive v1.0.130
   Compiling regex v1.5.4
   Compiling openssl v0.10.36
   Compiling native-tls v0.2.8
   Compiling chrono v0.4.19
   Compiling flate2 v1.0.21
   Compiling serde v1.0.130
   Compiling log v0.4.14
   Compiling serde_json v1.0.67
   Compiling docopt v1.1.1
   Compiling serde-value v0.5.3
   Compiling serde_yaml v0.8.21
   Compiling protocol v0.2.0-SNAPSHOT (/home/marcel/Code/rusmtp/protocol)
warning: trait objects without an explicit `dyn` are deprecated
   --> protocol/src/lib.rs:140:31
    |
140 |                       check: &Fn(&str) -> bool,
    |                               ^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Fn(&str) -> bool`
    |
    = note: `#[warn(bare_trait_objects)]` on by default
    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
    = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>

   Compiling common v0.2.0-SNAPSHOT (/home/marcel/Code/rusmtp/common)
   Compiling log4rs v0.8.3
warning: `protocol` (lib) generated 1 warning
   Compiling main v0.2.0-SNAPSHOT (/home/marcel/Code/rusmtp/main)
warning: unnecessary trailing semicolon
  --> main/src/rusmtpc.rs:83:41
   |
83 |         let rand: u64 = random::<u64>();;
   |                                         ^ help: remove this semicolon
   |
   = note: `#[warn(redundant_semicolons)]` on by default

warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
  --> main/src/clients/external.rs:56:72
   |
56 |                         error!("Couldn't write to smtp stdin: {}", why.description());
   |                                                                        ^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: `main` (bin "rusmtpc") generated 2 warnings
warning: `main` (bin "rusmtpd") generated 1 warning (1 duplicate)
    Finished release [optimized] target(s) in 17.94s
marcel@WORKSTATION:~/Code/rusmtp$
Profit.

Compiled on the latest Rust 1.55.
Fix: Install pkg-config, because the SSL crate needs this to find where "openssl.pc" is installed. "openssl.pc" is in libssl-dev. So I did "sudo apt-get install pkg-config libssl-dev", then ran "cargo build --release", and your project compiled with some warnings about using deprecated functionality. (This functionality will be removed in the next edition, but there is already a replacement now, in 1.55, which is still edition 2018.)

You're welcome. (Oh, and don't EVER use nightly features, or worse, SNAPSHOT features or crates, or you WILL get into trouble at some point.)

Back to MinimalChess :)

Amazing didn't, expect it to run. I stopped working on it at somepoint when "I thought" I had to catchup with lang... Not sure why though, mayyyybe the mac/raspbperrypi cross compilation were issues? not sure really

The snapshot module is actually part of the repo (a submoudle), so it is safe ;)


Sorry Thomas, for polluting your thread :D
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 (News)

Post by lithander »

mvanthoor wrote: Sun Sep 12, 2021 2:16 pm Back to MinimalChess :)
amanjpro wrote: Sun Sep 12, 2021 4:02 pm Sorry Thomas, for polluting your thread :D
Let me try to get back on topic then... hmmm... what are the Minimal Chess Engine news?
  • If you build from master version 0.6.1 now keeps track of mate distances and is much better at solving mate in X puzzles because it doesn't return from the search as soon as a mate is found. It continues hoping to find a shorter one and often succeeds in that after a few more plys.
  • After receiving an interesting bug report I tried to give a malus for doubled and trippled pawns which seems to be worth about 18 ELO but didn't commit it. If I start tweaking the eval now there's no end to it...
  • Version 0.6 won the Promo League 4 of Carlos777's Blitz tournament 2021 (23rd edition) and also didn't embarrass it'self in League 3.
  • Version 0.6 is also currently competing in Graham's 87th Amateur Series Division 8 which is great fun to watch imo.
  • Last but not least the first CCRL results are in and see MMC at 2452 ELO. Only 416 games so far so the score might change but it's safe to say that at this point more engines are listed below Minimal Chess than above it. And who doesn't like to be above average? ;)
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 (News)

Post by amanjpro »

lithander wrote: Mon Sep 13, 2021 1:54 am
mvanthoor wrote: Sun Sep 12, 2021 2:16 pm Back to MinimalChess :)
amanjpro wrote: Sun Sep 12, 2021 4:02 pm Sorry Thomas, for polluting your thread :D
Let me try to get back on topic then... hmmm... what are the Minimal Chess Engine news?
  • If you build from master version 0.6.1 now keeps track of mate distances and is much better at solving mate in X puzzles because it doesn't return from the search as soon as a mate is found. It continues hoping to find a shorter one and often succeeds in that after a few more plys.
  • After receiving an interesting bug report I tried to give a malus for doubled and trippled pawns which seems to be worth about 18 ELO but didn't commit it. If I start tweaking the eval now there's no end to it...
  • Version 0.6 won the Promo League 4 of Carlos777's Blitz tournament 2021 (23rd edition) and also didn't embarrass it'self in League 3.
  • Version 0.6 is also currently competing in Graham's 87th Amateur Series Division 8 which is great fun to watch imo.
  • Last but not least the first CCRL results are in and see MMC at 2452 ELO. Only 416 games so far so the score might change but it's safe to say that at this point more engines are listed below Minimal Chess than above it. And who doesn't like to be above average? ;)
2452 is really amazing, congrats Thomas, I am really happy for you and even more for MMC :)