First public release of Expositor

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

Moderator: Ras

connor_mcmonigle
Posts: 544
Joined: Sun Sep 06, 2020 4:40 am
Full name: Connor McMonigle

Re: First public release of Expositor

Post by connor_mcmonigle »

mvanthoor wrote: Thu Feb 24, 2022 9:32 pm ...
That is what I said; you can bootstrap your own engine, even by starting out with PST's only. Then add features, generate data, tune, add features, generate data, tune... and so on. It will take a lot longer than starting from a "known-good" data-set scored by a very strong engine.
I think you misunderstood what I wrote. You don't need a hand crafted evaluation function whatsoever to produce training data for a neural network. As the author of SlowChess demonstrated, it's sufficient to generate data by way of fixed depth self-play starting with a randomly initialized neural network (yielding self play games consisting of effectively random moves initially), train on some mixture of game result and fixed depth evaluation, rinse and repeat. I took a slightly more involved approach to generate a base network for Seer (described previously), but in neither case was a hand crafted evaluation function or external evaluations used.
dkappe
Posts: 1632
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: First public release of Expositor

Post by dkappe »

connor_mcmonigle wrote: Fri Feb 25, 2022 12:03 am
mvanthoor wrote: Thu Feb 24, 2022 9:32 pm ...
That is what I said; you can bootstrap your own engine, even by starting out with PST's only. Then add features, generate data, tune, add features, generate data, tune... and so on. It will take a lot longer than starting from a "known-good" data-set scored by a very strong engine.
I think you misunderstood what I wrote. You don't need a hand crafted evaluation function whatsoever to produce training data for a neural network. As the author of SlowChess demonstrated, it's sufficient to generate data by way of fixed depth self-play starting with a randomly initialized neural network (yielding self play games consisting of effectively random moves initially), train on some mixture of game result and fixed depth evaluation, rinse and repeat. I took a slightly more involved approach to generate a base network for Seer (described previously), but in neither case was a hand crafted evaluation function or external evaluations used.
+1
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
alex67a
Posts: 57
Joined: Mon Sep 10, 2018 10:15 am
Location: Denmark
Full name: Alexander Spence

Re: First public release of Expositor

Post by alex67a »

expositor wrote: Thu Feb 24, 2022 10:50 pm
alex67a wrote: Thu Feb 24, 2022 10:26 pm Expositor crash on my Pc and Arena GUI if I try to set nnue net in expositor option window...
Can you send me a copy of the command you're entering and the panic message you're getting? The panic I suspect you are getting is intentional, to prevent myself (or anyone else) from continuing when I think I've loaded a different network but haven't actually (e.g. because I made a typo).

It might be worth pointing out that Expositor is only compatible with networks trained by Expositor – there is no standard NNUE format. Also, the 256x16-lt10 net does not work without changing constants `N1` and `N2` in the source and rebuilding. I'll make a note to either remove it from the repository or add instructions explaining how to do so; my apologies if that's the source of the confusion.
I try to select a nnue file:
http://app.box.com/file/923621201422

but engine crash if restart engine
https://app.box.com/file/923623731816

So, I don't know if I use NNUE net or standard mode in Expositor
expositor
Posts: 60
Joined: Sat Dec 11, 2021 5:03 am
Full name: expositor

Re: First public release of Expositor

Post by expositor »

alex67a wrote: Fri Feb 25, 2022 5:39 pm
expositor wrote: Thu Feb 24, 2022 10:50 pm
alex67a wrote: Thu Feb 24, 2022 10:26 pm Expositor crash on my Pc and Arena GUI if I try to set nnue net in expositor option window...
Can you send me a copy of the command you're entering and the panic message you're getting? The panic I suspect you are getting is intentional, to prevent myself (or anyone else) from continuing when I think I've loaded a different network but haven't actually (e.g. because I made a typo).

It might be worth pointing out that Expositor is only compatible with networks trained by Expositor – there is no standard NNUE format. Also, the 256x16-lt10 net does not work without changing constants `N1` and `N2` in the source and rebuilding. I'll make a note to either remove it from the repository or add instructions explaining how to do so; my apologies if that's the source of the confusion.
I try to select a nnue file:
http://app.box.com/file/923621201422

