What is a good implementation of Power Set algorithm?
Recently I needed this algorithm for building a solver for my puzzle game. Generally, the solver should try strategies (sets of turns, the possible turns Power Set) and find the strategy that forms a solution.
I found out, that the naive implementation shown at Wikipedia page, as well as one from js-combinatorics library does not provide the stable order of items in generated subsets.
Also, the naive approach that utilise the bijection of the set to the natural numbers set and followed binary representation, is bounded by the size of the source set.
This limitation naturally occurs from the fact that internally the mentioned library uses 32-bit integer value for generating subsets.