"It must be a clone of some sort..."

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: "It must be a clone of some sort..."

Post by Rebel »

Wilson wrote: Sat Sep 19, 2020 11:45 am Few months ago, I opened a thread asking what we were allowed to learn/take from open source engines (basically Stockfish since it's the strongest one) and I used the Singular Extension as example since that was the algorithm I was toying with at the time. In the end, I decided not to use it because I couldn't find an implementation different enough from SF's one that wasn't significantly weaker. If I had implemented SE the Stockfish way just to gain ELO points, then probably I would have went on taking things here and there and my engine wouldn't have been mine anymore. So, I prefer it to be relatively weak and to try new things. If my search was like everyone's else, I think the probability to find something new that works would be much lower.
One (simple) idea would be to mark singular moves in the TT and extend the move in the next iteration.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: "It must be a clone of some sort..."

Post by maksimKorzh »

Joost Buijs wrote: Sat Sep 19, 2020 8:28 am
mvanthoor wrote: Sat Sep 19, 2020 1:18 am Now, if a new chess engine appears on the scene and it starts out at 3000+ ELO, my first reaction basically is:

"This must be a clone of another engine that range."

I immediately feel like disregarding it and not following any development. I followed / am following the developments of some chess engines that started out really low, such as Stash, Nadya2 and now Wukong and BBC. I'm interested to see what these people who are writing engines from scratch can achieve. (It would even be more interesting if the engines would be in some other programming language than C or C++; in this case it is only Nadya2, in Prolog.)

If you're honest, what is *your* reaction to a new engine that gets onto the scene and starts out at 3000+ ELO?
My feeling about this subject is exactly the same. Developing a strong chess engine from scratch takes several years, even for somebody with experience. Nowadays every few weeks new engines seem to pop up with ratings > 3000 and this simply can not be done without grabbing a lot from other strong open-source engines.

My current engine (the 7th rewrite from scratch) sits after several years of working on it in the region of 3200 CCRL, it started out at 2500 Elo somewhere in (2011 I believe it was). Of course it uses all the basics, PVS with a hashtable, killers, history and LMR, but everything is my own development. It would not be to difficult to add a lot of ideas from Stockfish and add NNUE evaluation to pimp it up 100 or 200 Elo, but I simply don't want to do this because it would give me the feeling that it is not my own engine anymore.
Deeply respect your position.
So do I.
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: "It must be a clone of some sort..."

Post by OliverBr »

jorose wrote: Wed Sep 23, 2020 9:40 am While I think there are definitely a lot of similarities in Winter and SF, I do think there are also a lot of differences. I'll let you make up your own mind if you feel Winter search is original. I also haven't really compared with any of the other engines around that level, so I couldn't tell you how similar they are or how different.
Do you know Ed Schröder's similarity report? (http://talkchess.com/forum3/viewtopic.php?f=10&t=71892)
It would be interesting to know Winter's score. OlIThink has about 30% similarity to other engines.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: "It must be a clone of some sort..."

Post by mvanthoor »

Joost Buijs wrote: Sat Sep 19, 2020 8:28 am My feeling about this subject is exactly the same. Developing a strong chess engine from scratch takes several years, even for somebody with experience. Nowadays every few weeks new engines seem to pop up with ratings > 3000 and this simply can not be done without grabbing a lot from other strong open-source engines.
It is one of the reasons why I have postponed writing my own chess engine for so long. "There are so many... and they're already so strong. Everything is well known already. Why add another one, and do it in C or C++... AGAIN?"

To some extent, I can identify with Michael Sherwin, of wanting to do something new. I'd have loved to be good enough with computer programming at around 1995, but I just didn't have any internet, and books about more advanced topics were quite hard to come by, so I cobbled together my own.. thing... that played ch... mostly legal moves.

Since the time that I am good enough to write a program like that (since about 2001), I've been postponing it.

As I've said many times before: Rust is _THE_ reason why I actually started to write this chess engine, because I feel I can do something (almost) new. There are a few other engines written in Rust from lower end, almost C-like engines such as Cicada, old engines that don't compile anymore even such as Crabby, and higher-end engines such as FabChess and Asymptote. However, if I don't look at them (which I didn't, beyond a cursory glance at the code), I can at least design / architect my own engine, even if I use well known search techniques and board representations.

