[Paper Review] Learning to Sketch with Deep Q Networks and Demonstrated Strokes
This paper proposes Doodle-SDQ, a two-stage deep reinforcement learning framework that teaches agents to doodle by first imitating human stroke demonstrations via supervised learning, then refining performance through deep Q-learning with reward-based feedback. The method successfully generates diverse, realistic drawings in multiple media types, with pretraining significantly improving final performance in complex, high-dimensional action spaces.
Doodling is a useful and common intelligent skill that people can learn and master. In this work, we propose a two-stage learning framework to teach a machine to doodle in a simulated painting environment via Stroke Demonstration and deep Q-learning (SDQ). The developed system, Doodle-SDQ, generates a sequence of pen actions to reproduce a reference drawing and mimics the behavior of human painters. In the first stage, it learns to draw simple strokes by imitating in supervised fashion from a set of strokeaction pairs collected from artist paintings. In the second stage, it is challenged to draw real and more complex doodles without ground truth actions; thus, it is trained with Qlearning. Our experiments confirm that (1) doodling can be learned without direct stepby- step action supervision and (2) pretraining with stroke demonstration via supervised learning is important to improve performance. We further show that Doodle-SDQ is effective at producing plausible drawings in different media types, including sketch and watercolor.
Motivation & Objective
- To develop a machine learning framework that enables artificial agents to emulate human doodling behavior in a simulated painting environment.
- To address the challenge of limited labeled action data in artistic generation by using a hybrid learning approach combining supervised and reinforcement learning.
- To improve sample efficiency and training stability in high-dimensional action spaces typical of drawing tasks, where random exploration is ineffective.
- To enable the system to generalize to unseen drawings and multiple media types, such as sketch and watercolor, without task-specific retraining.
- To demonstrate that pretraining with stroke-level demonstrations is essential for successful reinforcement learning in complex drawing environments.
Proposed method
- The framework uses a two-stage training process: first, a supervised imitation phase where the agent learns to reproduce simple strokes using labeled stroke-action pairs collected from human artists.
- In the second stage, the pre-trained agent is fine-tuned via deep Q-learning using a dense reward signal based on the L2 similarity between the current canvas and the reference drawing.
- The action space includes pen state (down/up), pen location, and color, resulting in a large discrete action space of approximately 200 actions per step.
- To stabilize training in the large action space, the method reduces exploration probability and introduces a two-stream convolutional network: a global stream for overall canvas context and a local stream focused on the pen’s immediate vicinity to improve precision in positioning.
- The model employs experience replay and prioritized experience replay (PER) to improve sample efficiency, and weight initialization from the pretraining stage enhances convergence.
- The system is evaluated in a Simulated Painting Environment (SPE) supporting multiple media types, including black-and-white sketch, color sketch, and watercolor.
Experimental results
Research questions
- RQ1Can a deep reinforcement learning agent learn to reproduce complex doodles without direct step-by-step action supervision?
- RQ2To what extent does pretraining with stroke-level demonstrations improve performance in subsequent reinforcement learning for drawing tasks?
- RQ3How effective is the proposed two-stream architecture in stabilizing training and improving precision in high-dimensional action spaces?
- RQ4Does the hybrid approach of supervised imitation followed by Q-learning generalize to unseen drawings and diverse media types?
- RQ5What role does reduced exploration play in stabilizing training when the action space is large and complex?
Key findings
- Pretraining with stroke demonstrations significantly improves final performance in the reinforcement learning phase, with the best-performing model achieving an average accumulated reward of 320.5 on the QuickDraw dataset.
- The model with rare exploration and weight initialization from the pretraining stage outperforms all baselines, including direct fine-tuning on QuickDraw data, confirming the benefit of the two-stage approach.
- Naive DQN with high exploration fails to converge in the large action space, but performance improves dramatically when exploration is removed after pretraining, indicating that random exploration is counterproductive in this setting.
- The two-stream architecture—especially the local stream focused on the pen’s immediate region—is critical for successful training; removing it leads to failure even with pretraining and reduced exploration.
- The model generalizes well to unseen drawings and media types, successfully generating plausible sketches and watercolor renderings without retraining.
- The average accumulated reward drops when moving from sketch to color sketch, indicating that increased action space dimensionality remains a challenge, especially for future extensions to continuous actions (e.g., pressure, multiple colors).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.