Post #2104112
2026-03-31 10:22 UTC
@KeyJ do you mean entropy in the Shannon sense, −Σ(p lg p)? If so, then I think we've already had examples in this thread that do badly on that score, such as my own starting example of 12345678, and the interesting subthread about 2^29.
Replies (2)
-
@KeyJ@mastodon.gamedev.place 2026-03-31 10:31
@simontatham I would choose a simpler metric, like number of different digits, or runs of equal digits. But yes, you won't get 12345678 that way, that's true ... but there will always be counterexamples where whatever heuristic you're using is going to fall apart. I think handling values close to powers of ten and two is already a good start and would be a useful feature.
-
@jackv@mas.to 2026-03-31 20:26
@simontatham @KeyJ I was thinking "compress the string using a standard compression algorithm". Because that might be optimised for "expected" sequences. But i don't know any of if the theory. (And i don't think that's a practical suggestion.)