Friday, October 12, 2018

Rock, Paper, or Scissors?

             I recently worked on a MachineLearningForKids project that I thought was very interesting. The computer was supposed to be designed to recognize whether a hand was rock, paper or scissors. Then the computer was supposed to retaliate. At first, my idea was that I would get the computer to always win. 
             I started by downloading a worksheet, as usual. And I named my new, awesome project "Rock, Paper, Scissors" and started training it to recognize images.

             So the first part in training my computer was to get it to recognize what each hand gesture in the game "Rock, Paper, Scissors" looked like. So I worked on the basics of getting the computer trained to know what  "rock", "paper", and "scissors" hand gestures looked like. I made three bins, for rock, paper, and scissors. I used ten examples for each of the training bins and then hit the "train" button. Then the website said that I was out of API keys, so I had to stop my project for a while for more. 
             When I finally came back to my project, I trained it and started coding on Scratch. When I finished, it turned out that the computer couldn't support a file. Except the computer wouldn't say what the picture was. So I tried to delete all the "paper" pictures and get new ones, but that didn't work either. 
             I had been pretty sure that the problematic picture had been paper, but it wasn't. Or at least, I wouldn't know whether it was or not, because I had run out of API keys again. I sure ran out of keys faster than I anticipated. 
             Maybe I will have better luck next month. I know machine learning can be frustrating sometimes, but as long as I stick to it with determination, I won't let API keys stop me from a bright future in AI. 
             

Chat bots!

              I was on MachineLearningForKids today, and I worked on a project called Chat bots.  (The worksheet had no space between the chat and the bot, but blogger.com says I spell it wrong if I write it without a space.) The idea of the project was to have a sprite on Scratch that answered certain questions on a certain topic. My dad really wanted me to do this project, so I did.
The alligator was supposed to be a
branch, but it looked too much like a creature.
             The first thing I did on this project was create three bins. One of them was habits, one was appearance, and one was food. Since I was doing my project on griffins, I wrote questions about griffins into each bin, making sure they fit the category. Then I went to Learn and Test and hit the train button. 
             When my project was done training, I opened the project in Scratch and started working on the code and sprites. I made a griffin sprite, and a lot of backgrounds, with also a lot of code. Once I had finished that, I checked to see if the project worked. When it did, I showed it to my dad.
             My dad didn't like the project I made because it could only answer three types of questions, so I had to redo it with more answers and questions. For that I made another bin and called it "What." Then I added all the questions Dad had asked before, and added some more, so that if someone typed in something confusing the sprite would say, "What?!". I tested it again.
             This time, my project didn't work. It kept mixing up "Habits" and "What".  So I tried to see what the problem was. I couldn't find anything, so I retrained the project. Then it worked. 
             In the end, the project was really cool. When someone asked about a griffin's diet, I  made the griffins sprite explain the diet of a griffin, then I programmed it to appear to eat the screen. When the computer was asked a question  that was very weird, the griffin sprite would say, "What?!" I thought that was really awesome.