I would like a method to efficiently generate a random finite group of a given order $n$. If there are $g(n)$ non-isomorphic groups of order $n$, ideally each group would occur with probability $1/g(n)$. So if $n=64$, each of the $267$ groups would be generated with equal probability. ($g(n)$ is [A000001](http://oeis.org/A000001) in OEIS.) Groups of order $n=2^k$ would be of special interest. This is far from my expertise, and my searches must be using the wrong terminology, because I have not found such methods. I'd appreciate pointers—Thanks!