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

🔙AI play: allow the human to UNDO their last move #479

Closed
Terkwood opened this issue Apr 3, 2021 · 1 comment · Fixed by #482
Closed

🔙AI play: allow the human to UNDO their last move #479

Terkwood opened this issue Apr 3, 2021 · 1 comment · Fixed by #482
Labels
enhancement New feature or request

Comments

@Terkwood
Copy link
Owner

Terkwood commented Apr 3, 2021

motivation

Adding an undo button in AI play will help the human player learn.

sketch

  • only available in katago
  • only available when it is the human player turn (browser)
  • gateway must be altered
  • create a new service UNDO service which can determine whether an UndoMove request is valid, and then emits a GameState event that is consumed by judge and changelog.
  • changelog : no changes needed. it will receive the updated GameState event
    (entry_id, StreamData::GS(gs)) => {
  • judge: no changes needed. it will receive the updated GameState event
  • botlink: second layer of verification that this can happen? or nothing needed?

browser

Add the button if it looks nice on desktop&tablet&cell, otherwise bury it in the menu

DO NOT MOVE THE EXISTING BUTTONS

Use browser state to validate that an undo is possible - must occur during human turn

Send UndoMoveCommand

Ignore UndoMoveRejected & log

Receive MoveUndone and alter game tree

gateway

Receive UndoMoveCommand empty struct and hydrate it for the backend:

pub struct UndoMove {
   pub game_id: GameId,
   pub player: Player,
}

undo service

New microservice which listens to game states, bot attached events, undo move commands

on UndoMove, it must emit a new game state, and it must emit MoveUndone

@Terkwood Terkwood added the enhancement New feature or request label Apr 3, 2021
@Terkwood Terkwood pinned this issue Apr 3, 2021
@Terkwood
Copy link
Owner Author

Terkwood commented Apr 4, 2021

Related #257

@Terkwood Terkwood changed the title katago mode: add ability to go back a move katago mode: add UNDO button Apr 4, 2021
@Terkwood Terkwood changed the title katago mode: add UNDO button AI play: add UNDO button Apr 4, 2021
@Terkwood Terkwood changed the title AI play: add UNDO button AI play: allow the human to UNDO their last move Apr 4, 2021
@Terkwood Terkwood changed the title AI play: allow the human to UNDO their last move 🔙AI play: allow the human to UNDO their last move Apr 4, 2021
@Terkwood Terkwood unpinned this issue Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant