I wrote a little search program. So you've got a list of all the points in your vector space. Put the first one into your set, try putting in the next point, and go down the list putting points in your set if you can do so without having three on a line. That'll give you a solution, likely not optimal. So go back to the last point you added and take it out of your set and try adding the point after that on your list and continue adding points if you can and so on. Essentially a depth first search, I think.
My program finished searching the n=3 case and found that 9 points is the best you can do. For n=4, 20 was the best solution found but I didn't finish searching all the possibilities.
Next I tried to make sense of the solutions. It helped enormously to draw a picture of the solutions, as follows.
For the n=2 case draw a 3 by 3 grid and fill in some squares such that no three filled in squares are on a row, column, and no three are on all different rows and columns, (for example (0,0)(1,2)(2,1) are all on different rows and columns, so don't put all three of those points in your set).
One solution might look like this:
(_)(_)(_)
(X)(X)(_)
(X)(X)(_)
which represents (0,0)(0,1)(1,0)(1,1)
For the n=3 case draw three of the diagrams made for the n= 2 case. After some fiddling I found the 9 point solution looked like this
(_)(_)(X)
(_)(_)(_)
(_)(_)(_)
(X)(X)(_)
(_)(_)(X)
(_)(_)(X)
(_)(_)(_)
(X)(X)(_)
(X)(X)(_)
which represents the set (0,0,0)(0,0,1)(0,1,0)(0,1,1)(1,0,2)(1,1,2)(1,2,0)(1,2,1)(2,2,2). The first coordinate specifies which of the 3x3 charts, and the other two coordinates are just column and row.
For n=4 the diagram for the 20 point solution looks like this:
(_)(_)(X) (_)(_)(X) (_)(_)(_)
(_)(_)(_) (_)(_)(_) (_)(_)(_)
(_)(_)(_) (_)(_)(_) (_)(_)(_)
(X)(X)(_) (_)(_)(_) (_)(_)(X)
(_)(_)(X) (X)(X)(_) (_)(_)(_)
(_)(_)(X) (X)(X)(_) (_)(_)(_)
(_)(_)(_) (X)(X)(_) (_)(_)(X)
(X)(X)(_) (_)(_)(X) (_)(_)(_)
(X)(X)(_) (_)(_)(X) (_)(_)(_)
I believe (conjecture?) this pattern can be generalized for any n and will yield a 44 point set for n=5, a 96 point set for n=6 and a 208 point set for n=7.
Several points
-I don't know if this pattern of constructing sets always yields the optimal case for the given n. I don't see how to prove it. But it's better than my initial guess of 2^n.
-I haven't even proven that the pattern of sets above even provides a solution to the problem. There's room for a lot more rigor here, and I've left some gaps in the work above, but hopefully this is some food for thought. I'm just trying to share ideas.
-My search program did not exploit any symmetries in the problem, of which there are many, but I didn't know how to exploit them. One way to think of the symmetries is to show how all of the four point n=2 set solutions are 'essentially equivalent'. (I think.)
-My search program was written fairly inefficiently and the searching takes much longer for bigger n. For n=4 I found the 20 point set, but the program didn't finish searching. For n=5 it didn't even find the 44 point set.
-I don't know if a 'depth-first' search is the best way to go here. This really isn't my area.
Question: Where did you find this problem? I'm curious if there's any context.