-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re #211 Centipawn graph #101
base: master
Are you sure you want to change the base?
Re #211 Centipawn graph #101
Conversation
src/gui/mainwindow.cpp
Outdated
@@ -189,19 +189,25 @@ MainWindow::MainWindow() : QMainWindow(), | |||
connect(this, SIGNAL(reconfigure()), m_ficsConsole, SLOT(slotReconfigure())); | |||
m_ficsConsole->setEnabled(false); | |||
|
|||
DockWidgetEx* gameTimeDock = new DockWidgetEx(tr("Centipawn Loss Graph"), this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be gameTimeDock
, but centipawnDock
.
src/gui/mainwindow.cpp
Outdated
@@ -189,19 +189,25 @@ MainWindow::MainWindow() : QMainWindow(), | |||
connect(this, SIGNAL(reconfigure()), m_ficsConsole, SLOT(slotReconfigure())); | |||
m_ficsConsole->setEnabled(false); | |||
|
|||
DockWidgetEx* gameTimeDock = new DockWidgetEx(tr("Centipawn Loss Graph"), this); | |||
gameTimeDock->setObjectName("GameTimeDock"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to setObjectName
, I think. At least change the name to CentipawnDock
or so.
@limitedAtonement @Isarhamster I think this functionality is a great addition and looks terrific I want to make a couple recommendations:
I would recommend to make the PR request more simple, only including the new function and I would be saying this gets my recommendation
To fix that should be simple, by editing line
on |
There was a problem with how gametime move selection worked: 1. Click a spot on game time (which selects a move in the game) 2. Press right arrow a couple times to select a different move 3. Click the same spot on game time This should rewind the game back to the spot clicked in game time, but if you didn't move the mouse between steps 1. and 3., the move wasn't updated. Another bug is fixed: any time the user clicked a spot in game time, the move was updated twice: once on mouse "press" and once on mouse "release".
There were two gametoolbars. One GameToolBar in src/gui/gametoolbar.{cpp,h}, and a certain MainWindow::gameToolBar. The former was a toolbar attached to the notation window showing a material graph and some clocks shown when "game time" was selected. The latter is a toolbar at the top of the main window showing "game"-related actions (such as flipping the board, etc.). The latter was not affected in this commit. Limit evaluations to +/- 10.0
6ed4f01
to
1ab9ae8
Compare
@IAHM-COL Thanks for the review!
Absolutely right. Those other commits are required for me to be able to run the code. I only meant to contribute the last two commits. I have adjusted the pull request and limited it to those commits now!
Eek! I did that early on when I was poking around to see if I could change ANYTHING. I have fixed that in the current pull request! |
It works and looks good. I think this is a nice addition to consider. I hope you would like taking a look at this, Regards |
I finally managed to take a look into this request.
|
Thank you for your detailed findings. It will probably take me many days to address these, but I'll post back here with any questions I have (I anticipate having several questions)! |
Cannot reproduce: chessx-analysis-darkmode-2024-09-17_07.12.53.mp4What are you seeing?
I was imitating the Analysis windows (which have the engine in the dockable widget). Although, I'm pretty sure
I think you're talking about chessx remembering the size and position of the dockable widget so that when it starts, the graph is in the same place as last time? I'll look into this, but let me know if I'm on the wrong track.
The use case I'm imagining for this is: after a player finishes a game, to begin reviewing, he can run this analysis to get a high-level overview of where he and his opponent made significant errors that affected the course of the game. "...only analyze the latest ... move added to the game" suggests a different use case, but I can't picture it. Also "...only analyze the latest position..." why not analyze earlier positions? (I have many more questions about this, but will wait for your feedback first.)
Oh yes, I didn't handle that at all. I'll look into it and make the necessary adjustments.
☑️
Using multiple threads would be a waste because we're not actually looking for the best move, only a reasonably close evaluation of the position. This can be done quite briefly with one thread and significantly less than one second of analysis. If a computer has, say 50 logical cores, we want to be able to analyze 50 positions concurrently for, say, .2 seconds to get an acceptable graph. We do this by creating 50 instances of the analysis engine and asking each one to compute a particular position in the game for Does that make sense? Am I missing anything?
I don't think I touched any code in |
See the Sourceforge Issue related to this pull request: https://sourceforge.net/p/chessx/feature-requests/211/