TITLE: A possible generalization of the homotopy groups.
QUESTION [23 upvotes]: The homotopy groups $\pi_{n}(X)$ arise from considering equivalence classes of based maps from the $n$-sphere $S^{n}$ to the space $X$. As is well known, these maps can be composed, giving arise to a group operation. The resulting group contains a great deal of information about the given space. My question is: is there any extra information about a space that can be discovered by considering equivalence classes of based maps from the $n$-tori $T^{n}=S^{1}\times S^{1}\times \cdots \times S^{1}$. In the case of $T^{2}$, it would seem that since any path $S^{1}\to X$ can be "thickened" to create a path $T^{2}\to X$ if $X$ is three-dimensional, the group arising from based paths $T^{2}\to X$ would contain $\pi_{1}(X)$. Perhaps more generally, can useful information be gained by examining equivalence classes of based maps from some arbitrary space $Y$ to a given space $X$.

REPLY [8 votes]: I was told by Brian Griffiths that Fox was hoping to obtain a generalisation of the van Kampen theorem and so continue work of J.H.C Whitehead on adding relations to homotopy groups (see his 1941 paper with that title). 
However if one frees oneself from the base point fixation one might be led to consider Loday's cat$^n$-group of a based  $(n+1)$-ad, $X_*=(X;X_1, \ldots, X_n)$; let $\Phi X_*$  be the space of maps $I^n \to X$ which take the faces of the $n$-cube $I^n$ in direction $i$ into $X_i$ and the vertices to the base point. Then $\Phi$ has  compositions $+_i$ in direction $i$ which form a lax $n$-fold groupoid. However the group $\Pi X_*= \pi_1(\Phi, x)$, where $x$ is the constant map at the base point $x$, inherits these compositions to become a cat$^n$-group, i.e. a strict  $n$-fold groupoid internal to the category of groups (the proof is non trivial). 
There is a Higher Homotopy van Kampen Theorem for this functor $\Pi$ which enables some new nonabelian calculations in homotopy theory (see our paper in Topology 26 (1987) 311-334). 
So a key step is to move from spaces with base point to certain structured spaces. 
Comment Feb 16, 2013: The workers in algebraic topology near the beginning of the 20th century were looking for higher  dimensional versions of the fundamental group, since they knew that the nonabelian fundamental group was useful in problems of analysis and geometry. In 1932, Cech submitted a paper on Higher Homotopy Groups to the ICM at Zurich, but Alexandroff and Hopf quickly proved the groups were abelian for $n >1$ and on these grounds persuaded Cech to withdraw his paper, so that only a small paragraph appeared in the Proceedings. It is reported that Hurewicz attended that conference. In due course, the idea of higher versions of the fundamental group came to be seen as a mirage. 
One explanation of the abelian nature of the higher homotopy groups is that group objects in the category of groups are  abelian groups, as a result of the interchange law, also called the Eckmann-Hilton argument. However  group objects in the category of groupoids are equivalent to crossed modules, and so are in some sense "more nonabelian" than groups. Crossed modules were first defined by J.H.C. Whitehead, 1946, in relation to second relative homotopy groups. This leads to the possibility, now realised,   of "higher homotopy groupoids", Higher Homotopy Seifert-van Kampen Theorems,  and the notions of higher dimensional group theory. 
See this presentation for more background.