Detecting homotopy by precomposing with paths. Let X and Y be topological spaces, and denote $\mathbb{S}^n$ the $n$-sphere.
i) Suppose that $f,g:X \to Y$ are maps such that for every path $\alpha: [0,1] \to X,$ we have that $f \circ \alpha$ is left homotopic to $g \circ \alpha$.
Does this imply that $f$ is left homotopic to $g$?
ii) Suppose instead that for every map $\alpha: \mathbb{S}^n \to X$ and every $n \geq 0, $ we have that $f \circ \alpha$ is left homotopic to $g \circ \alpha$. Is it true that $f$ and $g$ must be left homotopic?
iiia) If not, does this become true if we assume $X$ and $Y$ to be nice?
iiib) What if $X,Y$ are CW-complexes?
Note: these are not homework questions. They are questions which I am asking to myself but I don’t know how to answer because I don’t have time to think about them now.
 A: I guess that "left homotopic" just means "homotopic"?
Q1: No. $[0, 1]$ is contractible, so two maps from $[0, 1]$ to any other space are homotopic iff their image lies in the same path component. So if $Y$ is path-connected then every pair of maps $f, g : X \to Y$ satisfies this condition.
Q2: No. This condition is equivalent to requiring that $f$ and $g$ induce the same maps on homotopy groups $\pi_n(f), \pi_n(g) : \pi_n(X) \to \pi_n(Y)$ (if $X$ and $Y$ are disconnected, then we require this to hold at every basepoint), except that because of the lack of a basepoint, the condition on $\pi_1$ is that $f$ and $g$ induce the same maps on the set of conjugacy classes in $\pi_1$.
We can ask for the slightly stronger condition that $f$ and $g$ induce the same maps on each $\pi_n$, full stop, and also that $X$ and $Y$ are path connected to keep things simple with basepoints. This is "Whitehead's theorem for maps" and even here the answer is still no: for example, $X$ and $Y$ can have nonzero homotopy groups in disjoint degrees, in which case every map induces the zero map between all homotopy groups, but there can still be more than one homotopy class of maps $X \to Y$.
My favorite counterexample here is to take $X = BG, Y = B^2 A$ to be Eilenberg-MacLane spaces, where $G$ is a discrete group and $A$ is a discrete abelian group. $X$'s only nontrivial homotopy group is $\pi_1(X) = G$ and $Y$'s only nontrivial homotopy group is $\pi_2(Y) = A$ but the set of homotopy classes of maps between them can be identified with the second group cohomology $H^2(G, A)$, which classifies central extensions of $G$ by $A$ and is already nontrivial for e.g. $G = A = C_2$.
This is a purely homotopy-theoretic phenomenon that persists even if $X$ and $Y$ are very nice in point-set terms; in particular $BG$ and $B^2 A$ can be taken to be CW complexes.
To get an example where $X$ and $Y$ are even manifolds we can take $X = T^2$ and $Y = S^2$. These again have nonzero homotopy groups in disjoint degrees: $X$'s only nonzero homotopy group is $\pi_1(X) = \mathbb{Z}^2$ whereas $Y$ is simply connected. But maps $X \to Y$ are classified up to homotopy by their degree (by the Hopf degree theorem) and every degree occurs so there are countably many homotopy classes.
