Table of Links Abstract and 1. Introduction Background & Related Work Method 3.1 Sampling Small Mutations 3.2 Policy 3.3 Value Network & Search 3.4 Architecture Experiments 4.1 Environments 4.2 Baselines 4.3 Ablations Conclusion, Acknowledgments and Disclosure of Funding, and References \ Appendix A. Mutation Algorithm B. Context-Free Grammars C. Sketch Simulation D. Complexity Filtering E. Tree Path Algorithm F. Implementation Details C Sketch Simulation As mentioned in the main text, we implement the CSG2D-Sketch environment, which is the same as CSG2D with a hand-drawn sketch observation model. We do this to primarily show how this sort of a generative model can possibly be applied to a real-world task, and that observations do not need to \ \ be deterministic. Our sketch algorithm can be found in our codebase, and is based off the approach described in Wood et al. [39]. \ Our compiler uses Iceberg [16] and Google’s 2D Skia library to perform boolean operations on primitive paths. The resulting path consists of line and cubic bézier commands. We post-process these commands to generate sketches. For each command, we first add Gaussian noise to all points stated in those commands. For each line, we randomly pick a point near the 50% and 75% of the line, add Gaussian noise, and fit a Catmull-Rom spline [5]. For all curves, we sample random points at uniform intervals and fit Catmull-Rom splines. We have a special condition for circles, where we ensure that the start and end points are randomized to create the effect of the pen lifting off. Additionally we randomize the stroke thickness. \ Figure 10 shows the same program rendered multiple times using our randomized sketch simulator. \ :::info Authors: (1) Shreyas Kapur, University of California, Berkeley (srkp@cs.berkeley.edu); (2) Erik Jenner, University of California, Berkeley (jenner@cs.berkeley.edu); (3) Stuart Russell, University of California, Berkeley (russell@cs.berkeley.edu). ::: :::info This paper is available on arxiv under CC BY-SA 4.0 DEED license. ::: \Table of Links Abstract and 1. Introduction Background & Related Work Method 3.1 Sampling Small Mutations 3.2 Policy 3.3 Value Network & Search 3.4 Architecture Experiments 4.1 Environments 4.2 Baselines 4.3 Ablations Conclusion, Acknowledgments and Disclosure of Funding, and References \ Appendix A. Mutation Algorithm B. Context-Free Grammars C. Sketch Simulation D. Complexity Filtering E. Tree Path Algorithm F. Implementation Details C Sketch Simulation As mentioned in the main text, we implement the CSG2D-Sketch environment, which is the same as CSG2D with a hand-drawn sketch observation model. We do this to primarily show how this sort of a generative model can possibly be applied to a real-world task, and that observations do not need to \ \ be deterministic. Our sketch algorithm can be found in our codebase, and is based off the approach described in Wood et al. [39]. \ Our compiler uses Iceberg [16] and Google’s 2D Skia library to perform boolean operations on primitive paths. The resulting path consists of line and cubic bézier commands. We post-process these commands to generate sketches. For each command, we first add Gaussian noise to all points stated in those commands. For each line, we randomly pick a point near the 50% and 75% of the line, add Gaussian noise, and fit a Catmull-Rom spline [5]. For all curves, we sample random points at uniform intervals and fit Catmull-Rom splines. We have a special condition for circles, where we ensure that the start and end points are randomized to create the effect of the pen lifting off. Additionally we randomize the stroke thickness. \ Figure 10 shows the same program rendered multiple times using our randomized sketch simulator. \ :::info Authors: (1) Shreyas Kapur, University of California, Berkeley (srkp@cs.berkeley.edu); (2) Erik Jenner, University of California, Berkeley (jenner@cs.berkeley.edu); (3) Stuart Russell, University of California, Berkeley (russell@cs.berkeley.edu). ::: :::info This paper is available on arxiv under CC BY-SA 4.0 DEED license. ::: \

From Program to Sketch: Modeling Non-Deterministic Observations in Code Generation

2025/09/27 02:00
2 min read
For feedback or concerns regarding this content, please contact us at crypto.news@mexc.com

Abstract and 1. Introduction

  1. Background & Related Work

  2. Method

    3.1 Sampling Small Mutations

    3.2 Policy

    3.3 Value Network & Search

    3.4 Architecture

  3. Experiments

    4.1 Environments

    4.2 Baselines

    4.3 Ablations

  4. Conclusion, Acknowledgments and Disclosure of Funding, and References

    \

Appendix

A. Mutation Algorithm

B. Context-Free Grammars

C. Sketch Simulation

D. Complexity Filtering

E. Tree Path Algorithm

F. Implementation Details

C Sketch Simulation

As mentioned in the main text, we implement the CSG2D-Sketch environment, which is the same as CSG2D with a hand-drawn sketch observation model. We do this to primarily show how this sort of a generative model can possibly be applied to a real-world task, and that observations do not need to

\ Figure 11: Examples of thresholding scene images using the LZ4 compression algorithm. The left represents our test set, the right represents our training distribution.

\ be deterministic. Our sketch algorithm can be found in our codebase, and is based off the approach described in Wood et al. [39].

\ Our compiler uses Iceberg [16] and Google’s 2D Skia library to perform boolean operations on primitive paths. The resulting path consists of line and cubic bézier commands. We post-process these commands to generate sketches. For each command, we first add Gaussian noise to all points stated in those commands. For each line, we randomly pick a point near the 50% and 75% of the line, add Gaussian noise, and fit a Catmull-Rom spline [5]. For all curves, we sample random points at uniform intervals and fit Catmull-Rom splines. We have a special condition for circles, where we ensure that the start and end points are randomized to create the effect of the pen lifting off. Additionally we randomize the stroke thickness.

\ Figure 10 shows the same program rendered multiple times using our randomized sketch simulator.

\

:::info Authors:

(1) Shreyas Kapur, University of California, Berkeley (srkp@cs.berkeley.edu);

(2) Erik Jenner, University of California, Berkeley (jenner@cs.berkeley.edu);

(3) Stuart Russell, University of California, Berkeley (russell@cs.berkeley.edu).

:::


:::info This paper is available on arxiv under CC BY-SA 4.0 DEED license.

:::

\

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact crypto.news@mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.