Where is the source code of ShashChess engine

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

Moderators: hgm, Rebel, chrisw

corres
Posts: 3657
Joined: Wed Nov 18, 2015 11:41 am
Location: hungary

Where is the source code of ShashChess engine

Post by corres »

I have downloaded the source of ShashChess ver.15.1
As I can see it is a disturbed Stockfish 12 source what can make and use learning file so it is the source of "BrainLearn ala Stockfish 12" only.
So?
Where are the code lines what convert the ideas of Shashin to the program code becoming Stockfish 12 to a real "Shahsin" Engine?
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Where is the source code of ShashChess engine

Post by Dann Corbit »

If you want to know what is different, use Winmerge or diff.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
corres
Posts: 3657
Joined: Wed Nov 18, 2015 11:41 am
Location: hungary

Re: Where is the source code of ShashChess engine

Post by corres »

Dann Corbit wrote: Sat Dec 26, 2020 9:35 am If you want to know what is different, use Winmerge or diff.
Thanks.
But I have two eyes and some knowledge so I no need to use it.
Maybe you can find any trace of Shashin ideas in ShashChess?
From the fact there are some "Shashin"noting in the search function of Stockfish the Stockfish would not become ShashChess at most only a slower Stockfish.
Moreover the essence of Shashin ideas are not the position type of Tal-Capablanca-Petrosian but a special mode (the "Shashin-mode") of the evaluation of chess positions.
Where are the "Shashin Evaluation" files??"
It is pity but there are some Stockfish clone (or derivative - these are the better) what are handled as "private" engine in most cases in closed source and "own" open source engines what are handled as own developed engines under a cover story. And the engines are no more than more or less modified Stockfish, without any supplemented value.
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Where is the source code of ShashChess engine

Post by Dann Corbit »

I used winmerge to satisfy myself that ShashChess has lots of interesting differences.
But I hit a roadblock. It uses incompatible calls to a library that simply won't link on my machine.
I guess you have to cross compile it on Linux. I have lots of Linux machines, but I lost interest in doing that after the initial effort.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
corres
Posts: 3657
Joined: Wed Nov 18, 2015 11:41 am
Location: hungary

Re: Where is the source code of ShashChess engine

Post by corres »

Dann Corbit wrote: Sun Dec 27, 2020 7:24 am I used winmerge to satisfy myself that ShashChess has lots of interesting differences.
But I hit a roadblock. It uses incompatible calls to a library that simply won't link on my machine.
I guess you have to cross compile it on Linux. I have lots of Linux machines, but I lost interest in doing that after the initial effort.
Maybe the winmerge can say to you what are the connections among the differences and Shashin ideas?
Maybe could you find the "Shashin evaluation files??"
I can see only the Stockfish 12 evaluations.
For getting differences anybody can scribble over the source of Stockfish 12. The essence is at least the Stockfish 12 can work.
If you have a working "ShashChess" you can compare its play to the ideas of Shashin. The authors of ShashChess tried to deform the stile of Stockfish getting a "Tal-Petrosian-Capablanca personality". This is the only one connection to Shashin. But this is a practical connection and not a principal connection. Any AB engines can be deformed playing with these "personalities" - at least the course of some moves. A typical example is the "Chess Master xy" program.
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Where is the source code of ShashChess engine

Post by Dann Corbit »

ShashChess is superior tactically to Stockfish.
I use it for analysis and find it extremely useful (along with Bluefish and bleeding edge SF, it is absolutely critical for a thorough analysis of a tactical position).
It is a lot of work to analyze and understand what some difference actually does.
For me it boils down to this:
1. There are lots of people who simply steal Stockfish code and do not follow the GPL, the the ShashChess authors did not do this and hence are honorable.They have done more than jam in a screwdriver and tweak a few screws.
2. The changes they made are useful. They help SF to find solutions that are otherwise missed.
3. If someone wants to understand what the changes they made mean, there are no shortcuts, because comprehension comes from the study.

