Your motivation for writing a chess engine?

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

Moderators: hgm, Rebel, chrisw

User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: Your motivation for writing a chess engine?

Post by xr_a_y »

mvanthoor wrote: Fri Mar 05, 2021 9:23 pm
xr_a_y wrote: Fri Mar 05, 2021 8:45 pm But it takes a lot of time indeed and is too much addictive probably, time which is not for something or someone else.
This is always the problem.

There are people in this world who are of the opinion that "If it doesn't gain you any money right now, or in the future, it's not worth doing." So go live like a Ferengi, earn money every second you're awake...

Just burn all of your non-fiction books. Reading them costs time.
Put the piano into the fireplace. Practicing it costs time.
Don't go hiking. It takes time, and besides seeing a few forests or mountains, it gets you nothing.
Why ever watch a program on TV?
Never go out to dinner. It costs time AND money. Oh Horrible Life!
That is indeed a choice at the end. But it sometimes feels too much addictive to me.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Your motivation for writing a chess engine?

Post by JohnWoe »

mvanthoor wrote: Fri Mar 05, 2021 9:19 pm
JohnWoe wrote: Fri Mar 05, 2021 7:55 pm I wasn't very happy tinkering around with weak Sapeli 1900 - 2000 Elo. Original or not. I was stuck at 1900 Elo.
On the CCRL list I was around 100% original (~2000 Elo) weak engines: Vice, Wutang (Maksim Korch), MicroMax (hgm) ...
This is the company where you end up with 1 man + 100% original approach.
Thanks for the prediction. It's nice to know that I'll never ever break 2100.

IMHO, this is bullocks.

Vice is a tutorial engine, never meant to be as strong as possible, but to show and explain concepts.
Wukong is a tutorial engine as well.
Wuttang is a port of Vice to Javascript (if I remember correctly) , but not by Maksim Krozh.
MicroMax tries to be the smallest program counted in number of characters in the world.

Those are programs with different goals than being the strongest engine ever.
I just wanted the title. Not the prettiest and most original approach but I got there.
Like they say in America. "if you ain't cheating you ain't trying".
...
Open source is too stressful for me. So Mayhem will be my only OSS contribution.
In chess engines there's no money nor fame. Chess programming is just labour of love.
OMG. I think you should actually quit programming chess engines. If all you're doing this for is to see your engine as high up on the list as possible, then by all means go the Fat Fritz route. Grab Stockfish, some net training tools, train your own net, throw it in there, and release it as "your own" engine, and you'll be done. A week or so, and some waiting is all it takes.

Remind me to quit, as soon as I feel that the Elo number is the only thing I'm doing this for. That is just a nice thing aside, that someone else but myself (so, hopefully, independent) tests my engine, and I can see it improve from one version to the next.

And to be honest, I see no reason except for time to research, and computer power, why I couldn't reach 2850+ or even 3000 Elo+ in time, with a single-threaded engine, without adding NNUE. Many other people did. Some did it 15 years ago. Some reached 2250+ almost 30 years (!) ago. (Yes people... the 80486 DX is over 30 years old now. A massively powerful CPU in its time, but no more than a calculator compared to what we use now. And they wrote 2250+ chess engiens for it.)
I have already retired from 8x8 chess :D
I'm gonna still release Mayhem 3.4 as I made some massive improvements.
While working on Havoc.

You don't want Mayhem engine?
Mayhem isn't actually on any rating list atm AFAIK
They can test whatever they want. I'm not blaming them at all.
Because I actually don't even care about rating lists.

I like that someone independent confirms progress. Like mr. Sylwy
As my Elo gains are too positive always.

Is Mayhem original or not? Just look at the source code. It's more original than 99% engines.
I didn't start from 2100 Elo Vice template. Or 1800 Elo TSCP. I started from 0 Elo and went to 2800 Elo. I gained +2800 Elo.
Not that there's anything wrong starting with templates.

But if I participate to the World Champs or smt w/ Mayhem I'll argue to ad nauseam on Mayhem's originality. Mayhem is still 99.9% of my work.
They'll better come up with good stuff. As I know Mayhem's code as I have typed every character.

Mayhem now has good classical evaluation as I copy-pasted Pesto too. It's 100% original w/o nnue :lol:
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Your motivation for writing a chess engine?

Post by maksimKorzh »

JohnWoe wrote: Fri Mar 05, 2021 7:55 pm I think becoming a grandmaster. Passing the 2500 Elo mark was nice.
Was my main motivation with Mayhem. Mayhem is still 99% of my own code. Besides some NNUE grab.

I actually hit 2800 Elo. Barely. But I got there: http://talkchess.com/forum3/viewtopic.p ... 23#p880623

