Probability, Python, Games, Markov Chains, Data Science.
range(1, num_tiles+1)] states = [] for i in range(0, 2**num_tiles): binary_rep = np.binary_repr(int(i), width=num_tiles) states.append([tile_nums[idx] for idx, a in enumerate(binary_rep) if a == '1']) Here the Numpy binary_repr function is very helpful as it generates the binary representation of