but engine crash if restart engine
https://app.box.com/file/923623731816

So, I don't know if I use NNUE net or standard mode in Expositor
I'm unable to view the links you provided (the site is asking me to sign up for a trial of their paid plan, which I'm not comfortable doing). Could you send whatever it is you're sharing through another method? Sending me a private message on TalkChess would be particularly convenient.

The binaries include the default network, so you do not need to download a separate copy and do not need to set the EvalFile UCI option. Each Expositor binary works standalone.
alex67a
Posts: 57
Joined: Mon Sep 10, 2018 10:15 am
Location: Denmark
Full name: Alexander Spence

Re: First public release of Expositor

Post by alex67a »

The binaries include the default network, so you do not need to download a separate copy and do not need to set the EvalFile UCI option. Each Expositor binary works standalone.
Ok
It's clear now
thx
supersharp77
Posts: 1265
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: First public release of Expositor

Post by supersharp77 »

expositor wrote: Thu Feb 24, 2022 8:30 am Hello everyone!

I'm really excited to share the first public release of Expositor, which you can find here on Github.

I probably ought to give some background, so what follows is an introduction for myself and a history of the engine.

I'm close friends with the author of Mantissa and we both began chess programming at the same time, a bit over a year ago. For me it's been a personal hobby – besides talking with @jtwright and sporadically running a Lichess account, I've not really been involved with the computer chess community. But my goals and reasons for chess programming have changed and slowly evolved over time, and I decided somewhat recently that I finally felt ready to engage with more people.


Then I abandoned Expo 1 and began a different project. I wanted to explore some ideas related to the error distributions of evaluation functions and how error distributions changed throughout minimax trees, and to do that I needed to write some tools. I called this collection of tools "Admonitor" and it was, overall, much better written than Expo 1 (and written in Rust). Admonitor included a simple search, so naturally, I got curious and began playing him against his sister, Expo 1. Pretty soon, I was writing code for specific endgames and trying to improve move ordering and half a dozen other things, and Admonitor turned into something of a puzzle engine. Although he could beat Expo 1 handily, I was adamant about avoiding reductions and refused to consider pruning, which I felt violated the spirit of the project – in my mind, Admonitor was still a research tool that happened to be able to play chess, not a chess engine. That was a pretty severe restriction, and so Admonitor's rating capped out at 1900 or so.


Anyway, that's the story. I'm happy to answer questions if anyone has any.
This second project 'Admonitor' Project I find fascinating...Was it a real Chess engine? What kind of playing style did it have? The first two would be the original engines for the historical record...Where is Admonitor? Thx AR :) :wink:
Chessqueen
Posts: 5685
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: First public release of Expositor

Post by Chessqueen »

expositor wrote: Thu Feb 24, 2022 8:30 am Hello everyone!

I'm really excited to share the first public release of Expositor, which you can find here on Github.

I probably ought to give some background, so what follows is an introduction for myself and a history of the engine.

I'm close friends with the author of Mantissa and we both began chess programming at the same time, a bit over a year ago. For me it's been a personal hobby – besides talking with @jtwright and sporadically running a Lichess account, I've not really been involved with the computer chess community. But my goals and reasons for chess programming have changed and slowly evolved over time, and I decided somewhat recently that I finally felt ready to engage with more people.

