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

challenge leela odd bots #1211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HaonRekcef
Copy link
Contributor

closes #796 . Implements challenges featured leela bots with piece odds. The bots can now only be challenged with time controls and positions they will accept:

video of phone:

specialBotChallenges2.mp4

video of tablet :

specialBotChallenges.mp4

Remarks:

  • I'm unsure if the current method for storing the positions of the different bots is the nicest. Suggestions are welcome.
  • The new bot, LeelaPieceOdds, supports a wide range of starting positions (as shown in the phone video). This might be overwhelming; feedback on better ways to handle this would be appreciated.
  • I couldn't test it with the real bots since challenging them on Lichess.org requires an account login, which isn't possible in the debug version.
  • Cannot test it on iOS
  • The grid layout is directly adapted from the puzzle history screen.

@veloce
Copy link
Contributor

veloce commented Dec 3, 2024

UI is fine by me. The only thing I found weird is that, even if the position was not chosen, you could challenge the opponent nevertheless. I think the button should be disabled as long as the position is not chosen.

I add a commit to fix the iOS view (needed a safe area), and it completely messed up the history in the PR, sorry about that.

I could not test really the PR since Leela bots don't accept challenges at the moment.

@HaonRekcef
Copy link
Contributor Author

UI is fine by me. The only thing I found weird is that, even if the position was not chosen, you could challenge the opponent nevertheless. I think the button should be disabled as long as the position is not chosen.

I think it should be disabled as long as no board is selected, the challenge button is greyed out and can't be pressed.

I add a commit to fix the iOS view (needed a safe area), and it completely messed up the history in the PR, sorry about that.

I could not test really the PR since Leela bots don't accept challenges at the moment.

On the website, you need to select the correct color. For example, if white is missing a knight, you need to select the black pieces for yourself so that the bot accepts. If you tried from the app with my PR and it didn’t accept, I have a bug somewhere.

@HaonRekcef
Copy link
Contributor Author

I rebased it to the newest version and fixed the conflicts

@HaonRekcef HaonRekcef reopened this Dec 23, 2024
@veloce
Copy link
Contributor

veloce commented Dec 25, 2024

Thanks for the update. I tested it again:

  • the iOS version is bugged, but I don't know why
  • on android choosing a Leela odd bot would mess up the other challenge settings: if I go back to a regular challenge, it will show fromPosition and rated false
  • on android the time sliders are stuck to 10+0 and impossible to move

I think the create_challenge_screen is over complicated now.
This feature should be implemented in a completely separate screen for the odd bots. That way it won't mess with regular challenge screen.
I don't think we need to persist the settings, because that feature is quite niche. Just keep the time and inc setting in memory for users who challenge several time in a row maybe?

@HaonRekcef
Copy link
Contributor Author

I refactored it to a different screen. I decided not to persist the setting at all since this feature is indeed niche. Instead, I simply take the time control preferences from the settings.

  • I cannot test it on iOS.
  • The slider should not be stuck, I think it’s just a bug that sometimes occurs when moving it with the mouse in the emulator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add possibility to challenge Leela featured bots
2 participants