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

Random username if none given #701

Open
wants to merge 62 commits into
base: master
Choose a base branch
from

Conversation

cameronangliss
Copy link
Contributor

@cameronangliss cameronangliss commented Feb 16, 2025

Requires #704

We change the default behavior of Player's username generation to make a random lowercase alphanumeric string of length 10. This makes it so that if one is trying to, say, pickle their environment in separate Pipes (which supersuit does for parallel environment running stuff) you don't have username conflicts of the parallel environments due to the fact that each environment doesn't have access to the same CONFIGURATION_FROM_PLAYER_COUNTER object.

With 10 characters, the likelihood of 2 random players having an overlapping name is 1/(36^10) = 0.000000000000027351112%

Copy link

codecov bot commented Feb 16, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 84.00%. Comparing base (f458350) to head (eea96ce).
Report is 130 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #701      +/-   ##
==========================================
+ Coverage   83.38%   84.00%   +0.61%     
==========================================
  Files          39       42       +3     
  Lines        3918     4444     +526     
==========================================
+ Hits         3267     3733     +466     
- Misses        651      711      +60     

@cameronangliss cameronangliss marked this pull request as ready for review February 23, 2025 00:23
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.

1 participant