And it's coming along quite nicely even if I do say so myself. (Still I'm sure that the architecture of this engine has been used before, somewhere, because even that is well known; especially when programming machinery and micro-controllers.)
My current engine (the 7th rewrite from scratch) sits after several years of working on it in the region of 3200 CCRL, it started out at 2500 Elo somewhere in (2011 I believe it was). Of course it uses all the basics, PVS with a hashtable, killers, history and LMR, but everything is my own development. It would not be to difficult to add a lot of ideas from Stockfish and add NNUE evaluation to pimp it up 100 or 200 Elo, but I simply don't want to do this because it would give me the feeling that it is not my own engine anymore.
I'll have to start a thread and see what stuff there's to implement. I know most of the terms and the general things that are done (such as killers, LMR, etc....) but I'd like to have some sort of guide of which would be the most useful to implement first. I'd not want to start implementing feature X, then be disappointed to gain 14 ELO, with people on here saying: "Oh, that's normal; this feature gains between 10 and 15 ELO. If you had implemented Y however, that'd gained you 150 ELO..."

So yes, do still need to learn more about various concepts, and I'll be using most of the well known concepts in the end, but they'll be completely my own implementation. The only code I'll probably use externally will be Fantom/Phyrric to search the endgame databases, because I have completely no interest in writing that at all.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
Tony P.
Posts: 216
Joined: Sun Jan 22, 2017 8:30 pm
Location: Russia

Re: "It must be a clone of some sort..."

Post by Tony P. »

jorose wrote: Wed Sep 23, 2020 9:40 am While I think there are definitely a lot of similarities in Winter and SF, I do think there are also a lot of differences. I'll let you make up your own mind if you feel Winter search is original.
I find it an understatement that it's original: the use of a logistic regression classifier in move ordering (a lot faster than A0's policy net) is what makes it unique among the TCEC caliber open-source engines, afaik, and possibly ahead of its time. If someone had better hardware and more spare time and interest in developing Winter or its fork, it would reach divP.
abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: "It must be a clone of some sort..."

Post by abulmo2 »

mvanthoor wrote: Sat Sep 19, 2020 1:18 am Writing a decent chess engine was very hard in the 70's and 80's. Computers were slow, there were only concepts (often only scientific papers), and getting help let alone source code was almost impossible... because they either were not available, or people didn't want to give you any help or source code, because chess engines were often commercial competitors. I never noticed, because in the early 80's, I'd just started saying "mama". I only know it because it's history.

With the advent of the internet for the general public it became easier in the 90's (and I did experienced some of that), and with open source engines, it became even easier in the 2000's. Information and source code are everywhere, and everybody and his grandma seems to have his or her own chess engine.

In short, back then, if you wanted to have your own chess engine, you had to be able to write it yourself.

Now, if a new chess engine appears on the scene and it starts out at 3000+ ELO, my first reaction basically is:

"This must be a clone of another engine that range."
You are a little rude. There are now many sources of information, starting with:
https://www.chessprogramming.org/Main_Page
So you can have a lot of knowledge about chess programming, without the need to copy code directly from an existing chess engine.
Then we all have our own story. Personally I started to develop an Othello engine (like Fabien Letouzey, Stéphane Nicolet, Youri Matiounine to name a few) 25 years ago. So, before starting to develop a chess engine, I already knew about alphabeta, PVS, evaluation function tuning (Texel like, but before Texel existed), bitboard, etc. Amoeba is my third chess engine. the two firsts were private and written in C. If I have released Amoeba today it would be close to the 3000+ Elo. Is Amoeba a clone ? I invented close to nothing in it. I picked up algorithms here and there, usually after reading the publication that present it, sometime from another program. But I do not copied and pasted any code in Amoeba. I even do not use existing tools to test my engine but I wrote my own tourney manager, my own evaluation weight tuner, etc. All these are written in the D language that I find both elegant and fast. Between a 1800 Elo engine (my first private half working version of Amoeba) and a 3000 Elo engine (current Amoeba level), I filled the gap by using the right algorithms for 400 Elo, tuning and testing everything for 400 Elo, and removing bugs to reach another 400 Elo enhancement.
Richard Delorme
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: "It must be a clone of some sort..."

Post by xr_a_y »

Even with very good resources (this forum, CPW, discord channels, ...), and many open sources engines as inspiration, it took me 4 years from first Weini commit (décembre 2016), to Minic going +3000.

I might also not be the best programmer..., and my test process is not that clean ... but I was very eager to learn and it seems to me that at least 2 years is a reasonable amount of time needed to tackle this from scratch. I mean, I knew nothing, really nothing about chess programming at the beginning, my first Weini search was pure alpha beta and had hard time going to depth 4 ! Weini at the beginning ran at 10knps !

