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.

Tuesday, September 11, 2018

Sorting Hat Project

             I did a MachineLearningForKids project recently with a Harry Potter theme.  I titled it "Sorting Hat" and it was designed to sort quotes into different Hogwarts houses. I took a lot of quotes from the Harry Potter book series and sorted them into different bins based on who said each quote, using the worksheet I downloaded. The bins were Hufflepuff, Gryffindor, Ravenclaw, and Slytherin.  
            It was difficult to find really self defining quotes, though. Especially for Slytherin, when so much of the things the Slytherins say are mean. I'm sure there are plenty of really good quotes in the books, it's just that  different people say the same things in different situations.
             After I waited a minute for the project to finish training, I went onto Scratch and used the blocks according the directions. I loved the part where I could draw my own sorting hat. I liked how I could paint it just how I wanted it. It was super delightful.
             The programming for this project went fairly smoothly, though. My project worked better than I thought it would, recognizing some super difficult quotes. I hope I get to do more things like it super soon, because I love the challenge the Artificial Intelligence brings! 
                         

Sunday, September 9, 2018

To The Beach!

             My family and I went to a beach recently. I think it was called Moss Beach, (Fitzgerald marine reserve) and I think it was wonderful. There were so many hermit crabs, and what looked like pebbles on rocks were actually small sea snails with shells so small that I couldn't see the lovely curve until I got really close to them and had a long look. 
             And there were tidepools! Small pools  of seawater with all sorts of marine life within them. Sure, there were hermit crabs and snails, but lots of other things too! There were mussels and all sorts of other creatures I didn't even know the names of!
             And, of course, there was moss. Moss draping across every rock, shell and boulder. It was everywhere! Soft, squishy moss to make up for the harder sand. Delightful green moss hiding in every tidepool, cold from the sea waves splashing on it.
             The waves were great, too. They liked to splash on me, whether I tried to hide from them or not. They rippled and curved beautifully, cool to the touch but not too cold. The beach was full of delight and wonder. 
             Sometimes it was difficult to tell whether a snail or a hermit crab lived in a shell, but I could tell the moment the creature started moving. Hermit crabs move faster, and they aren't as graceful. Sea snails are slow but more graceful, not wobbling side to side when they move. 
             I absolutely loved this beach! I would highly recommend it to  anyone who loves sea creatures! (And, of course, moss!) This place was the best. 

Golden Gate Park!

             This weekend, I travelled to Golden Gate Park with my family and dog, and we went up Strawberry Hill. It's so cool! There are all these paths to get up to the very top. Some paths turn steeply upward, some have a gradual incline, some paths are shadowy, and some paths are sweet and bright with lots of flowers. I love all the birds and squirrels and trees that shake as the breeze comes by. It's really amazing how all these different species live so close together.
             So, my family and I went up the path that seemed the easiest to hike. We all got to see the lake water sparkling below us, and I thought it was an interesting thing to see. Who knew water could sparkle so much? As we climbed higher and higher, the expanse below us grew larger and more lovely. 
They grow into lovely butterflies!
             When we reached the top, it was really magnificent. We could look down and see lots of things. I thought it was awesome. There was also a tree that had fallen down, and we got to climb on it. My dog loved that! The trunk was worn smooth from people climbing on it, but there was a little bit of bark left that we could look at.

             When we walked back down the hill again, my dad pointed out some leaves where he had seen a pipevine swallowtail caterpillar before. I have added his photo of it in here, because it looks so bizarre! We looked up what they looked like later, and they are so beautiful! 
             I enjoyed the Golden Gate Park a lot. It was so breathtaking! I hope I get to go there again soon. Maybe then I will get to see my own pipevine swallowtail caterpillar someday!

Saturday, September 1, 2018

