AI Studio · Guide
Every block, explained
A reference for learners who want to know what a block does, and for teachers and club leaders running the missions.
Blocks
41 blocks in 6 colours. A recipe starts with a golden block and runs from top to bottom.
EventsStart an AI recipe
- When Run is pressed
Starts a recipe. The blocks under it run from top to bottom when you press Run.
- When Lumi is clicked
Starts its own recipe every time you click or tap Lumi while the project is running.
- When thespacekey is pressed
Starts its own recipe every time that key is pressed while the project is running.
- Each time I send a message
Waits for a message in the chat box, then runs the blocks inside. It repeats for every message.
- Keep watching the camera
Takes a camera picture several times a second and runs the blocks inside for each one.
- Each time I finish a drawing
Opens a drawing pad under the stage. Each finished drawing runs the blocks inside.
TeachGive the AI examples
- Learn from the camera asSmile
Records camera pictures as examples of one label. Use one block per label.
- Learn these sentences asHappy
Gives the AI example sentences for one label, one sentence per line.
- Learn these drawings asCircle
Gives the AI example drawings for one label. Draw each example and press Add.
- Load sample:Kind or Unkind messages
Loads a ready-made set of labelled sentences so you can train without typing.
- Read the sentenceyou are a good friend
Hands one fixed sentence to the AI, ready for an "Ask the AI" block.
- Learn to write from this text
Teaches a writing AI which word tends to follow which, using the text you give it.
AI BrainTrain it and ask it
- Train the AI brain
Studies every example taught above it and builds the model. Nothing can be asked before this.
- Ask the AI what this is
The AI looks at the latest message, picture or drawing and answers with a label and how sure it is.
- Quiz the AI on its examples
Hides each example in turn and asks the AI to guess it from the rest. Fills in the Report tab.
- Write8words starting withthe
The writing AI picks one next word at a time, the way a chatbot does, and Lumi says the result.
DecisionsChoose what happens
- If the AI says…
Runs the first space when the AI's answer matches the label, and the otherwise space when it does not.
- If the AI is more than80%sure
Checks the AI's confidence, so your project can act differently when the AI is only guessing.
- Ifscoreis more than4
Compares a variable with a number and chooses which blocks to run.
- Repeat3times
Runs the blocks inside a set number of times.
- Repeat forever
Runs the blocks inside again and again until you press Stop.
- Wait1seconds
Pauses this recipe for a moment.
- Stop everything
Ends the whole project, as if you pressed Stop.
VariablesRemember numbers, like a score
- Setscoreto0
Creates a variable, a named box that remembers a number, or resets it.
- Changescoreby1
Adds to a variable. Use a negative number to take away.
- Setdiceto a random number from 1 to6
Puts a random whole number in a variable, like rolling a dice.
- Showscoreon the stage
Pins a variable to the corner of the stage so you can watch it change.
StageMake Lumi react
- Lumi lookshappy
Changes Lumi's face.
- Lumi saysHello!
Shows a speech bubble.
- Lumi says what the AI thinks
Lumi reports the AI's latest answer and how sure it is.
- Lumi saysScore:and the value ofscore
Lumi says some words followed by the number in a variable.
- Lumi says out loudHello!
Shows a speech bubble and reads it aloud using a voice built into your device, if it has one.
- Lumi does ajump
Plays a short animation.
- Lumi movesright
Moves Lumi one step across the stage. Lumi stops at the edges.
- Lumi goes back to the middle
Returns Lumi to the starting place.
- Lumi becomesbig
Changes how big Lumi is.
- Lumi turnsgreen
Changes Lumi's colour.
- Lumi wearsa party hat
Dresses Lumi up.
- Play achimesound
Plays a short sound effect.
- Play the noteC
Plays one musical note. Put several in a row to make a tune.
- Turn the stagesunny
Changes the stage background.
Shortcuts and tips
- Run
- Ctrl + Enter (Cmd + Enter on a Mac)
- Undo and redo
- Ctrl + Z and Ctrl + Y
- Add a block quickly
- Click it in the toolbox and it joins the end of your recipe
- Remove a block
- Drag it back to the toolbox, or press the × on the block
- Copy a block
- Press the copy button that appears on the block
- Find a block
- Type in the search box at the top of the toolbox
- Run one block at a time
- Press the violet Step button on the Stage
- Show the stage to a room
- Press Present under the stage; Esc closes it
- Start a second recipe
- Drop another golden "When…" block below your first recipe
How the AI works
The Studio's models are deliberately small, so they train in a moment on any device and every decision can be shown.
Sentences
The AI counts which words appear with which label and gives every word a weight for each label. A new sentence is scored by adding up the weights of its words. It does not understand meaning, which is exactly what the Kindness Coach mission lets learners discover.
Camera pictures and drawings
Each picture is shrunk to a small grid of numbers. A new picture is compared with every example, and the five closest examples vote on the answer. Nothing is uploaded: camera pictures stay in the page's memory and vanish when it closes.
Writing
The writing AI records which word follows which in the text it is given. To write, it looks at its last word and picks one of the words that followed it before. Large chatbots work on the same next-piece idea with vastly more text and a much longer memory.
Teaching notes
Each mission is a self-contained session. Steps tick themselves off, so a facilitator can spend the time with whoever is stuck. The questions are for a short discussion once most of the room has finished.
First steps
Recipes, events, variables and finding bugs.
Big idea: A program is a list of steps that run in order, from top to bottom.
Ask afterwards
- What would change if the blocks were in a different order?
- Where else do you follow steps in a fixed order?
Big idea: A variable is a named box that remembers a number. An event lets a program react whenever something happens.
Ask afterwards
- What is the difference between the recipe under "When Run is pressed" and the one under "When Lumi is clicked"?
- Where have you seen a number that an app or game keeps track of?
Big idea: Finding and fixing mistakes is a normal part of programming. Running one block at a time shows exactly where things go wrong.
Ask afterwards
- How did running one block at a time help you find the mistake?
- Why is finding mistakes a normal part of building anything?
Picture AI
Teach an AI to recognise what it sees.
Big idea: An AI learns from examples. More varied examples make it more reliable.
Ask afterwards
- What did the AI actually look at: your smile, or something else in the picture?
- Would it work for a friend, in a different room, or in the dark? Why?
Big idea: To a computer a picture is a grid of numbers. The AI compares a new picture with its examples and goes with the closest ones.
Ask afterwards
- The AI never learned what a circle is. What did it compare your drawing with?
- Why did drawing your examples a little differently each time help?
Language AI
Teach an AI to sort sentences, then test it properly.
Big idea: A text AI does not understand meaning. It learns which words tend to go with which label.
Ask afterwards
- Does the AI understand what kindness is? What does it do instead?
- Can you write an unkind message using only kind words?
Big idea: Lopsided training data makes a lopsided AI. Fixing the data fixes the behaviour.
Ask afterwards
- Who is affected when an AI has seen far fewer examples of one group?
- How could you check an AI's training data before trusting it?
Big idea: Every AI answer comes with a confidence. Good systems act differently when confidence is low.
Ask afterwards
- When is it better for an AI to admit it is not sure than to guess?
- What should happen next when an AI is not sure about something important?
Big idea: You only know how good an AI is by testing it on examples it has not seen, and by looking at which mistakes it makes.
Ask afterwards
- Why is a quiz on hidden examples a fairer test than asking about examples the AI has already seen?
- Two AIs both score 80%. Why might you still prefer one of them?
Creative AI
See how an AI writes one word at a time.
Big idea: A writing AI predicts the next word from the words before it. It can only reuse patterns from the text it learned from.
Ask afterwards
- The writing AI made sentences nobody typed. Did it understand them?
- If an AI learns to write from text on the internet, what could go wrong?
Build your own
Put it all together into something of your own.
Big idea: Real apps wrap an AI in ordinary code: variables, rules and events decide what to do with the AI's answer.
Ask afterwards
- Your game trusts the AI to keep score. When did it give a point it should not have?
- What real apps let an AI make a decision that affects people?
Big idea: Building AI is a cycle: collect examples, train, test, find mistakes, improve the data.
Ask afterwards
- What surprised you most about how your AI behaved?
- What would you need before letting other people rely on it?