Headlights go on and off when engine is hot

May be regulator taking a crap.