0.0.3 • Published 2 years ago

uuid-to-animal-adjectives v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

uuid-to-animal-adjective

This package generates a consistent adjective + animal combination for a given UUID.

Consistency

This will always return the same output for the same input. It works by parsing the 128 bit UUID into 4 x 32 bit integers, then using that to select the adjective and animal combination for the given format.

Uniqueness/collision resistance

This library supports four levels of collision resistance, based on how many adjectives you choose to add before the animal.

This has 1,814 unique adjectives and 574 animals. If you choose to enable Pokémon (disabled by default), that adds an additional 905 "animals" to the collection.

Without the Pokémon there are:

  • 1,041,236 unique ADJECTIVE_ANIMALS
  • 1,888,802,104 unique ADJECTIVE_ADJECTIVE_ANIMALS
  • 3,426,287,016,656 unique ADJECTIVE_ADJECTIVE_ADJECTIVE_ANIMALS

With the Pokémon there are:

  • 2,682,906 unique ADJECTIVE_ANIMALS
  • 4,866,791,484 unique ADJECTIVE_ADJECTIVE_ANIMALS
  • 8,828,359,751,976 unique ADJECTIVE_ADJECTIVE_ADJECTIVE_ANIMALS

Collision rates

We have tests testing the Actual collision avoidance rate vs the expected collision rate. The following is the result of one of the test runs. Total duplicates is the total amount of UUIDs that collided, unique duplicates tracks how many different names collided. e.g., if Abandoned Emu is used by three different UUIDs, that would be three total duplicates and 1 unique duplicate.

Note: This is one run, it is not statistically significant.

ADJECTIVE_ANIMAL

No Pokémon

Number of names generatedTotal duplicatesUnique duplicatesTargeted collision avoidance rateActual collision avoidance rate
1000011
1000630.990.994
10,0004202090.950.958
100,00031,66914,8080.650.68331

Pokémon

Number of names generatedTotal duplicatesUnique duplicatesTargeted collision avoidance rateActual collision avoidance rate
1000011
10000011
10,00092460.990.9908
100,0008,7954,327.90.91205

ADJECTIVE_ADJECTIVE_ANIMAL

No Pokémon

Number of names generatedTotal duplicatesUnique duplicatesTargeted collision avoidance rateActual collision avoidance rate
1000011
10000011
10,0000011
100,00042210.9990.99958
1,000,0004,0592,0290.990.995941

Pokémon

Number of names generatedTotal duplicatesUnique duplicatesTargeted collision avoidance rateActual collision avoidance rate
1000011
10000011
10,0000011
100,0001050.9990.9999
1,000,0001,0225110.990.998978

ADJECTIVE_ADJECTIVE_ADJECTIVE_ANIMAL

No Pokémon

Number of names generatedTotal duplicatesUnique duplicatesTargeted collision avoidance rateActual collision avoidance rate
1000011
10000011
10,0000011
100,0000011
1,000,000000.99991

Pokemon

Number of names generatedTotal duplicatesUnique duplicatesTargeted collision avoidance rateActual collision avoidance rate
1000011
10000011
10,0000011
100,0000011
1,000,000210.99990.999998