New engine: Tcheran
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
New engine: Tcheran
Hello! It's my first time posting here - I've been working on a chess engine recently. It's recently reached a level I'm generally happy with and I'm curious to see where it would land on the CCRL rankings (both 40/15 and 2+1).
The source code is available here: https://github.com/jgilchrist/chess-engine. It's written in Rust and is buildable with a simple 'cargo build --release' from the root. If it would be better to provide binaries please let me know and I can get some uploaded.
The bot is currently registered on Lichess and is rated ~2000 ELO across Rapid, Blitz and Bullet: https://lichess.org/@/jpg-bot
Thanks,
Jonathan
The source code is available here: https://github.com/jgilchrist/chess-engine. It's written in Rust and is buildable with a simple 'cargo build --release' from the root. If it would be better to provide binaries please let me know and I can get some uploaded.
The bot is currently registered on Lichess and is rated ~2000 ELO across Rapid, Blitz and Bullet: https://lichess.org/@/jpg-bot
Thanks,
Jonathan
- Graham Banks
- Posts: 27018
- Joined: Sun Dec 18, 2005 5:47 pm
- Sign-up code: 0
- Location: Auckland, NZ
Re: New engine: Tcheran
An exe would be helpful.
We all use AVX2.
We all use AVX2.
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
I suggest releasing various versions under 'Releases' for easier tracking and distinction.
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
Thanks Gabor, you're right, I've been holding off on releasing v1.0 but now feels like the right time!I suggest releasing various versions under 'Releases' for easier tracking and distinction.
Thanks Graham, I have uploaded a Windows binary under the v1.0 release (https://github.com/jgilchrist/chess-eng ... tag/v1.0.0), compiled with AVX2. Please let me know if you have any issues running it.An exe would be helpful.
We all use AVX2.
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
Hello Jonathan,
Your exe seems OK. However, when I try to compile the source using the latest Rust I get this error message:
Your exe seems OK. However, when I try to compile the source using the latest Rust I get this error message:
As I am not a programmer I can't resolve this issue.Compiling engine v1.0.0 (E:\Sakk\compiles\Tcheran\chess-engine-1.0.0\engine)
error: git describe exited with status 128: fatal: not a git repository (or any parent up to mount point /)
--> engine\src/lib.rs:16:5
|
16 | git_describe!("--always", "--dirty=-modified")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::git_version` which comes from the expansion of the macro `git_describe` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `engine` (lib) due to previous error
Re: New engine: Tcheran
Well you can use his exe in that case.
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
Re: New engine: Tcheran
Gabor Szots wrote: ↑Wed Dec 06, 2023 7:20 am
Thanks for the hint Ray. It would have never occurred to me.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
Appreciate you trying this! Am I right in thinking that you got the source code by downloading the zip from the release? I'm using the technique causing that error to embed version information into the .exe at build time - for example my current local build reports:Gabor Szots wrote: ↑Wed Dec 06, 2023 7:02 am Hello Jonathan,
Your exe seems OK. However, when I try to compile the source using the latest Rust I get this error message:
As I am not a programmer I can't resolve this issue....
Code: Select all
id name Tcheran (v1.0-3-g123ae92)
I've tweaked the approach slightly and pushed a new v1.0 tag (and deleted the old v1.0.0 one). Now, if it's unable to find information from the repository, the version will be reported as 'unknown':
Code: Select all
id name Tcheran (unknown)
Finally, to avoid any confusion, I've removed the in-repository version in Cargo.toml which was not being used. Unfortunately, this will cause the project to stop building with the current stable Rust version (1.74.0) as support for removing this property is only available in the next Rust version, 1.75.0, which is currently in beta and will be released December 28th.
Until then, it is still possible to build the project by adding just a single line to both chess/Cargo.toml and engine/Cargo.toml specifying a version, e.g.
Code: Select all
name = "chess"
version = "0.0.0"
Last edited by jgilchrist on Thu Dec 07, 2023 11:23 am, edited 1 time in total.
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
Yes, I used the zip from the release.
I may have had succes by cloning the repository. But, IMO, the zip in the release should build to the same exe, to avoid confusion. Also, what if I want to revert to a previous version? Cloning the repository would not help then. I admit, that is quite a remote possibility.
I have currently very limited time to experiment but if I get a chance I will try your suggestions.
BTW, I am just running a tournament using the exe (1.0.0) you provided. With a bit of luck it may appear on this week's blitz list.
I may have had succes by cloning the repository. But, IMO, the zip in the release should build to the same exe, to avoid confusion. Also, what if I want to revert to a previous version? Cloning the repository would not help then. I admit, that is quite a remote possibility.
I have currently very limited time to experiment but if I get a chance I will try your suggestions.
BTW, I am just running a tournament using the exe (1.0.0) you provided. With a bit of luck it may appear on this week's blitz list.
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
I agree. That said, I can't think of a good way to have this work but continue to also have the extra version information embedded when building from the repository. I'm a bit loth to give that up as it's been so useful.But, IMO, the zip in the release should build to the same exe, to avoid confusion.
If you do have the repository cloned, you can check out any particular version by checking out the tag. The way you do that would depend on which tool you used to clone the repository - for me, if I had released a hypothetical v2.0 and then wanted to get back to v1.0 to build it I would:Also, what if I want to revert to a previous version?
Code: Select all
git checkout v1.0
I'm not sure it's worth the trouble given things will start to work as soon as Rust 1.75.0 is released in a couple of weeksI have currently very limited time to experiment but if I get a chance I will try your suggestions.
![Smile :)](./images/smilies/icon_smile.gif)
That's wonderful news! Thank you.BTW, I am just running a tournament using the exe (1.0.0) you provided. With a bit of luck it may appear on this week's blitz list.
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
I think I've come up with a better solution, which will work with the current stable Rust version and no manual file editing.
I have re-released v1.0 (https://github.com/jgilchrist/chess-eng ... s/tag/v1.0) - downloading the zip + building should 'just work'.
I have re-released v1.0 (https://github.com/jgilchrist/chess-eng ... s/tag/v1.0) - downloading the zip + building should 'just work'.
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
Indeed it does. Thank you. Is this totally equivalent with 1.0.0? Then I'm going to replace the name in my tournament to 1.0 to avoid confusion.jgilchrist wrote: ↑Thu Dec 07, 2023 3:54 pm I think I've come up with a better solution, which will work with the current stable Rust version and no manual file editing.
I have re-released v1.0 (https://github.com/jgilchrist/chess-eng ... s/tag/v1.0) - downloading the zip + building should 'just work'.
PS. Rust 1.74.1 and 1.76-nightly have been just released.
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
What does strategy do, does it make sense to change it and how to do it?
Is there a way to disable logging? That file has already grown to 25 MB.
Is there a way to disable logging? That file has already grown to 25 MB.
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
Yes, totally equivalent and I'll be following a vX.Y versioning scheme from now on so replacing the name in the tournament would be great - thank you.Indeed it does. Thank you. Is this totally equivalent with 1.0.0?
So they have - I've checked the release notes for 1.74.1 and don't see anything that would make it worth recompiling (but I'll use it to compile the next published version, unless 1.75 has been released by then). 1.76-nightly will be released every day, but I'm not using the nightly version to compile (although it would be interesting to try a playoff between v1.0 built with 1.74.1 and with the latest 1.76-nightly in case any code generation improvements result in an ELO increase).Rust 1.74.1 and 1.76-nightly have been just released.
That was inspired by https://www.youtube.com/watch?v=DpXy041BIlA - I wanted to leave the door open to trying some 'just for fun' alternative strategies in the vein of that video, but haven't explored that much yet. The default strategy is the 'serious' strategy so should definitely be the one used for tournaments.What does strategy do, does it make sense to change it and how to do it?
Ah, sorry, that's not ideal - unfortunately there is not (yet). I suppose it should also be off by default.Is there a way to disable logging? That file has already grown to 25 MB.
I've made that change in https://github.com/jgilchrist/chess-eng ... aa1a0fa446, so from the next release there'll be no default logging. For this tournament, the file can be deleted at any point without affecting the engine - or, if it'll be too much trouble, I can just submit a v1.1 with the logging switched off for participation in a future tournament.
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
No trouble at all, just leave it as it is then.jgilchrist wrote: ↑Thu Dec 07, 2023 5:45 pmFor this tournament, the file can be deleted at any point without affecting the engine - or, if it'll be too much trouble, I can just submit a v1.1 with the logging switched off for participation in a future tournament.
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
I have just seen Tcheran pop up in this week's Blitz rating list - very exciting. Thanks Gabor!
A couple of questions if you have time -
When releasing a new version of the engine, I've seen some authors post a new forum topic, and others post in their original announcement topic - is there a preferred approach?
I downloaded the games that were played to get Tcheran's initial rating. The main reason (besides curiosity) was to check for any losses on time. However, the PGNs available through the site do not list - as far as I can tell - the termination reason for the game. Some of the games ended early, but I assume that adjudication is also used for the testing. Is there a way to differentiate between a loss on time vs. a loss by adjudication? Additionally, is there any info available about the adjudication settings that are used for testing? I couldn't see anything about it on the 'about' page so I imagine it is probably left up to individual testers?
A couple of questions if you have time -
When releasing a new version of the engine, I've seen some authors post a new forum topic, and others post in their original announcement topic - is there a preferred approach?
I downloaded the games that were played to get Tcheran's initial rating. The main reason (besides curiosity) was to check for any losses on time. However, the PGNs available through the site do not list - as far as I can tell - the termination reason for the game. Some of the games ended early, but I assume that adjudication is also used for the testing. Is there a way to differentiate between a loss on time vs. a loss by adjudication? Additionally, is there any info available about the adjudication settings that are used for testing? I couldn't see anything about it on the 'about' page so I imagine it is probably left up to individual testers?
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
Hi Jonathan,jgilchrist wrote: ↑Mon Dec 11, 2023 11:56 am I have just seen Tcheran pop up in this week's Blitz rating list - very exciting. Thanks Gabor!
A couple of questions if you have time -
When releasing a new version of the engine, I've seen some authors post a new forum topic, and others post in their original announcement topic - is there a preferred approach?
I downloaded the games that were played to get Tcheran's initial rating. The main reason (besides curiosity) was to check for any losses on time. However, the PGNs available through the site do not list - as far as I can tell - the termination reason for the game. Some of the games ended early, but I assume that adjudication is also used for the testing. Is there a way to differentiate between a loss on time vs. a loss by adjudication? Additionally, is there any info available about the adjudication settings that are used for testing? I couldn't see anything about it on the 'about' page so I imagine it is probably left up to individual testers?
I don't think there is a preferred way of announcing a new version, it's the author's choice. Some authors do not announce them at all, he who discovers there is a new versions may or may not announce it at TalkChess.
We at CCRL may announce engines for each other (not always). Also, I follow engines that I know of at their github page.
You did not find games lost on time because the processing scripts remove them (at least that is my understanding). My policy is to check my PGN's for time forfeits, then I edit the PGN so that if the side losing on time would have lost anyway I remove the "forfeits on time" or similar parts so that the games are kept and an engine cannot escape a loss by refusing to move.
If you want to have time loss information I think the only way to do it is to contact the testers themselves.
Adjudication by a GUI is usually there in a comment at the end of the game. At least for games played under Arena. Adjudication rules are, as you have guessed, up to individual testers. I myself switch off adjudication for very weak engines and I loosen the rules as engine strength increases.
- Graham Banks
- Posts: 27018
- Joined: Sun Dec 18, 2005 5:47 pm
- Sign-up code: 0
- Location: Auckland, NZ
Re: New engine: Tcheran
My recommendation would be to announce any new versions both here and in the Talkchess forum.
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
Thanks Graham & Gabor.
I have recently published v1.1 of Tcheran which includes a variety of move generation optimisations, which I wanted to get into a separate release before v2.0.
https://github.com/jgilchrist/chess-eng ... s/tag/v1.1
https://github.com/jgilchrist/chess-eng ... ELOG.md#11
v1.1 is slightly stronger than v1.0 - the upcoming v2.0 includes more search pruning techniques and should be a much larger improvement.
I have recently published v1.1 of Tcheran which includes a variety of move generation optimisations, which I wanted to get into a separate release before v2.0.
https://github.com/jgilchrist/chess-eng ... s/tag/v1.1
https://github.com/jgilchrist/chess-eng ... ELOG.md#11
v1.1 is slightly stronger than v1.0 - the upcoming v2.0 includes more search pruning techniques and should be a much larger improvement.
Code: Select all
ELO | 18.5 +/- 9.4
CONF | 8+0.08 Threads=1 Hash=128MB
GAMES | N: 4096 W: 1693 L: 1475 D: 928
ELO | 16.3 +/- 18.4
CONF | 40+0.4 Threads=1 Hash=128MB
GAMES | N: 1024 W: 406 L: 358 D: 260
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
Version 2.0 of Tcheran was released yesterday with a variety of standard search pruning techniques:
In short time controls, there's a ~244 Elo increase in self-play.
In longer time controls, a slightly bigger ~275 Elo increase:
In short time controls, there's a ~244 Elo increase in self-play.
Code: Select all
ELO | 244.1 +/- 11.4
CONF | 8+0.08 Threads=1 Hash=128MB
GAMES | N: 4096 W: 2942 L: 460 D: 694
Code: Select all
ELO | 275.5 +/- 24.3
CONF | 40+0.4 Threads=1 Hash=128MB
GAMES | N: 1024 W: 772 L: 96 D: 156
-
- Posts: 1992
- Joined: Thu Aug 05, 2021 2:35 pm
- Sign-up code: 10159
- Location: Cavite, Philippines
- Contact:
Re: New engine: Tcheran
Wow, huge elo gainjgilchrist wrote: ↑Fri Jan 19, 2024 11:22 am Version 2.0 of Tcheran was released yesterday with a variety of standard search pruning techniques:
In short time controls, there's a ~244 Elo increase in self-play.
In longer time controls, a slightly bigger ~275 Elo increase:Code: Select all
ELO | 244.1 +/- 11.4 CONF | 8+0.08 Threads=1 Hash=128MB GAMES | N: 4096 W: 2942 L: 460 D: 694
Code: Select all
ELO | 275.5 +/- 24.3 CONF | 40+0.4 Threads=1 Hash=128MB GAMES | N: 1024 W: 772 L: 96 D: 156
![Shocked :shock:](./images/smilies/icon_eek.gif)
CCRL Testing Group
- Gabor Szots
- Posts: 12899
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: New engine: Tcheran
Noted.jgilchrist wrote: ↑Fri Jan 19, 2024 11:22 am Version 2.0 of Tcheran was released yesterday with a variety of standard search pruning techniques:
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
![Very Happy :D](./images/smilies/icon_biggrin.gif)
A lot of low hanging fruit there since the search implementation for v1.x was almost entirely vanilla alpha-beta and its rating was mostly due a lot of time spent profiling and optimising move generation and the simple search implementation. Plenty of easy-to-implement pruning techniques were still on the table and can now take advantage of the optimisations to search speed from 1.x. And still plenty to come!
There's also a lot of low hanging fruit in the evaluation function which is what I intend to focus on for v3.0. Currently it's just material balance and piece square tables so it often loses games due to, for example, a lack of understanding of the perils of passed pawns.
-
- Posts: 14
- Joined: Mon Dec 04, 2023 5:35 pm
- Sign-up code: 10159
Re: New engine: Tcheran
Hello all,
v2.1 of Tcheran was released today, containing two fixes resulting in Elo changes which are as follows:
STC:
LTC:
https://github.com/jgilchrist/tcheran/releases/tag/v2.1
https://github.com/jgilchrist/tcheran/b ... ELOG.md#21
v2.1 of Tcheran was released today, containing two fixes resulting in Elo changes which are as follows:
STC:
Code: Select all
ELO | 109.2 +/- 9.4
CONF | 8+0.08 Threads=1 Hash=128MB
GAMES | N: 4096 W: 2142 L: 895 D: 1059
Code: Select all
ELO | 121.4 +/- 18.5
CONF | 40+0.4 Threads=1 Hash=128MB
GAMES | N: 1024 W: 534 L: 190 D: 300
https://github.com/jgilchrist/tcheran/b ... ELOG.md#21