$\mathbf{F 1 8}$ (40-6, Japan) Determine all functions $f: \mathbf{R} \rightarrow \mathbf{R}$, where $\mathbf{R}$ is the set of real numbers, such that for all $x, y \in \mathbf{R}$, the following equation always holds:
$$
f(x-f(y))=f(f(y))+x f(y)+f(x)-1
$$
Let the given equation be denoted as (*). In (*), let $x=f(y)$, we have
$$
f(0)=f(f(y))+(f(y))^{2}+f(f(y))-1,
$$

Therefore,
$$
f(f(y))=\frac{1+f(0)-(f(y))^{2}}{2},
$$
$$
\begin{aligned}
f(f(x)-f(y))= & f(f(y))+f(x) f(y)+f(f(x))-1 \\
= & \frac{1+f(0)-(f(y))^{2}}{2}+f(x) f(y) \\
& +\frac{1+f(0)-(f(x))^{2}}{2}-1 \\
= & f(0)-\frac{1}{2}(f(x)-f(y))^{2} .
\end{aligned}
$$

Since $f(y)=0$ does not satisfy (*), there exists $y_{0} \in \mathbf{R}$ such that $f\left(y_{0}\right) \neq 0$. From (*) we get
$$
f\left(x-f\left(y_{0}\right)\right)-f(x)=x f\left(y_{0}\right)+f\left(f\left(y_{0}\right)\right)-1,
$$

Thus, for any real number $z$, there exists $x \in \mathbf{R}$ such that
$$
f\left(x-f\left(y_{0}\right)\right)-f(x)=z,
$$

Substituting into (1), we get
$$
f(z)=f(0)-\frac{1}{2} z^{2} .
$$

Substituting (2) into (*) yields $f(0)=1$. Therefore,
$$
f(x)=1-\frac{x^{2}}{2} .
$$

Upon verification, $f(x)=1-\frac{x^{2}}{2}$ satisfies (*) equation, hence the function sought is $f(x)=1-\frac{x^{2}}{2}$.