But I can also very well admit that some engine authors like Milos or Ronald for instance are very skilled and that Xiphos and Rofchade, which were very strong when they were first released, are far from being clones of SF. Xiphos code being so short, clear, clean and Rofchade PST-only experiment being inspiring for every one here.

So time to develop an engine may not be the most accurate input to judge cloning. Based on what I know now, I am pretty sure I can write a 3rd engine that is 3000+ in some weeks (but I won't ... :wink: ).
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: "It must be a clone of some sort..."

Post by mvanthoor »

abulmo2 wrote: Fri Sep 25, 2020 5:12 pm You are a little rude. There are now many sources of information, starting with:
https://www.chessprogramming.org/Main_Page
So you can have a lot of knowledge about chess programming, without the need to copy code directly from an existing chess engine.
Of course. Still I can't believe that all 3000+ Elo engines that are a dime a dozen nowadays have been written from scratch... -especially- if they're written in C or C++. As said by Joost, even if you have a lot of knowledge, writing a very strong chess engine from scratch takes years. There are just many very strong engines in too short a time-span to make it believable.

So yes, I might be rude just assuming that many people copy code (or retype it)... but that's how I feel about this.
Then we all have our own story. Personally I started to develop an Othello engine (like Fabien Letouzey, Stéphane Nicolet, Youri Matiounine to name a few) 25 years ago. So, before starting to develop a chess engine, I already knew about alphabeta, PVS, evaluation function tuning (Texel like, but before Texel existed), bitboard, etc. Amoeba is my third chess engine. the two firsts were private and written in C. If I have released Amoeba today it would be close to the 3000+ Elo. Is Amoeba a clone ? I invented close to nothing in it. I picked up algorithms here and there, usually after reading the publication that present it, sometime from another program. But I do not copied and pasted any code in Amoeba. I even do not use existing tools to test my engine but I wrote my own tourney manager, my own evaluation weight tuner, etc. All these are written in the D language that I find both elegant and fast. Between a 1800 Elo engine (my first private half working version of Amoeba) and a 3000 Elo engine (current Amoeba level), I filled the gap by using the right algorithms for 400 Elo, tuning and testing everything for 400 Elo, and removing bugs to reach another 400 Elo enhancement.
That story is the entire point I'm trying to make: Amoeba started out at around 2600 on the CCRL list. I can imagine writing a chess engine that has all the basics including a TT, and a good evaluation function, which starts out at 2600. I can imagine writing that engine in the span of a year, and then releasing it. But then, to reach 3000+ level, you need to put in A LOT more work, and you obviously did. You've proven it by writing the engine in a language that is not C or C++, and you have a track record at CCRL. Your initial commit goes back to 2016, so the engine is in development for at least four years.

That's markedly different from some other engines that just suddenly appear on the scene, are tested at around 3000+ Elo or more, and are private where nobody knows where they came from.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: "It must be a clone of some sort..."

Post by OliverBr »

mvanthoor wrote: Fri Sep 25, 2020 9:08 pm Of course. Still I can't believe that all 3000+ Elo engines that are a dime a dozen nowadays have been written from scratch... -especially- if they're written in C or C++. As said by Joost, even if you have a lot of knowledge, writing a very strong chess engine from scratch takes years. There are just many very strong engines in too short a time-span to make it believable.

So yes, I might be rude just assuming that many people copy code (or retype it)... but that's how I feel about this.
I am programming chess engines since 23 years and find it hard to even reach ELO 2700 with a very own engine from scratch, even with a 32core server for testing.

How is it possible that so many new engines with appear with ELO 3000+?
That's markedly different from some other engines that just suddenly appear on the scene, are tested at around 3000+ Elo or more, and are private where nobody knows where they came from.
What is exactly the reason to keep an engine private/closed?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
brianr
Posts: 536
Joined: Thu Mar 09, 2006 3:01 pm

Re: "It must be a clone of some sort..."

Post by brianr »

OliverBr wrote: Sat Sep 26, 2020 6:28 pm What is exactly the reason to keep an engine private/closed?
In my case with Tinker, I would be simply mortified if anyone saw the poor quality of the code.

As far as sharing an .exe copy, back when Tinker was actively being worked on, there were simply too many changes to pick a stable version.
Of course, this rapid version churn (with absolutely minimal version control), is also indicative of the tendencies that produce poor code and sloppy testing procedures.

On the other hand, I have been totally willing to share any ideas that I happened to come up with, even if very few of them were original, IIRC (active development stopped more than 5 years ago).