Comments on https://lichess.org/@/hollowleaf/blog/chess-web-programming-part-two-stockfish/PdeOTODf
It’s a highly advanced program designed to analyze chess positions and calculate the best possible moves.
We might very well be using it that way, but it this is not the goal of its desing. It is optmized for winning engine tournament not for analyis or to help humans analsyse their chess positions. It just happens it can oracle smoe move scores for us, but if it were really designeed for that the they would not only be optimzed for tournaments, but they would have other measures of competitions to make them forget less of the chess informatino about the positoins that interest us. Ask any developper work on SF, any such improvement is likely to constitute a regression at the engine competition level. The optimiization prime directive is ELO gain. not postiion accuracy. We just infer, not having any other top playing machine that can run fast enough on CPUs in browser space, mind you, so we make do with the crumbs they manage to share.... But as long as it is going to be an cost in time compounded ELO measure. It is not the primary concern. I just wanted to put the concepts in their respective places.
Also that is how it is, just not a design, is my tiny detail point here, that is an illusion that we have been holding for very long. Not SF team doing. We are the ones not having the imaginatin to think that maybe engine race has gone a bit silly and could look for some human usefuless objectives now that its ELO numberical values are non-sensically high enough... In computer sciecen and software development people have specifications to satisfy and then the usual optmization which is storare and time shavingl, that is the art, the pride and the success of their efforts. So really if we really want your statement to hold we woudl have to work at the specifcation of behavior requirements of such software development pursuit.
It would have perahps to imposed to all engines to be a componded pressure to their global optimization, that they all have to also meets minimal analytical tools verifcation and standards. Those standards might e.g. be that they should allow more retention of the information gathered, about the tree exploration, but there are many other ways their software could be made better human chess analygtical tools. but that is just a side effect, now. not a design.
> It’s a highly advanced program designed to analyze chess positions and calculate the best possible moves.
We might very well be using it that way, but it this is not the goal of its desing. It is optmized for winning engine tournament not for analyis or to help humans analsyse their chess positions. It just happens it can oracle smoe move scores for us, but if it were really designeed for that the they would not only be optimzed for tournaments, but they would have other measures of competitions to make them forget less of the chess informatino about the positoins that interest us. Ask any developper work on SF, any such improvement is likely to constitute a regression at the engine competition level. The optimiization prime directive is ELO gain. not postiion accuracy. We just infer, not having any other top playing machine that can run fast enough on CPUs in browser space, mind you, so we make do with the crumbs they manage to share.... But as long as it is going to be an cost in time compounded ELO measure. It is not the primary concern. I just wanted to put the concepts in their respective places.
Also that is how it is, just not a design, is my tiny detail point here, that is an illusion that we have been holding for very long. Not SF team doing. We are the ones not having the imaginatin to think that maybe engine race has gone a bit silly and could look for some human usefuless objectives now that its ELO numberical values are non-sensically high enough... In computer sciecen and software development people have specifications to satisfy and then the usual optmization which is storare and time shavingl, that is the art, the pride and the success of their efforts. So really if we really want your statement to hold we woudl have to work at the specifcation of behavior requirements of such software development pursuit.
It would have perahps to imposed to all engines to be a componded pressure to their global optimization, that they all have to also meets minimal analytical tools verifcation and standards. Those standards might e.g. be that they should allow more retention of the information gathered, about the tree exploration, but there are many other ways their software could be made better human chess analygtical tools. but that is just a side effect, now. not a design.
@dboing said in #2:
We might very well be using it that way, but it this is not the goal of its desing. It is optmized for winning engine tournament not for analyis or to help humans analsyse their chess positions. It just happens it can oracle smoe move scores for us, but if it were really designeed for that the they would not only be optimzed for tournaments, but they would have other measures of competitions to make them forget less of the chess informatino about the positoins that interest us. Ask any developper work on SF, any such improvement is likely to constitute a regression at the engine competition level. The optimiization prime directive is ELO gain. not postiion accuracy. We just infer, not having any other top playing machine that can run fast enough on CPUs in browser space, mind you, so we make do with the crumbs they manage to share.... But as long as it is going to be an cost in time compounded ELO measure. It is not the primary concern. I just wanted to put the concepts in their respective places.
Also that is how it is, just not a design, is my tiny detail point here, that is an illusion that we have been holding for very long. Not SF team doing. We are the ones not having the imaginatin to think that maybe engine race has gone a bit silly and could look for some human usefuless objectives now that its ELO numberical values are non-sensically high enough... In computer sciecen and software development people have specifications to satisfy and then the usual optmization which is storare and time shavingl, that is the art, the pride and the success of their efforts. So really if we really want your statement to hold we woudl have to work at the specifcation of behavior requirements of such software development pursuit.
It would have perahps to imposed to all engines to be a componded pressure to their global optimization, that they all have to also meets minimal analytical tools verifcation and standards. Those standards might e.g. be that they should allow more retention of the information gathered, about the tree exploration, but there are many other ways their software could be made better human chess analygtical tools. but that is just a side effect, now. not a design.
Thank you for this take, I have never thought about Stockfish further that a tool that we use to get an evaluation, it is fascinating insight and I am planning to look into this a little more. Thanks for the comment!!!
@dboing said in #2:
> We might very well be using it that way, but it this is not the goal of its desing. It is optmized for winning engine tournament not for analyis or to help humans analsyse their chess positions. It just happens it can oracle smoe move scores for us, but if it were really designeed for that the they would not only be optimzed for tournaments, but they would have other measures of competitions to make them forget less of the chess informatino about the positoins that interest us. Ask any developper work on SF, any such improvement is likely to constitute a regression at the engine competition level. The optimiization prime directive is ELO gain. not postiion accuracy. We just infer, not having any other top playing machine that can run fast enough on CPUs in browser space, mind you, so we make do with the crumbs they manage to share.... But as long as it is going to be an cost in time compounded ELO measure. It is not the primary concern. I just wanted to put the concepts in their respective places.
>
> Also that is how it is, just not a design, is my tiny detail point here, that is an illusion that we have been holding for very long. Not SF team doing. We are the ones not having the imaginatin to think that maybe engine race has gone a bit silly and could look for some human usefuless objectives now that its ELO numberical values are non-sensically high enough... In computer sciecen and software development people have specifications to satisfy and then the usual optmization which is storare and time shavingl, that is the art, the pride and the success of their efforts. So really if we really want your statement to hold we woudl have to work at the specifcation of behavior requirements of such software development pursuit.
>
> It would have perahps to imposed to all engines to be a componded pressure to their global optimization, that they all have to also meets minimal analytical tools verifcation and standards. Those standards might e.g. be that they should allow more retention of the information gathered, about the tree exploration, but there are many other ways their software could be made better human chess analygtical tools. but that is just a side effect, now. not a design.
Thank you for this take, I have never thought about Stockfish further that a tool that we use to get an evaluation, it is fascinating insight and I am planning to look into this a little more. Thanks for the comment!!!
<Comment deleted by user>
<Comment deleted by user>
<Comment deleted by user>
(Let's get productive again)
Thanks for the second part of the tutorial!
Here are a few notes for other readers, that I made while going through the tutorial.
-
In VS Code you can set the code to be automatically formatted when saved; this setting can be found under Settings -> Editor: Format on Save.
-
If you are wondering about the brown highlights in VS Code (if there are any):
When we created the project, in the first part of the tutorial (with npx create-react-app myfirstchessapp), we created a so-called git repository. In such a repository, our code can be saved as a version (in Git Lingua "commit") at any time. Files marked in brown are changes since the last version.
The first version was automatically created, when we created the project with the above command.
You can check this by clicking the "Source Control" button on the right. There you can see the versions and their differences in the source control graph at the bottom, and at the top you can see the changes since the last version (green U: newly added, brown M: changed).
To add a new version/commit, enter a commit message at the top, then click "Commit" and in the dialog that follows "Yes" (you can also "stage" individual files – Meaning of "staging" is approximately: "Mark for commit" – by right-clicking, then this extra dialog does not appear). The new version will then be the top one in the Source Control Graph.
-
How do you download a file from GitHub?
** Click the file name on https://github.com/nmrugg/stockfish.js/tree/master/src
** In the window that opens, right-click the "raw" button and select "save link as" (or whatever it is called in your web browser)
** In the case ofstockfish-16.1-lite-single.js, the file extension will probably be renamed by the browser, and saved on your computer asstockfish-16.1-lite-single.txt. Rename it back to.js, just as it is listed in the GitHub repo. Background: Renaming to.txtis a safety mechanism to ensure that novices don't accidentally double-click the JavaScript file and run it, which is possible on some systems depending on the configuration. For.txtfiles, it would usually just open in a text editor, which will do no harm. -
more information about useState, useEffect and component mounting can be found at w3schools or in the React Docs:
https://www.w3schools.com/react/react_usestate.asp
https://www.w3schools.com/react/react_useeffect.asp
https://www.w3schools.com/react/react_lifecycle.asp
https://react.dev/reference/react/useState
https://react.dev/reference/react/useEffect
- Remember to run
npm startin your project directory! Otherwise, you get an error message: "npm error enoent Could not read package.json: Error: ENOENT: no such file or directory".
That's it from me, I wish everyone a nice weekend
(Let's get productive again)
@HollowLeaf
Thanks for the second part of the tutorial!
Here are a few notes for other readers, that I made while going through the tutorial.
* In VS Code you can set the code to be automatically formatted when saved; this setting can be found under Settings -> Editor: Format on Save.
* If you are wondering about the brown highlights in VS Code (if there are any):
When we created the project, in the first part of the tutorial (with `npx create-react-app myfirstchessapp`), we created a so-called git repository. In such a repository, our code can be saved as a version (in Git Lingua "commit") at any time. Files marked in brown are changes since the last version.
The first version was automatically created, when we created the project with the above command.
You can check this by clicking the "Source Control" button on the right. There you can see the versions and their differences in the source control graph at the bottom, and at the top you can see the changes since the last version (green U: newly added, brown M: changed).
To add a new version/commit, enter a commit message at the top, then click "Commit" and in the dialog that follows "Yes" (you can also "stage" individual files – Meaning of "staging" is approximately: "Mark for commit" – by right-clicking, then this extra dialog does not appear). The new version will then be the top one in the Source Control Graph.
* How do you download a file from GitHub?
** Click the file name on https://github.com/nmrugg/stockfish.js/tree/master/src
** In the window that opens, right-click the "raw" button and select "save link as" (or whatever it is called in your web browser)
** In the case of `stockfish-16.1-lite-single.js`, the file extension will probably be renamed by the browser, and saved on your computer as `stockfish-16.1-lite-single.txt`. Rename it back to `.js`, just as it is listed in the GitHub repo. Background: Renaming to `.txt` is a safety mechanism to ensure that novices don't accidentally double-click the JavaScript file and run it, which is possible on some systems depending on the configuration. For `.txt` files, it would usually just open in a text editor, which will do no harm.
* more information about useState, useEffect and component mounting can be found at w3schools or in the React Docs:
https://www.w3schools.com/react/react_usestate.asp
https://www.w3schools.com/react/react_useeffect.asp
https://www.w3schools.com/react/react_lifecycle.asp
https://react.dev/reference/react/useState
https://react.dev/reference/react/useEffect
* Remember to run `npm start` in your _project directory_! Otherwise, you get an error message: "npm error enoent Could not read package.json: Error: ENOENT: no such file or directory".
That's it from me, I wish everyone a nice weekend
Thank you for the additional comments, they are definitely useful.
I hope the tutorial worked for you (it is always a bit tricky as I have a fully prepared Dev machine, so I will often missteps.
Interestingly enough, Part Three of this series will be about setting up GitHub and deploying the application to GitHub Pages, basically what ever you do, you can get it live for free.
@NHL_128
Thank you for the additional comments, they are definitely useful.
I hope the tutorial worked for you (it is always a bit tricky as I have a fully prepared Dev machine, so I will often missteps.
Interestingly enough, Part Three of this series will be about setting up GitHub and deploying the application to GitHub Pages, basically what ever you do, you can get it live for free.
<Comment deleted by user>
<Comment deleted by user>

