The king explored several countries , doing all he could to fall in love , but in vain ; and at the end of two years ' journeys he turned his face towards home , with as free a heart as when he set out .