Improved action and path synthesis using Gradient Sampling