I wasn't very happy tinkering around with weak Sapeli 1900 - 2000 Elo. Original or not. I was stuck at 1900 Elo.
On the CCRL list I was around 100% original (~2000 Elo) weak engines: Vice, Wutang (Maksim Korch), MicroMax (hgm) ...
This is the company where you end up with 1 man + 100% original approach.

I just wanted the title. Not the prettiest and most original approach but I got there.
Like they say in America. "if you ain't cheating you ain't trying".

I still like improving my programs.
I like seeing my engines get better.
I started Havoc from:

Code: Select all

int main() {
  return 0;
}
And kept going. Now I'm 2000-2100 Elo. And improving.

Open source is too stressful for me. So Mayhem will be my only OSS contribution.
In chess engines there's no money nor fame. Chess programming is just labour of love.
Actually WukongJS, not Wutang ;)
Wutang is Vice rewritten in C++ with mistuned eval and weird dumb LMR that slices even useful nodes, it searches twice deeper than vice but around 70 Elo weaker because of that.
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Your motivation for writing a chess engine?

Post by maksimKorzh »

Chess programming helps me in learning new technologies, for instance now I'm learning cross-platform GUI framework electron js by writing Chiness chess GUI inspired by legendary CCBridge. In the past chess programming motivated me to become a programmer which resulted in changing my life and profession completely when I was 30 years old. Teaching others chess programming basics and showcasing my hobby projects on youtube results in getting freelance programming jobs from time to time.
User avatar
hgm
Posts: 27814
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Your motivation for writing a chess engine?

Post by hgm »

Well, first of all it is a hobby, so the most important thing is that it is fun to do.

Ever since I learned to play Chess I was intrigued by the fact that a value could be assigned to them. Which supposedly were the consequence of the way they moved, but in a non-trivial way. This mystified me, and I wondered what the value of pieces with unorthodox moves would be, and how these could ever be determined. Writing computer programs that would use such pieces seemed a good way to investigate that. When I learned to program as a math student, I became intrigued by computers anyway.

That the spin-offs of the things I do for pleasure also benefit thousands of others, is also a nice feeling; at least my hobbies aren't a total waste of time.
jefk
Posts: 626
Joined: Sun Jul 25, 2010 10:07 pm
Location: the Netherlands
Full name: Jef Kaan

Re: Your motivation for writing a chess engine?

Post by jefk »

trying to write a complete chess engine -from scratch- in whatever programming language is obviously an interesting exercise to learn more of that programming language; with of-course looking to other sources, but also trying to decipher/understand such sources of the parts you need in depth (mostly C/C++).Thereby it also depends i think if you play chess yourself as a human, and
at what level; if so, then then you know the limitations of most 'engines' (**)

For the rest no comments on Hgm's post well expect maybe; are you willing to make the sources of 'joker' opensource? ( just wondering).

But once your program works and complies by the rules, in line with some comments by towforce, i don't see much reason to continue. If you (mvanthoor) would like to continue in in chess programming (personally i find the wide field of general AI much more interesting), there would be a balance to a) finding unique features not yet implemented in other engines, and programming that, and/or b) contributing to projects like Rodent-IV (IMO far more interesting than FF2 with some debugging(*)
b) making the search at low Elo levels even more human like (instead of just reducing depth, as now apparently is being done.
c) converting Rodent-III personalities to RodentIV (not so easy as you might think)
d) etc.

(*) https://github.com/nescitus/rodent-iv/issues/7
https://www.chess.com/forum/view/chess- ... ess-engine

https://github.com/nescitus/rodent-iv
Apparently now a Japanese programmer has joined the Rodent project
(whereby Pawel K hasn't time anymore for this awesome program
due to a good job apparently) but there's no new release (yet?)

Meanwhile i found the little known upgrade of the 'Danasah;
program ; also very interesting; and (importantly) easy to use:
https://sites.google.com/site/danasah/e ... #h.p_ID_38
apparently first made by Pedro Castro but a later upgrade 830ls
by Daniel Shawul (?) ; couldn't find the source codes..
But it's interesting because of 1) some apparently rather accurate
set_Elo options, and 2) possible use of polyglot book

