Teach Your Computer to Make Art!

You made it! In Level 3, you will turn the code into art!

1. Find the new code.

Find the first line of code your computer created. It starts with the word “Background”. It will start on the line right under your command - you might need to scroll up to see it.

Can you see it?


2. Put your pointer at the beginning of “Background”.

Use your keyboard.

Click with the left-click button.

Hold the left click button down, and use your trackpad to highlight the robot code all the way to the end of the last letter.
Don’t move your pointer.

Now lift your finger off the left click button.


Don’t move your trackpad or touch another button.

3. Time to copy the code.

Press the ‘Right Click button’.

Use your pointer to choose the option that says “copy”.

You have just copied all the code, saving it in your computer's memory.

Good job!

4. Open Make Art.

Using the Computer Kit? Open the Make Art app on your desktop. It should take up the whole screen.

Don’t worry – Terminal is still there! You can find it in the bar on the bottom of the screen.

Using a Mac? Open the program by clicking on these words .

Can you find the ‘Playground’ button in Make Art?

Click it.

5. Let’s paste the code!

Do you see the black box with "1" written in the top left hand corner? Place your pointer in the box. Click inside it with the left click button.

Now, hold down the 'CTRL' button again. Keep holding it down, and press the 'V' button. Now let go off both buttons.

You just pasted the code that the computer saved in its memory.

Let’s see what happens!

6. Your computer just made art!

That’s great! You just helped your computer make something awesome.

What can you see in the picture?

Because you used the -seed number 1000, you will see something like this:

7. It's time to fix code that doesn't work - just like a master coder!

Let's see what happens when the computer makes mistakes.

First, delete all the code in the box, until it’s completely empty.

Now, go back to Terminal.

Click on the button that says “LXTerminal” in the bar at the bottom of your screen.

Scroll down in Terminal, until there's no more code!

8. Get your command back, and change it!

You should see a flashing cursor.

Press the UP ARROW [↑] on your keyboard to get your command back. You should see...

th samplepi.lua cv/tomita-deepascii.t7 -gpuid -1 -length 1000 -temperature 1 -primetext "background" -seed 1000

9. Change the seed number.

The seed number in your command is 1000.

In other programs that use Machine Learning, this number is random. The computer chooses a seed number for itself - sometimes it just uses the time!

In your program, you have the power to control the code your computer makes.


Press your backspace key 4 times to delete the 1000.
Use the keyboard to type the number 12, where ‘1000’ used to be.

Press Enter.

It’s alive!

10. Let’s see what your computer made this time.

Do you remember how to turn the machine learning code into awesome art?

That’s right!
Select your code, starting from the word ‘Background’ all the way to the last character - just like you did before.

Now copy it!

Hint: (Right click button + copy)

Open Make Art again from the bar at the bottom of your screen. Put your pointer in the into the black box, just like last time.

Now paste your code.

Hint: (Hold CTRL and press 'V')

What do you see?

11. Are there errors in your art?

Do you have a white square on your screen, instead of new art?


Because your computer is learning, it can make mistakes. These mistakes are called 'bugs'.

Let's find them and see if we can fix the code.

Look in the blue block with the white writing. It will tell you where the bugs are.

Can you see the line number?
It comes after the words "Syntax error on line'.
This tells you which line you will need to delete.

12. One step at a time.

Find the line that has the bug.

Put your pointer at the end of the line, closest to the white art box.
Use your backspace key to delete the whole line of code.

Keep checking the blue box for line numbers!

Now delete the code, line by line, until the blue box disappears! Awesome - you fixed it!

13. Let’s hack it!

Now we’re going to try something even better than fixing the code.

Your computer will make its own, unique art – with your help of course! Delete all the code in the box one more time.

Now, go back to your Terminal, and press the UP ARROW [↑] to get your command back... just like last time!

14. Choose your own, brand new seed.

Delete 12 using the backspace key - press it twice.

Now type: any number you like, as small as 5 or as big as 100,000,00.

Press Enter.

Awesome – your computer is making more code!

What do you think it will look like?

15. Let's turn it into art!

Just like last time!

  • Select the new code and copy it.
  • Now open Make Art and paste it.

What happened?

  • If your code made art right away – Yay!
  • If it didn’t, you can show off your new bug-fixing powers! More yay!

Woohoooo! You did it!

Even though it was a challenge, you helped your computer learn how to make art!

And you gave it the ability to teach itself. Well done!

Now you can make as much art as you like!

Remember to change the –seed number each time you try again.

What if I want to play again later?

You can! You have installed the program and downloaded all the files - and now your computer knows how to Make Art! If you want to play with the program again, it’s simple.

Open Terminal
Type:cd Tomita
Press Enter

Type the long command: th samplepi.lua cv/tomita-ascii.t7 -gpuid -1 -length 500 -temperature 1 -primetext "background" -seed 1000

Remember to change the seed number!

That took some skills!

Why not check out other challenges and games in Kano World? You'll find even more coding powers waiting for you.