Skip to content

Instantly share code, notes, and snippets.

@sammko
Created March 6, 2017 20:21
Show Gist options
  • Save sammko/e822fb419b00487299634557fe726baa to your computer and use it in GitHub Desktop.
Save sammko/e822fb419b00487299634557fe726baa to your computer and use it in GitHub Desktop.
tictactoe-hypercube-lines
lambda n: list(chain.from_iterable(chain.from_iterable(map(list, [chain.from_iterable(map(lambda s: [[[(-1 if i in j else 1)*int(i in s) for i in range(n)] for j in combinations(s[1:],q)] for q in range(len(s))], combinations(range(n),M))) for M in range(1,n+1)]))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment