- Given a space $S$ which is $N$-dimensional, bounded, and quantized
- Given a set $P$ of unique points
- Find the set of collinear subsets of $P$, each containing at least 3 points
- One point can exist in multiple subsets
I am creating a 4D, 5 by 5 by 5 by 5 tic tac toe game. Each dimension is bounded by $\left(0,4\right)$ and quantized by $1$. I have a set of points within that space. Each point is associated with a player (the number of players is not bounded), so that could be treated as an additional bounded, quantized dimension.
I need to find any and all combinations of 5 points (played by the same player) that are collinear.
What is an efficient way to do this?