Motor skill learning with local trajectory methods