My first engine (retroactively named "Expositor 0") was a little program written in vanilla C. This was before I knew anything about computer chess, so the interface wasn't UCI but ASCII art in the terminal. It only valued material and mobility, searched 3 or 4 ply deep (up to 12 ply in a faux quiescing search), and didn't understand all of the rules, but usually beat me unless I was patient and careful (I'm not very good at chess ^_^). Expo 0 was somewhere in the neighborhood of 1000 to 1400 Elo on Lichess, I'd guess.

I then got a little more serious and wrote Expositor 1 (also in C). She was multithreaded, used variable-shift perfect hashing for move generation, spoke UCI, printed lots of debugging information and formatted tables, and routinely got to nominal depths of 7 or 8. I'm proud of the way her multithreaded search worked: threads started from children of the root node, not the root itself, and so they operated mostly independently; they would communicate cutoffs to each other by reaching into the α/β stacks of other threads while they were running and rewriting the α/β values (all this guarded by locks, of course). The idea is ludicrous, but totally worked. Expo 1 played in the 1600 to 1700 range.

Then I abandoned Expo 1 and began a different project. I wanted to explore some ideas related to the error distributions of evaluation functions and how error distributions changed throughout minimax trees, and to do that I needed to write some tools. I called this collection of tools "Admonitor" and it was, overall, much better written than Expo 1 (and written in Rust). Admonitor included a simple search, so naturally, I got curious and began playing him against his sister, Expo 1. Pretty soon, I was writing code for specific endgames and trying to improve move ordering and half a dozen other things, and Admonitor turned into something of a puzzle engine. Although he could beat Expo 1 handily, I was adamant about avoiding reductions and refused to consider pruning, which I felt violated the spirit of the project – in my mind, Admonitor was still a research tool that happened to be able to play chess, not a chess engine. That was a pretty severe restriction, and so Admonitor's rating capped out at 1900 or so.

Eventually, I relented and conceded the fact that I wanted to write a proper chess engine, and a strong one at that, and thus Expo 2 was born. Although I still wanted to derive thorough justification for some techniques (more justification than "it gains Elo") and avoid reading other engines' source, I realized that to get where I wanted I needed to be more humble and acquaint myself with the state of the art. @jtwright helped a lot with this – he's fantastically good at reading code and very quick, and a lot of my implementations came out of conversations with him. I owe him a lot of thanks, and also all of you: it's incredible what the chess programming community has accomplished and I am immensely glad that it values libre software and sharing ideas.

Anyway, that's the story. I'm happy to answer questions if anyone has any.
Are you the type of person that explains or describes something, especially complicated ? The expositor
expositor
Posts: 60
Joined: Sat Dec 11, 2021 5:03 am
Full name: expositor

Re: First public release of Expositor

Post by expositor »

This second project 'Admonitor' Project I find fascinating...Was it a real Chess engine? What kind of playing style did it have? The first two would be the original engines for the historical record...Where is Admonitor? Thx AR :) :wink:
Was it a real chess engine? Sort of. It had a UCI interface but no concept of time control (you could give it a particular depth but would otherwise it would always search for roughly 4 seconds). Its playing style was... interesting. His ideas about the opening differed from most of his opponents, so they'd let him do what he wanted – and he'd declare a +2 or +3 pawn advantage while happily sacking two pawns. Invariably things would go downhill after that. And he'd always trade away the bishops and end up with two knights... I believe that was mostly just a result of short-sightedness.

Because Admonitor didn't prune anything (and was very conservative with reductions) it'd do reasonably well at some puzzle positions, e.g. [rk6/p1r3p1/P3B1Kp/1p2B3/8/8/8/8 w - - 0 1] which Admonitor solves in about 3 seconds

Code: Select all

Admonitor 210916+2256
position fen rk6/p1r3p1/P3B1Kp/1p2B3/8/8/8/8 w - - 0 1
go depth 18
 1   -5.49 Bxc7+
 2   -2.07 Bd5 h5
 3   -2.07 Bd5 h5 Bxc7+
 4   -2.06 Bd5 h5 Kh7 g5+
 5   -2.06 Bd5 h5 Kh7 g5+ Bxc7+
 6   -1.99 Bd5 h5 Kh7 g5+ Kh8 g4
 7   -0.16 Bd5 b4 Bxa8 Kxa8 Bxc7 b3 Kxg7
 8   +0.86 Bd5 b4 Bxc7+ Kxc7 Bxa8 b3 Be4 Kb8
 9   +0.86 Bd5 b4 Bxc7+ Kxc7 Bxa8 b3 Be4 Kb8 Kxg7
