Skip to content
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

Feature Request: Allow freely editing the board to set up positions #190

Open
e00E opened this issue Sep 10, 2020 · 14 comments
Open

Feature Request: Allow freely editing the board to set up positions #190

e00E opened this issue Sep 10, 2020 · 14 comments
Labels
enhancement New feature or request future sometime-maybe

Comments

@e00E
Copy link

e00E commented Sep 10, 2020

As far as I can tell the only way to reach a specific board state is to input moves by both players one after another as if playing a real game. This is inefficient in terms of my time when I don't care how the game reached this state and only want to look at a specific position.
What I would like to do is freely edit the board as I please. This would also help when I am in a specific position and want to see analysis of a slightly different board state where I would like to a change a stone has been played a long time ago.

@simonguoxm
Copy link

Just load a sgf

@sanderland sanderland added enhancement New feature or request future sometime-maybe labels Sep 11, 2020
@sanderland
Copy link
Owner

sanderland commented Sep 11, 2020

I've heard s similar request for the purpose of being able to compare how an exchange would affect analysis, on the basis of history-free analyses. It's a pretty big feature though, and unlikely to happen soon without outside contributions.
For now, SGF is probably the most suitable way to do this.

@sanderland
Copy link
Owner

Somewhat helped by 'insert mode' in 1.7

@ljubo106
Copy link

I have just implemented a stopgap, quick and dirty "solution". User can select black or white stones to be inserted and appropriate "pass" moves are inserted into the game tree so that the whole structure remains consistent. The "editor" supports only to put stones (no stone removal, color change, etc.), however it is working for the most common use case - simple setup of a position. Drawback is that the game tree is full with "pass" moves.

See Merge request and my katrain fork katrainse (clone stopgap-editor branch to test it).

@sanderland
Copy link
Owner

sanderland commented Feb 27, 2023

Hey @ljubo106 thanks for your pr. A proper editor would be great.
However, I don't think the PR adds sufficient functionality (essentially just pressing 'p' for the user) to take up such prominent screen space.

I think an editor would need:

on the engine side

  • Support for the AE command in sgfs.
    • This is likely to collapse the entire board state into some kind of initial_stones based position from the last occurrence of an AB/AW/AE

in the ui

  • Some kind of expansion of the 'insert moves' UI into an 'edit' mode
    • similar replacement of the right panel UI elements as analysis vs play does.
    • black, white, remove options, mapping to AB/AW/AE, and whatever convenience options we want.
    • At this point an "Edit" or "✏️" could be added to the top bar if it fits.

If you can find the time to work on the latter let me know. Complex UI changes such as this are hard though, and I understand if you don't have the time.

@ljubo106
Copy link

ljubo106 commented Feb 27, 2023

Hey @ljubo106 thanks for your pr. A proper editor would be great. However, I don't think the PR adds sufficient functionality (essentially just pressing 'p' for the user) to take up such prominent screen space.

At least for me, it is significantly accelerating entering a position, but, of course, it is not a full editor. Concerning screen space - well, this is a bit tradeoff between usability and screen real estate, and it is also a question of taste and personal preferences.

If you can find the time to work on the latter let me know. Complex UI changes such as this are hard though, and I understand if you don't have the time.

Getting familiar with the whole code base and properly implementing a real editor is quite "heavy lifting" and would require quite a lot of time as you are suggesting too.

I understand if you don't want to merge this change as it is not "the real thing" - I will keep the fork as it is, solving the problem for me and depending on time will maybe dig a bit further. Merging that few lines of code will be easy also for future releases - so, I'm good.

Edit: Removing my comment about building deliverables - with "pyinstaller spec/katrain.spec" I was able to build running katrain.exe and other deliverables.

Edit2: I have closed the pull request. If somebody wants to try the discussed stopgap solution, the download is available here: katrainse

@sanderland , thanks for the great work you are doing - katrain is really a very useful tool

@miguno
Copy link

miguno commented Apr 18, 2023

I came across this issue while looking for the documentation on how to create/edit a position in katrain. I, too, would welcome the ability to edit a position within katrain, rather than having to use a separate tool (like Sabaki) to create and save an SGF, then open it in katrain. Just saying. :-)

I tried the workaround of using 'i' (insert) in combination with 'p' (pass) to keep inserting stones of the same color, but found the workaround to be quite limited. For example, I don't know how to remove an existing stone from a position when you have already inserted ten additional stones. The only solution I am aware of is going back eleven steps, and re-insert the stones again at the right location. This works only for situations where there aren't that many stones on the board, and becomes increasingly cumbersome the more stones you have to place.

Thanks for creating katrain, it's a wonderful tool!

@ljubo106
Copy link

@miguno - you could try katrainse. As discussed above, it is not a real editor, possibility to remove stones is missing, etc. However, it is making adding stones really easy (pass move is inserted automatically).

@xiaoyifang
Copy link
Contributor

xiaoyifang commented Jan 14, 2024

Hey @ljubo106 thanks for your pr. A proper editor would be great. However, I don't think the PR adds sufficient functionality (essentially just pressing 'p' for the user) to take up such prominent screen space.

I think an editor would need:

on the engine side

  • Support for the AE command in sgfs.

    • This is likely to collapse the entire board state into some kind of initial_stones based position from the last occurrence of an AB/AW/AE

in the ui

  • Some kind of expansion of the 'insert moves' UI into an 'edit' mode

    • similar replacement of the right panel UI elements as analysis vs play does.
    • black, white, remove options, mapping to AB/AW/AE, and whatever convenience options we want.
    • At this point an "Edit" or "✏️" could be added to the top bar if it fits.

If you can find the time to work on the latter let me know. Complex UI changes such as this are hard though, and I understand if you don't have the time.

When in this edit mode ,I would recommend use mouse Left to add Black stone and mouse Right to add the White Stone ,
click on existed stone to remove it.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Aug 18, 2024
@miguno
Copy link

miguno commented Aug 18, 2024

Would still be a useful feature.

@github-actions github-actions bot removed the Stale label Aug 19, 2024
@base0
Copy link

base0 commented Sep 24, 2024

Editing a board is a useful feature. I'd like to analyze tsumego and tesuji problems. "Set region of interest" is useful for the task. But to edit the problem is difficult.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 24, 2024
@miguno
Copy link

miguno commented Dec 25, 2024

Still looking forward to such a feature.

@github-actions github-actions bot removed the Stale label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future sometime-maybe
Projects
None yet
Development

No branches or pull requests

7 participants