Refining Manually-Designed Symbol Grounding and High-Level Planning by Policy Gradients