10   +1.34 Bd5 b4 Bxc7+ Kxc7 Bxa8 b3 Kxg7 Kb8 Bd5 b2
11   +2.03 Bd5 Kc8 Bxc7 Kxc7 Bxa8 Kb8 Bd5 b4 Kxg7 h5 Kh8
12   +2.50 Bd5 Kc8 Bxc7 Kxc7 Bxa8 Kb8 Bd5 b4 Kxg7 h5 Kh8 h4
13   +1.90 Bd5 Kc8 Bxc7 Kxc7 Bxa8 b4 Kxg7 h5 Kh8 Kb8 Bd5 h4 Be4
14   +2.29 Bd5 Kc8 Bxc7 Kxc7 Bxa8 b4 Kxg7 h5 Bd5 h4 Kh8 Kc8 Be4 b3
15   +2.22 Bd5 Kc8 Bxc7 Kxc7 Bxa8 b4 Bd5 Kb8 Kxg7 h5 Kh8 Kc8 Bf3 h4 Bd5
16   +2.11 Bd5 Kc8 Bxc7 Kxc7 Bxa8 Kb6 Bf3 Kxa6 Kxg7 Kb6 Kxh6 a5 Kh7 Ka7 Kh8 a4
17   +2.37 Bd7 h5 Kxh5 b4 Bc6 b3 Bxc7+ Kxc7 Bxa8 g6+ Kxg6 Kb6 Kh5 Kxa6 Be4 b2 Bd3+
18     #+5 Bd7 h5 Kf7 h4 Ke7 g6 Kd8 b4 Bxc7+
depth 18/18/25
5653 knode main
7274 knode
2213 knode/s
3.29 seconds
but Stockfish seems to struggle with.

Expositor 2 incorporates all the interesting parts of Admonitor and improves upon them, so I personally don't feel there's much value in releasing Admonitor (and it'd require me to do some work that I don't want to do – I abandoned the project in the middle of a massive expansion of the evaluator and it doesn't even compile now ^_^'). Case in point: Expositor 2 solves the puzzle above just as well if I turn down LMR and disable some pruning rules.

What do I consider to be the interesting features of Expositor 2 that originated in Admonitor? Well, the stat
Image

and trace
Image

commands have stayed pretty much the same, and I think those are vaguely interesting.* The quiescing search (which I call the "resolving search") is also quite similar, and that's something I'm proud of. (It's capable of proving mates! and it allows a few ply of quiet moves that give check so long as material is being gained, so it can catch forks and discovery threats).

*Unfortunately, these aren't available on Windows, because Expositor will only print them if it knows that stderr is a terminal but I don't know how to implement isatty for Windows yet.
Are you the type of person that explains or describes something, especially complicated? The expositor.
The name actually comes from exponentthe root of both is expōnēns. My friend and I started chess programming at the same time; his engine is named Mantissa.

I like the sentiment, though! I taught for several years while I was an undergraduate and grad student. Teaching is one of my favorite things, and something that I really care about.
cameosis
Posts: 12
Joined: Thu Sep 12, 2024 6:28 pm
Full name: tomis chagall

Re: First public release of Expositor

Post by cameosis »

would anybody have an alternative download link for Expositor 4WR02 64-bit? the github repo has been wiped clean.

according to the license under which he released the engine, a reupload is fine:
https://web.archive.org/web/20240309131 ... /expositor

»Expositor is free and distributed under the terms of version 3 of the GNU Affero General Public License (AGPL). You are welcome to run the program, modify it, copy it, sell it, or use it in a project of your own.

If you distribute the program, verbatim or modified, you must provide the source and extend to anyone who obtains a copy the same license that I am granting you.«

thanks in advance
Esse quam videri. (Marcus Tullius Cicero)
User avatar
Brunetti
Posts: 424
Joined: Tue Dec 08, 2009 1:37 pm
Location: Milan, Italy
Full name: Alex Brunetti

Re: First public release of Expositor

Post by Brunetti »

cameosis wrote: Thu Nov 14, 2024 6:14 am would anybody have an alternative download link for Expositor 4WR02 64-bit?
Hi,
you can find it here.

Alex