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

Paused challenges #402

Closed
1 task
julskast opened this issue Dec 29, 2017 · 8 comments
Closed
1 task

Paused challenges #402

julskast opened this issue Dec 29, 2017 · 8 comments
Assignees

Comments

@julskast
Copy link
Contributor

julskast commented Dec 29, 2017

Sometimes players on the leaderboard can't play in a challenge. E.g. opponents with currently disabled bots (due to compilation) won't have a bot to play.

  • Let's add a state to the analysis widget for 'paused' if at least one player in the challenge does not have a bot.

E.g.
image

@toannguyen132
Copy link
Contributor

@harikmenon how can I get the pause status in the response of server? All I can see in the finished key of the response is bool value (true or false).

@julskast
Copy link
Contributor Author

julskast commented Jan 2, 2018

@lidavidm any suggestions here?

@lidavidm
Copy link
Contributor

lidavidm commented Jan 2, 2018

We don't explicitly return it in the API, but you can check the compilation status of the participants' bots (or whether they even have uploaded a bot yet). If any bot does not exist or the compilation status is not Successful, then the challenge is paused.

$ curl https://api.halite.io/v1/api/user/1000/bot/0
{
  "bot_id": 0, 
  "compilation_status": "Successful", 
  "games_played": 562, 
  "language": "Python", 
  "rank": 942, 
  "score": 26.6559, 
  "version_number": 14
}

@julskast
Copy link
Contributor Author

julskast commented Jan 2, 2018

Thanks @lidavidm ! @toannguyen132 let us know if this makes sense. cc @benwong0

@toannguyen132
Copy link
Contributor

toannguyen132 commented Jan 2, 2018

@lidavidm so I need to fetch all the participants' information in each challenge in the list to get the compilation status in order to display?
and I have to fetch only the first bot or all the bots of the participants to check the status?

@lidavidm
Copy link
Contributor

lidavidm commented Jan 2, 2018

@toannguyen132 Yes, all the bots of all the participants, if the challenge is not completed. If that's too many requests, then let's just add it to the API.

toannguyen132 added a commit to toannguyen132/Halite-II that referenced this issue Jan 3, 2018
@toannguyen132
Copy link
Contributor

@lidavidm I have updated the paused status. But I do not know any user those don't have any bot or failed compilation to test. I tried to fail my bot by uploading the wrong bot but it still shows my bot status 'successful'. I think it uses my previous version.
Do you have any example user like that?

harikmenon added a commit that referenced this issue Jan 3, 2018
@lidavidm
Copy link
Contributor

lidavidm commented Jan 3, 2018

@toannguyen132 I just updated my bot to fail (user 1000), does that help?

toannguyen132 added a commit to toannguyen132/Halite-II that referenced this issue Jan 3, 2018
toannguyen132 added a commit to toannguyen132/Halite-II that referenced this issue Jan 3, 2018
harikmenon added a commit that referenced this issue Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants