Control with Patterns Based on D-learning