  We present the results of hydrodynamic simulations of the formation and
subsequent orbital evolution of giant planets embedded in a circumbinary disc.
We assume that a 20 earth masses core has migrated to the edge of the inner
cavity formed by the binary where it remains trapped by corotation torques.
This core is then allowed to accrete gas from the disc, and we study its
orbital evolution as it grows in mass. For each of the two accretion time
scales we considered, we performed three simulations. In two of the three
simulations, we stop the accretion onto the planet once its mass becomes
characteristic of that of Saturn or Jupiter. In the remaining case, the planet
can accrete disc material freely in such a way that its mass becomes higher
than Jupiter's. The simulations show different outcomes depending on the final
mass m_p of the giant. For m_p=1 M_S (where M_S is Saturn's mass), we find that
the planet migrates inward through its interaction with the disc until its
eccentricity becomes high enough to induce a torque reversal. The planet then
migrates outward, and the system remains stable on long time scales. For m_p >
1 M_J (where M_J is Jupiter's mass) we observed two different outcomes. In each
case the planet enters the 4:1 resonance with the binary, and resonant
interaction drives up the eccentricity of the planet until it undergoes a close
encounter with the secondary star. The result can either be ejection from the
system or scattering out into the disc followed by a prolonged period of
outward migration. These results suggest that circumbinary planets are more
likely to be quite common in the Saturn-mass range. Jupiter-mass circumbinary
planets are likely to be less common because of their less stable evolution.
