In this scenario, there are 8 possible ways the ants can travel. This comes from the fact that each ant has two possible ways, and all of the ants are independent. Therefore the size of the sample space is $2^3 = 8$.
$$
$$
The ants will not collide with each other provided that they all choose the same direction. So, there are 2 possible ways for them to travel without colliding. As a result, the probability of them not colliding is
$$
P(\text{no collision}) = \frac{2}{8} = 0.25.
$$