Ctrl-P2

Machine learning to optimise 3D print processes 2

Beat the AI Agent: Hand‑Crafted Fill Strategies vs. RL Fill Agent

Supervisors: Ruben Schmeitz, Joris Remmers

Introduction

Additive manufacturing—particularly fused deposition modeling (FDM) 3D printing—relies on carefully planned toolpaths to deposit molten material layer by layer. Within each layer, the internal “infill” structure is generated by tracing a path over the build area: this infill pattern directly affects how fast the printer runs, how much filament is used, the final part’s strength under load, and the smoothness of its surfaces. Poorly chosen infill can cause the nozzle to retrace its steps, waste time and material, or leave gaps in thin features.

Our framework simplifies infill generation into a 2D grid model where a virtual pointer can move one cell at a time and toggle its fill state on or off. We impose strict limits on the total number of moves and forbid revisiting already filled cells, so every step must count. A basic zigzag pattern simply sweeps back and forth, turning the source on at the start of each row and off at the end—but it struggles with curves and narrow passages, resulting in extra travel. In contrast, our AI method learns to choose each move strategically, beating zigzag on new shapes by using significantly fewer moves and avoiding needless backtracking—while simpler, handcrafted rules (spirals, edge-following, etc.) have yet to be explored.

The zigzag approach must be toggled on and off to fill the path, whereas our AI Agent completes the entire shape in one continuous pass.

Research Challenge

Your goal is to develop straightforward, rule-based infill strategies that outperform the AI agent on new, complex geometries. Focus on heuristic patterns such as spiral sweeps, boundary tracing, or region partitioning.

Project Tasks

  1. Heuristic Innovation
    • Architect at least two distinct algorithms that exploit geometric features: spiral sweeps, boundary tracing, region partitioning etc.
  2. Implementation
    • Implement each strategy in modular Python code, ensuring efficient grid handling and clear API integration with the existing code.
  3. Comprehensive Benchmarking
    • Assemble a test suite using the provided geometries—symbols, letters, and simple shapes to evaluate your policies. For each policy (including the zigzag baseline and AI agent), measure:
      • Total moves
      • Redundant traversals
      • Execution time
  4. In‑Depth Analysis
    • Perform failure‑mode analysis, identifying geometry classes where heuristics excel or falter. Visualize toolpaths, annotate decision points, and propose refinements.
  5. Bonus Extension (Optional)
    • Explore a 3D adaptation: extend your top‑performing heuristic to a second layer and evaluate multi‑layer coherence.

Required Competencies

  • Proficient Python programming and algorithm design.
  • Analytical mindset for geometric problem solving.
  • Basic familiarity with reinforcement learning principles (helpful but not required).
Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.