Using Memory-Based Learning to Solve Tasks with State-Action Constraints