[NOC] Final – Hybrid Fruit Generator

Hybrid Fruit Generator

I would like to make a fun and cute project using the Genetic algorithm. One of my favorite examples of Natural of Code was the Faces Interactive Selection example.

Original Code(Github)from Shiffman

I liked the concept that it can inherit from users’ choices and percentages. Also, they could mutate themselves over generations.

Then I just had a quite silly idea with fruit. When I was young I was impressed that some plants are combined and grow together like Pomato (tomatoes and potatoes) or Tangelo(grapefruit and tangerine).

And I wanted to use something physical objects to choose each fruit. I got two ideas, one is color powder or sand, the other one is wood blocks or puzzles. If I choose the color powder, then I imagined that user can spoon the each fruit powder into the cylinder. However, I chose to work with wood blocks. I liked the feeling of wood blocks because it reminded me of playing house.

I decided to build this project for children to create imaginary fruits. I thought it would be more interesting if we can guess the flavor of the new imaginary fruits, what smell would be, which color will be, how many seeds are in it, etc.

And also I would like to give more fun to see the result. I was inspired by the sand toys and wanted users are actually digging the ground and see the results.


So, I decided to make four fruits; Tomato, orange, kiwi, and cherry. Each fruit has 6pieces and user can combine the pieces.


And I put my Ipad into the box and connected it with ‘Dual’ application.


I used the DNA of the fruit’s inside, outside colors, thickness, and seed’s number(rotation), color, size, and how many pieces inside, etc. I choose the four fruits because it has really different colors and shapes and features. For example, Kiwi has lots of small seeds compared to the Cherry which has only one seed.

P5.js Code Link:  http://alpha.editor.p5js.org/Hayley.H/sketches/HkMEXpXe-

Canvas size 1200×800

Final (But not fianl…)

I actually tried to use Tuio marker to recognize the each piece of the fruits. But, I made the Generic Algorithm code in P5.js and Tuio library was for Processing. I knew that too late, just a few hours before the final presentation! Anyway, I could not finish the recognizing part. But I can do that mouse over instantly.

This is an (almost) final project. I covered the Ipad with sand and there were wooden fruit blocks.

It is a just default screen. from left, tomato, orange, kiwi and Berry.

When half cherry and half kiwi were chosen, then the algorithm made the result in the sand.

 Final Video 



In Natural of Code class, I could see the interesting potential of Artificial intelligence and machine learning algorithms and had lots of questions about what we can do with this skills. Recognizing images and handwriting, voice, face, emotions, all of them are really fancy and attractive concepts. On the other hand, I also wondering where the countless data for machine learning is from and they are objective or not. I hope to have more experimental works for the questions that I have and I want to use them for in Art or Education area.


Leave a Reply

Your email address will not be published. Required fields are marked *