  We study the Donaldson invariants of rational surfaces and their dependence
on the chambers in the ample cone. We build on a previous joint paper in which
we have expressed the change of the Donaldson invariants on an algebraic
surface $S$ under crossing a so-called good wall in terms of certain
intersection numbers on Hilbert schemes of points on $S$. In the current paper
we assume that $S$ is rational. Thish enables us to apply the Bott residue
theorem to evaluate these intersection numbers with the help of a computer.
Combining this with the blowup formulas we obtain an algorithm for computing
the Donaldson invariants of all rational surfaces in almost all chambers. In
particular we compute all the $SU(2)$- and $SO(3)$-Donaldson invariants of the
projective plane of degree at most 50.