My Dog Project


              I finished another project on the MachineLearningForKids site and I think it was really awesome. I got to use pictures of my dog for it! I have added some pictures of him here that I used. (In my project, I used a lot more pictures than this. I have only added the clearest pictures of my dog, Buddy.) I am super excited to write about this project!
             This project was titled Face Lock. The purpose of my creation was to create a project on Scratch that has a virtual phone ( That was drawn on as a sprite) that locks or unlocks based on whether on not the computer recognizes the face. I used pictures of my dog instead of my own face, because it was way more fun that way. 
             So anyway, I started the project by downloading a worksheet  and training the computer. I made two bins, one called "Granted" and the other called "Denied". I already had a lot of pictures of Buddy on my mom's phone, (Dad had me take them ahead of time) so I uploaded it onto my computer. Next, I squashed them all onto this blog page, then into the "Granted" bin. (Because MachineLearningForKids wouldn't let me just put them in the "Granted" bin directly. I was supposed to use web cam for that part, but my dad already had me take the pictures and I didn't want to waste them.) When I didn't need the images anymore, I took most of them off. 
             I really enjoyed filling up the denied bin. I chose a variety on images, creatures that looked similar to Buddy, and those who didn't. I really liked doing that, because I could use whatever images I wanted to. After I finished training the computer, I went on Scratch and used the Face Lock template (As the instructions said). Then I added some code blocks to make the program work. 
             When I finished the project, it worked pretty well. There was a drawing of someone holding a phone as part of the template. On the top of the phone was an image, and if it was not Buddy,  the word locked would appear on the phone. If the image was Buddy, the word granted would appear on the screen. And when clicked, a button next to the phone would change the image on the screen to another picture. I think the program was brilliant, especially the template. The phone looked so real! And yet, when I really looked at it, it wasn't too hard to draw. Amazing! I can't wait to see what my next project is.



And this is my project! The screen, some of the code blocks.



































Machine Learning: Emotions Project

             My dad really wanted me to get into Artificial Intelligence this summer. (If you don't know what that is, it's the idea and development of computer systems that are trained to be capable of performing tasks that normal require human intelligence to do. For example, a person can train a computer to recognize whether a  person is being mean, by showing it what being mean sounds/looks like. ) Dad said that Artificial Intelligence will get popular very soon, and I think that he is probably right. So far, some companies have been working hard on self driving cars, robots that do human jobs, and all sorts of Artificial Intelligence ideas. I don't want to be left behind! 
             My dad had me go on a website called machinelearningforkids  and work on some of the AI (Artificial Intelligence) projects on that website. I wasn't comfortable with the idea at first, but so far it has turned out to be really fun and enjoyable!
             This website allowed me to train my computer using supervised learning, the machine learning task of teaching a computer from the training data I labeled. The training data always consisted of the set of training examples I made. Then I would open the project in Scratch, a programming language used to make the project come to life by drawings and code blocks. I think this site is really cool.
             The first project I did was called Make Me Happy, and the idea was that when you typed something into the writing bar, the computer would classify whether you typed something mean or not in the writing bar. Then a face drawn on the screen would make either a happy of sad face. My dad showed me how to download the instructions for it. 
              I found the project  pretty simple, once I got the hang of it. I created a project, then created two bins for text. One was labeled, "Mean Things to Say" and the other was labeled, "Nice Things to Say". Next came the most fun part of the project. I got to put good pieces of text in the "Nice Things to Say" bin, and mean pieces of text in the "Mean Things to Say" bin. I had a good time doing that, because I could be creative, coming up with all sorts of nice or mean things to say.
             After I felt confident in my typed words, I hit the train button. It took a few minutes to train, and when it finished training, I opened the project up on Scratch. Excitedly, I created a sprite (a character), and three costumes (Ways for the character to look) for it. The sprite looked like a smiley face, but with a straight line instead of a smile, to make it look neutral. This was one costume, and the other two were happy looking, and sad looking.
             I continued to program the project so that when someone typed something into the typing bar, the computer would classify it as happy or sad, then act accordingly. When the text was kind,  the face would look absolutely delighted, and bounce up and down saying nice things back. When the text was mean, the face would look miserable and sink to the bottom of the page. 
             Artificial Intelligence isn't exactly like a human, but it's close. 
             Later in the day, my dad tested my project. Being older and knowing more words, he caused my project to make a mistake, since it was not familiar with "divine". So the next day, I retrained the project. This time, I had a few new words to add (Thanks, Dad!), so it worked and I was very pleased. Dad couldn't find anything wrong with it. After all, I was very happy to have created something on my own that worked properly. I can't wait to do my next project!
             One little bit of advice I would give you, if you also are using machine learning for kids, is to save your projects on scratch a lot. Every time you refresh the page, or go to another tab for a few seconds, save the project first. One time while I was working on my project, I went to check the instructions and I came back to find my scratch project erased! I had to remake it. That was kind of fun, though. I got to fix any mistakes I couldn't fix before
This image is not from my Make Me Happy project, it is only an example of bins. The faces above are from my project, though. I think it's really amazing what AI can do.

             I think this project has been really excellent fun to make.  I feel really accomplished now that I have finished, because I am glad I trained my computer to do something! After all, it's one little step closer to a future in Artificial Intelligence! I am super excited to begin my next project. I wonder what it will be!
      
Scratch blocks: Just to give an example of what Scratch is like!