This third point is very important. For instance, if I read, analyze and understand the code it will not create understanding for someone else.
The only way to understand the changes is to study them yourself. You may imagine it will be faster if someone else studies it for you. But not so. It will only mean that they understand the changes and you still do not understand the changes. One might say that it would be quicker if someone else were to point out the places where something is different. But that is exactly what winmerge does.

IMO YMMV
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: Where is the source code of ShashChess engine

Post by carldaman »

"I immediately warn that chess cannot be taught, you can only learn it yourself" - Mikhail Botvinnik to his chess school students.

8-)
amchess
Posts: 323
Joined: Tue Dec 05, 2017 2:42 pm

Re: Where is the source code of ShashChess engine

Post by amchess »

I'm a corr chess IM, computer science engineer and I deeply studied Shashin theory in his book.
To simplify at the max, as every theory there is a model and its application.
In this case, the model is not totally scientific:
4 mathematical parameters (material, mobility packaging density and expansion factor) and another (the safety), an "artistic one", as told by the author himself. A human brain can conceive this parameter intuitively and with some gold rules, but it can not be adapted to a chess engine programmatically, even because too semplicistic compared to classical eval (about 11 factors in the linear combination) and nnue (even over 1000).
So the model MUST BE the one of Stockfish (or the other engine): classical or nnue eval.
The application is the drift chart at the beginning of the book where you can find the three main positions type (Tal, Capablanca and Petrosian).
The scale of this chart is by ratio centered to 1 (not as engines centered to 0).
So, my idea was, with the right conversion, to determine the position's nature by the original engine's eval and after direct the search and the eval itself (if classical).
The goal is to solve very know Stockfish problems like hard pruning and very weak hard positions solving capabilities.
Those problems are generated because Stockfish community has FAST TIME CONTROLS as first priority in their testing framework, but it is totally unsatisfying a modern corr player and a deep analysis: a lot of potentially good moves are discarded in many cases.
Some engines (even the commercial Komodo) added buttons like lmr or null move to enable/disable the engine.
This approach is unsatisfying because the absolute strength in game play is a lot decreased.
The results obtained by our testing strategy (match play and hard positions solving) demonstrate this is the flexible approach to follow.
The drawback surely is less kn/s, but this is not a god and I'm interested overall in long time controls to offer to corr chess players a truly useful tool.
Anyway, even at short time control, the better analysis quality compensate the minor speed and the results are not so bad.
Potentially, a lot of official discarded patches and even official ones can be applied in a flexible way by Shashin theory (so that when needed).
A lot of work and potential improvements: the only difficult is to find people available to tests....
As told above, Winmerge is enough to see my work (aprreciated also by some stockfish community member).
I tried to be coincise and clear.
Thanks anyway to have given me the possibility of those explications.
Andrea Manzo
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Where is the source code of ShashChess engine

Post by Dann Corbit »

I think your approach is very valuable.
It won't generate the winner in 10,000 blitz game contests that nobody is ever going to examine (and why would they? Blitz/Lightning evaluations are not very strong).
But it has a good chance of finding the right answer when you let an engine think for a day.
In other words, it does something that is actually useful.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Cornfed
Posts: 511
Joined: Sun Apr 26, 2020 11:40 pm
Full name: Brian D. Smith

Re: Where is the source code of ShashChess engine

Post by Cornfed »

Dann Corbit wrote: Sun Dec 27, 2020 6:30 pm I think your approach is very valuable.
It won't generate the winner in 10,000 blitz game contests that nobody is ever going to examine (and why would they? Blitz/Lightning evaluations are not very strong).
But it has a good chance of finding the right answer when you let an engine think for a day.
In other words, it does something that is actually useful.
How about letting ShashChess 'chew on' a given position for say 15-20 min compared to the latest Stockfish doing the same? I ask because relatively few people let an engine analyze a position for a day or even overnight...but rather use it to guide them in evaluating positions and especially in games already played or for ideas to 'potentially' update one's OTB opening book.