**Teaching**

**CS8803 Shape Machine**

Shape Rewriting in Computation Georgia Institute of Technology

2020-2021

Co-instructing with:

**Dr. Athanassios Economou**

School of Architecture

Georgia Institute of Technology

Since 2018, Shape Machine has been adopted in the School of Architecture, School of Interactive Computing at Georgia Institute of Technology, as well as the School of Architecture at the National Taiwan University of Science and Technology (Taiwan), including five elective courses and two graduate architecture studios. The agenda in this series of courses is to implement visual algorithms in Shape Machine for capturing design languages and solving architectural problems. Furthermore, Shape Machine is also used to remodel the computer algorithms in visual representations, especially for those projects conducted by the students from School of Interactive Computing.

Visual Sudoku

Visual Sorting

Visual Single-digit Adder

Unsigned Binary Adder

Ladder Game

Spirograph

Tic-Tac-Toe Robot

**Selected Projects:**Visual Sudoku

Visual Sorting

Visual Single-digit Adder

Unsigned Binary Adder

Ladder Game

Spirograph

Tic-Tac-Toe Robot

**Selected Project:**

**Visual Sudoku**

School of ArchitectureGeorgia Institute of Technology

2020

In the memory of Maki Kaji

**Demo Video on Youtube:**

Visual Sudoku

It is hard to imagine that shapes, geometries, or any visual representation can be ‘coded’ or ‘programmed’ to solve a general problem, especially those numerical problems. Sudokus are classic puzzles that can be seen commonly in newspaper, magzine, and various media for readers to kill time. Sudoku puzzle is recognized as a puzzle contains numbers and rules (see wikipedia of sudoku). However, even though sudoku contains numbers (seems like a numerical puzzle), actually it is a puzzle of spatial relations. That is, those numbers can be replaced with other symbols and it atill works. In the end, sudoku is a puzzle about spatial relationships and nothing to do with numbers. Hence, sudoku is an example that can be resolved very intuitively with Tasalad script, because it is about visual representations and spatial relations. The image above shows the derivation of a 4X4 sudoku puzzle with DrawScript.

**Selected Project:**

**Visual Sorting**

School of ArchitectureGeorgia Institute of Technology

2019

**Demo Video on Youtube:**

Visual Sorting

Sorting is an important algorithmic operation in programming. This project is aiming to demonstrate that binary sorting can easily be done by applying a simple shape rule with Shape Machine. Instead of writing code to sort binary digits, Shape Machine allows users to visually program this logic by considering the symbols 0 and 1 as shapes drawn in the shape rules: 10 --> 01 or 01 --> 10. The first rule when applied multiple times over a string of shapes made up of 0s and 1 produces the so-called big-endian order consisting of all 0s to the left and 1s to the right. The second rule when applied multiple times over a string of shapes made up of 0s and 1s produces the so-called little-endian order consisting of all 1s to the left and all 0s to the right. This video is a proof that Turing machine can be covered by the shape grammar formalism. Furthermore, sorting can be more than binary ones, even for mandarin characters.

**Selected Project:**

**Visual Single-digit Adder**

School of Interactive ComputingGeorgia Institute of Technology

2019

**Single Digit Adder**

Demo Video Link:

Demo Video Link:

__In this project, a single-digit adder is implemented to demonstrate that numerical calculation can be done visually. This adder requires 29 shape rules which accomplish three different main operations: a) translating numbers (1, 2, 3, …, 9) to numbers of 1s (1, 11, 111, …, 111111111), b) moving all the 1s together and c) translating number of 1s (1, 11, 111, …, 111111111) to numbers (1, 2, 3, …, 9, 10). The concept of addition, moving all the 1s together, is commonly used in digital environment. Shape Machine can process this operation visually with a simple shape rule which is demonstrated in another video example (Sorting Binary) to achieve an adder. This example is a proof that implementing a computer with shape grammar is very possible in theory. This may lead us to another question: Can we implement a visual computer and how different will it be?__

**Selected Project:**

**Visual Binary Adder**

School of Interactive ComputingGeorgia Institute of Technology

2019

**Demo Video on Youtube:**

Unsigned Binary Adder

This project shows how an unsigned binary adder can be implemented in DrawScript mode in the Shape Machine. The complete set of symbolic operations is captured here as a shape grammar consisting of 16 shape rules using the shapes 0, 1, C and ___ to perform the calculation. The addition is done exactly like adding decimal numbers, except that here we have only two digits, 0 and 1. The shape rules calculate the addition of the binary numbers writing the results of any carry to the bottom row. For example, if the Shape Machine sees an 1 which is above another 1 and both above a line ____ , deletes them both, draws a 0 below the line ___ and puts a C shape below to the next digit as a “carry” symbol to be substituted later by one of the next shape rules. The final result can be up to 5 digits, because the result can be larger than the number 1111. The example here demonstrates the addition of the numbers 11 and 7 in binary, that is, 1011 and 0111. The Shape Machine executes the sequence of shape rules in DrawScript mode and calculates the result equal to 10010, that is, 18.

**Selected Project:**

**Ladder Game**

School of ArchitectureGeorgia Institute of Technology

2019

**Demo Video on Youtube:**

Ladder Game

This project shows howa classic puzzle ‘Ladder Game’ (Ghost Legs) can be resolved by using visual algorithms implemented in DrawScript. The solution to this puzzle can be intuitively implemented because ladder game is a visual puzzle so that the algorithm can be directly implemented in visual repreentations. This project is a very early project that students started to use Shape Machine and DrawScript in general problem solving, and it led us to a new domain of visual computing.

**Selected Project:**

**Spirograph**

School of Interactive ComputingGeorgia Institute of Technology

2020

**Demo Video on Youtube:**

Spirograph

This project is aiming to simulate a well-known mechnical drawing instrument, spirograph, which allows to use different gears to create different patterns. Since this device runs in a visual way mechnically so that the logic can be easily implemented in DrawScript. From the reult, it is also interesting that the productions look like an animation, that implies that DrawScript can also be adopted to create frames of animation.

**Selected Project:**

**Tic-Tac-Toe Robot**

School of Interactive ComputingGeorgia Institute of Technology

2019

**Demo Video on Youtube:**

Tic-Tac-Toe Robot

This project is showing that DrawScript can be used to implement a fully-functional computer program, such as a program that can play ti-tac-toe with human player. Most of the boardgames such as tic-tac-toe, GO, chess, checkers and so forth, are based on visual representations. Hence, DrawScript allows programmers to bypass the complexity of implementation, since the visual algorithm can be directly imeplemented without any translation from visual domain to symbolic (text-based) domain.