Connection Grammar

Motivation

Calvin on computers in 1995

Common Computer Usage

  • Data Management - Input, transfer, edit, and output
  • Data Analysis - Search, optimize, and solve

Design synthesis

As engineering artifacts grow in complexity, we need to offload some design decisions to the computer. We need the computer to help us synthesize many of the minute details in our engineering devices as well as ensure high performance by searching among a myriad alternatives for the optimal combination of building blocks and parameter values [1]

Computers in 2019

This article does not exist

This person does not exist

Request for Comments on Patenting Artificial Intelligence Inventions

Context-free Grammars

Language Hierarchy

  • Regular - Can be recognized by finite state automata
  • Context-free - Can be recognized by pushdown automata
  • Recursively enumerable - Can be recognized by Turing machines

CFG Example

  • S -> NP VP
  • NP -> Adj Noun
  • NP -> Noun
  • VP -> Adj Verb
  • VP -> Verb
Parse tree

Lindenmayer Systems

Development

Used to model plant growth using grammar production rules

Fractal plant generated using L-system
Turtle Interpretation [3]

Interconnected Objects

  • Grammar rules represent valid ways that objects can be connected to one another
  • Non-terminals are connection points
  • Terminals are object placements

Example Application

Godtfred Kirk Christiansen patent

Grammar Rules

  • Stud -> ‘Move(0,-1,0)’ ‘Place(“Brick1x1”)’ Stud
  • Stud -> ɛ

A Tower

Stud

Move(0,-1,0) Place(“Brick1x1”) Stud

Single element tower

Move(0,-1,0) Place(“Brick1x1”) Move(0,-1,0) Place(“Brick1x1”) Stud

Two element tower

Move(0,-1,0) Place(“Brick1x1”) Move(0,-1,0) Place(“Brick1x1”) Stud

Three element tower

Capturing more connection options

Grammar including rotation

  • Stud -> ‘Move(-2,0,0)’ ‘Rotate(90)’ ‘Move(-3,-3,-1)’ ‘Place(3001)’ ‘Move(-3,0,-1)’ Stud
  • Stud -> ɛ

Stud

Move(-2,0,0) Rotate(90) Move(-3,-3,-1) Place(3001) Move(-3,0,-1) Stud

Single element stucture

Move(-2,0,0) Rotate(90) Move(-3,-3,-1) Place(3001) Move(-3,0,-1) Move(-2,0,0) Rotate(90) Move(-3,-3,-1) Place(3001) Move(-3,0,-1) Stud

Two element stucture

Move(-2,0,0) Rotate(90) Move(-3,-3,-1) Place(3001) Move(-3,0,-1) Move(-2,0,0) Rotate(90) Move(-3,-3,-1) Place(3001) Move(-3,0,-1) Move(-2,0,0) Rotate(90) Move(-3,-3,-1) Place(3001) Move(-3,0,-1) Stud

Three element stucture

Structure Fitness

Limitations of grammars

Define syntax, not meaning

A “correct” sentence

We need a way to determine the fitness of the meaning of an utterance to a particular purpose

Fill space

  • Use voxel-based collision detection
Voxels
Filling a box
Filling a sphere
Filling a dish
Filling a castle wall

Probabilistic Grammar Rules

Rules can be assigned a probability to be used to select randomly at generation time

Random colors

  • Stud -> Place(“Gray Brick”) Stud [.8]
  • Stud -> Place(“Green Brick”) Stud [.2]
  • Stud -> ɛ
A probabilistic castle wall
A probabilistic rock face

Augmented Human Design

Sometimes designers may want to manually build sections of the design and allow software to fill in the gaps.

We can convert CAD designs to grammar utterances that can be expanded.

A manually created drawbridge model
Augmenting a generated wall with the model

Other Examples

Castle
Height map
UK Model

Performance

Naive Solver

  • O(cⁿ)
  • Intractable for most n
There are over 900 million ways to assemble 6 2x4 bricks

Linear Solver

  • O(n)
  • Selects first path that passes fitness test
  • Will usually miss global optimum
  • Requires careful grammar ordering

Future Work

Intuitive Grammar Model

Create UX patterns for interacting with grammars in specific domains

More Solver Options

  • Branch and bound
  • Gradient descent
  • Simulated annealing
  • Genetic algorithms

Grammars as machine learning models

References

  • [1] Campbell, Matthew I., and Kristina Shea. “Computational Design Synthesis.” Artificial Intelligence for Engineering Design, Analysis and Manufacturing 28, no. 3 (2014): 207–8. doi:10.1017/S0890060414000171.
  • [2] Lindenmayer, Aristid. “Mathematical models for cellular interactions in development I. Filaments with one-sided inputs.” Journal of theoretical biology 18, no. 3 (1968): 280-299.
  • [3] Bie, Dongyang, Jie Zhao, Xiaolu Wang, and Yanhe Zhu. “A distributed self-reconfiguration method combining cellular automata and L-systems.” In Robotics and Biomimetics (ROBIO), 2015 IEEE International Conference on, pp. 60-65. IEEE, 2015.