Let the lower left corner of the board be the origin. Divide the units of time and space by 2; then the squares are of dimensions 2×2, the coordinates of the midpoints of the squares are odd positive integers, and the speed of the ants is still 1.
We prove by induction that at integer time moments the coordinates of the ants are integers and the sum of the coordinates for any fixed ant has the same parity as the time moment. In addition, the ants can meet only at integer time moments. At time t=0 all coordinates of the ants are odd, so their sum is even. Suppose that at an integer time moment t=k the coordinates of the ants are integers and the sum of the coordinates for any fixed ant has the same parity as the time moment. If two of the ants were to meet each other within the next time unit, they have to move toward each other from time t=k, hence one of their coordinates must be the same. Since the parity of the sum of their coordinates was the same at time t=k, another of their coordinates had to differ by at least 2. Hence they cannot meet before time t=k+1. Between time moments t=k and t=k+1 every ant has changed only one of its coordinates by 1, hence at time t=k+1 the parity of the sum of the coordinates is again the same as the parity of the time moment.
Next we will prove by induction that for any point with integer coordinates (x,y) there are no collisions at this point after the time moment t=x+y−2. For x=y=1 this is obviously true, since there are no collisions in the middle of the lower left square (otherwise one of the ants has to arrive to this point from the edge of the board). Let (x,y) be arbitrary and suppose that the claim holds for all points with the sum of the coordinates less than x+y. Suppose that a collision takes place at point (x,y) at time t. One of the participants had to arrive from a point, where one of the coordinates was smaller; w.l.o.g. we can assume that this was the x-coordinate. If this ant has not collided with anyone before, then t≤x−1≤x+y−2. If the last collision of this ant occurred at time t′<t, then the coordinates of the last collision were (x−(t−t′),y). By the induction assumption t′≤x−(t−t′)+y−2, hence t≤x+y−2.
By symmetry the claim holds when another corner is chosen as the origin. Let the last collision of a particular ant occur at the point (x,y), where the coordinates are taken with respect to the nearest corner. W.l.o.g., we can assume x≤y. The time from the last collision to the falling off the edge of the ants participating in the collision is at most 2m−x, hence the time elapsed from the start is at most x+y−2+2m−x≤3m−2. By this time all ants have fallen off the edge. With respect to the original units the maximal time is 23m−1.
For any m the maximal time can be achieved, if in the beginning there are 2 ants at the adjoining corners of the board moving toward each other. At the moment t=2m−1 the pair collides and one of the ants starts moving toward the center, falling off the board at time t=23m−1.