(**) still at the moment most engines don't care about how many move
options there are, whereby this is very important for a human.
In the past i mentioned 'sharpness' (besides actual game statistics and minimaxed score) as an important item for the theoretical 'best' software opening book (maybe later a new Polygot-extended tool or so (just wondering). But in actual game play it's also important. High rated engines have no problem with defending eg. against play in Tal style; but obviously had. IMO -besides the set_Elo option, an ideal engine to play vs humans should have an optional parameter of human play (lets say determined by nr of valid moves +/- eg. -.7 pawn or so) for the opponent; if you can reduce that number of moves, you increase 'sharpness' and in a human game, you would increase your winning chances. Not a new idea, GM Finegold also mentions such limitations of 'engines' somewhere in his youtube lectures. Maybe this also is the reason that maybe chess masters discourage you from analyzing a played game with an engine; their advice: first analyze yourself, only then at last, check your own (slow) analysis with a (top) engine to find possible other tactical ideas you missed.
Ras
Posts: 2488
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Your motivation for writing a chess engine?

Post by Ras »

mvanthoor wrote: Fri Mar 05, 2021 12:32 pmThen why write a chess engine at all, nowadays?
I saw the nice H405 development board with a Cortex-M4 microcontroller and wanted to do something with that, and a chess computer was the first best thing I came up with. I wanted to port the strongest OSS engine in C that had any hope to be ported to the target platform. NG-Play qualified because it "only" required twice as much RAM as I had - without hashtables.

But then the chess programming addiction kicked in, and the current version sits 200 Elo above the baseline, which also means that the fork is distinct from the original. While it isn't the strongest engine on such hardware, it's probably the strongest OSS engine.
Rasmus Althoff
https://www.ct800.net
jonkr
Posts: 178
Joined: Wed Nov 13, 2019 1:36 am
Full name: Jonathan Kreuzer

Re: Your motivation for writing a chess engine?

Post by jonkr »

There are a lot of things I like about chess programming.
  • Curiosity : think of some experiment to run, make some changes, then run a test or match to see the results. It's fun to experiment with.
  • I like being able to measure results. Maybe most of the things I do aren't advancing towards actual chess truth, but I can do some work and see my program's results improve.
  • I just like programming, and with chess I can work on something that is entirely mine, and doesn't have any deadlines.
  • I like watching my program battle it out even though I'm a bad chess player myself. And seeing Slow announce deep mates.
  • When I was adding eval terms myself is was nice seeing them come to play in actual games.
    For example I saw this win in TCEC FRC against Minic https://tcec-chess.com/#div=frc3lb&game=12&season=20.
    V("BISHOP_STUCK_BLOCKED_PAWN", SB(-43, -51)); // Stuck on back rank, any forward directions blocked by blocked pawns )
    This term came into play even though it would impossible for me to measure elo difference from it, by move 30 Slow has Minic's bishop is out of play.
  • Learning new stuff might be useful, who knows. (Like neural nets and tensorflow.)
Of course there are negatives too.
  • It is pretty pointless, but so are most hobbies. I just mostly don't think about how the strongest programs are open source and free. And I'm starting from scratch just for fun, and struggling through implementing, optimizing and tuning what are mostly known techniques.
  • Takes a lot of time to make progress, always more to do. And it makes no money.
I've mostly stopped after Slow 2.5 due to starting a new job. (I'm using my chess computer too for the job so haven't been running chess training. But someday I'll probably buy a new chess computer and just tinker with code a bit, then have it testing/improving on its own. Sounds pointless but so far I've always come back to it.)
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: Your motivation for writing a chess engine?

Post by xr_a_y »

jonkr wrote: Mon Mar 08, 2021 2:33 am
  • For example I saw this win in TCEC FRC against Minic https://tcec-chess.com/#div=frc3lb&game=12&season=20.
    V("BISHOP_STUCK_BLOCKED_PAWN", SB(-43, -51)); // Stuck on back rank, any forward directions blocked by blocked pawns )
    This term came into play even though it would impossible for me to measure elo difference from it, by move 30 Slow has Minic's bishop is out of play.
Good point, but here Minic was playing with a net, so it is hard to say that this "feature" was not covered. Even when using HCE, Minic has a quite strong mobility term for bishop and I guess this situation is taken into account. I think Slow is simply outplaying Minic here, not because of a particular term in evaluation but because it is as a whole stronger.
glav
Posts: 41
Joined: Sun Apr 07, 2019 1:10 am
Full name: Giovanni Lavorgna

Re: Your motivation for writing a chess engine?

Post by glav »

Great thread. Our community would be today well served not from another engine that pushes the Elo limit another 100 points or so (though would be nice). What is really missing today is an engine that can explain in more or less human understable terms what is going on in a given position. Even a 2600 engine that does that would preferable to me to the latest lc0 running on the best hardware. Some GUIs have taken this job by explaining things in a more structured way, as the latest video by Charles Bicknell shows very well ( Another interesting project in this sense is Decode chess, but still I find their technology a little rudimentary (https://decodechess.com/). I know that this is a very hard project to accomplish, but it is what the community of players need most.