Teachable Machine Extension
Machine Learning is not so far-fetching. The Teachable Machine extension can train your sprites to learn things and build artificial neural networks as a human being does. Are you excited?
Add Teachable Machine Blocks
1) Make sure "Sprites" is selected and click "+" in the Blocks Area.
2) From the pop-up Extension Center page, click "+" to add Teachable Machine extension.
3) Go back to Edit Page. You can find TM category is added to the block palette.
Have Some Fun
Let's try out the new TM blocks and do some fun stuff. We will build a new training model to teach the Panda three basic human emotions, namely "happy", "excited", and "sad".
1) First let's build a new training model. In the Block Area, choose TM category, and click "Training model". The Model Training window will pop up. Rename the three categories as "happy", "sad", and "excited". Click "Learn" in each category to add samples. Then click "Use the model" to save our training model.
2) After the training model is built, the new blocks will be added to the TM category.
3) Let's start create. We want the Panda to recognize your emotion based on what it has just been trained. Drag a when green flag clicked from the Events category, and add onto it a if () then () block from the Control category. We want the Panda to do something when it recognizes your emotion as excited, so we will also add a recognition result is excited block from the TM category.
4) When the Panda recognizes you as excited, we want it to dance while saying "excited". We need to add two Looks blocks say () block and next costume, and wrap them up with a repeat () from the Control category.
5) The script is ready to go. Click the green flag under the stage, the Recognition Window will pop up. When you are recognized as excited, the Panda will repeated dance while saying "excited!".