Scratch

How does Artificial Intelligence and Machine Learning work?

Artificial Intelligence and Machine Learning are two buzzwords that have blown up in the 21st century, and whilst many of us now know what they are, what’s the difference, how do they actually work, and are robots going to take over the world? I can safely say that no, robots are not going to take over the world anytime soon because AI is nowhere near that advanced as of yet, they are very good at completing one task. For example, there has been a huge rise in AI being used in the healthcare sector, especially tumour analysis, but if you were to give that algorithm a picture of an apple and ask it what it is, it would not have a clue. For more detail on what AI is see this article posted recently.

article-pic.png

Artificial Intelligence, AI, is the bigger picture. It is the overarching field of research that encompasses topics such as, Machine Learning, ML. The two stages of ML are training and inference. First we must train the model using data that we have collected and then we used the trained model to infer suggestions based off of the data collected. There are two main paths to take: Supervised Learning; and Unsupervised Learning. The major difference is that Supervised is based on labelled data whereas Unsupervised in based on unlabelled data which affects the way we feed the data to the algorithms. Supervised learning algorithms, namely K-Nearest Neighbour, KNN, are used to solve two types of: classification; and regression.

KNN assumes that similar data exists in close proximity to each other, hence clustering k pieces of data together. It can be used for classification and regression but it is far more frequently used for classification, so once the data has been collected the model must now be trained. When training the model a train/test split is applied to the data, a training set which would be used to train the model and then a test set which would calculate the accuracy of the model by measuring the distance between the predicted value and the actual value. This can often take form in a confusion matrix. Then once a certain accuracy is achieved the model could be used on data where the correct output is not known.

KNN is one of many different types of algorithm in both AI and ML. Searching algorithms are also very common in the field and have been widely publicised in the media through IBM’s Deep Blue and Deepmind’s AlphaGo. In the example of AlphaGo, Deepmind’s vision was to create an algorithm that could be the best in the world at the game Go. Go is an abstract strategy board game for two players, created in China, in which the aim is to surround more territory than the opponent. The deepmind team based AlphaGo on the Monte Carlo tree search algorithm which is a heuristic search algorithm, often used in these decision making games. In March 2016, AlphaGo beat Lee Sedol, a professional 9-dan rank Go player, proving the power of AI.

Intrigued?

Depending on your age, interacting with AI can come in different forms. Here at Educademy, we offer two AI courses in Scratch and Python, where you can learn how you can incorporate AI into your own life.

The Power of Scratch

Among other languages, here at Educademy we offer courses in Scratch, a basic language mainly used by younger children new to coding to build their own animations and games. It teaches the underlying principles necessary for all coding using a colourful drag-and-drop block structure. Nonetheless, once proficient, it is possible to create some extremely impressive projects. Here are just a few examples of the work that can be done, simply using Scratch!

A common use of Scratch is building the coder’s own version of famous games. Here, @HyperPixel has recreated the notorious Flappy Bird game, adding their own features to make it unique. Whilst this project is complex, we teach the principles required to build it, and students are even given the opportunity to create a more basic version during the Intermediate Scratch: Games and Animations course.

Scratch is also used to create interactive animations. Users can draw or upload images of their characters and backgrounds and make them engage with each other and the person watching. Throughout all our courses, we encourage students to use their creativity to personalise the projects they are creating. Below is a project created by @ihtmason which uses the pen feature.

Scratch can be used to make any number of incredible projects, including story games and games with multiple levels. In the project below, created by @Raysworkshop, your character must make their way out of a castle dungeon, defeating knights and collecting coins and potions on the way. Whilst we set the tasks on our courses, we encourage our students to personalise the story lines and aims of the game so that all their creations are unique.

Scratch is a unique tool that can teach children as young as 7 the founding principles of code, whilst being enjoyable and interactive. Having taught them the necessary skills, our students will be fully equipped to continue building and improving. Learning Scratch is also an excellent gateway to learn more advanced languages, and the principles remain the same. You can discover even more incredible projects here, and all our courses here.

What is Artificial Intelligence and Why is it so Important?

Artificial Intelligence. It’s a phrase that’s been thrown around a lot in the past few years, but what really is it? For most people, what initially comes to mind is probably the idea of talking robots that are capable of passing as human. For some people, AI might even spark fear - probably because of sci-fi movies like I, Robot that involve dystopian worlds in which the human race has been destroyed by the very robots they created to help them! In reality, AI is indeed the idea of trying to make computers think like humans, but at it’s core all it really is, is the the combination of massive amount of data with some clever algorithms.

Where did it all start?

John McCarthy in 2008  Source : Jeff Kubina

John McCarthy in 2008
Source : Jeff Kubina

The idea of AI has been around for centuries - people have been obsessed with trying to create machines to do things for us. However, the term Artificial Intelligence was first coined by John McCarthy (an American Computer Scientist) in 1955 and shortly after in 1956 he organised the infamous Dartmouth Conference, which is where AI was first established as an emerging field of research.

Getting into the Jargon

“Machine Learning”, “Neural Networks”, “Deep Learning” - these phrases (and many more) appear time after time whenever we hear about Artificial Intelligence. They’re all important constituents which make up the field of AI, but what do they actually mean?

  • Machine Learning
    Machine learning can broadly be split into two categories: supervised learning and unsupervised learning. Take, for example, trying to predict housing prices based on how many bedrooms a house has. We would give the computer a training set - this would contain the number of bedrooms for lots of different houses, and how much that house sold for. We use this data to train the computer, and from it the computer learns how to predict housing prices of other houses based on the number of bedrooms. This is supervised learning because we are giving the computer examples and telling it the outcome in order to train it. In contrast, in unsupervised learning, data is given to the machine but there are no outputs (e.g. the price of the house) - instead we ask the computer to make inferences based on the inputs only.

  • Neural Network
    Neural networks are algorithms which have been designed to mimic how the brain works. They are a type of supervised learning algorithm. We give the computer input data with a labelled response, and we design some sort of path in which the data is processed - this path is the neural network. The paths in between the input and output layers are called hidden layers. Algorithms can have any number of hidden layers - this is decided by the programmer.

  • Deep Learning
    Deep learning is any type of machine learning that involves neural networks, but these neural networks have lots and lots of hidden layers (hence the term “deep learning”.

  • Computer Vision
    Computer vision is anything concerned with teaching computers how to “see”. Essentially, we want computers to draw data from images and videos, and this is generally done using deep learning algorithms.

  • Natural Language Processing
    Natural Language Processing (or NLP for short) is an interdisciplinary field which draws on knowledge from linguistics, computer science and AI. It involves training computers how to process human language - whether as speech or text - and often make inferences from this data.

Source: DataCamp

Source: DataCamp

AI in the Modern World

It goes without saying we, as humans, are unbelievably dependent on technology everyday. What you might not have realized, however, is that you probably use AI all the time. How did you find this article? Maybe you asked Siri to find you an article about AI, or you typed “Ariticial Intelligence” into Google and this article popped up. Either way, AI was at the core of your search. Another example that we all take for granted are spam filters in our email inbox - gone are the days of missing an important bill because it was hidden in a cloud of spam! Instead, our inboxes automatically send irrelevant emails to the spam folder (most of the time…).

But there are some even more interesting uses of AI that researchers are working towards in the hope of improving the world we live in:

  • Improving accuracy and wait time of cancer Diagnoses

  • Reducing bias in criminal justice

  • Driver-less Cars

  • Understanding and fighting climate change

Intrigued?

Although it sounds super complicated, there are some amazing resources out there to teach you more about the algorithms behind AI and the impacts AI can have on society. Here at Educademy, we offer courses in AI for kids as young as 7 in two different programming languages - Scratch and Python.

If you want to read some more about AI in the modern world, I would highly recommend reading Hannah Fry’s Hello World: How to be Human in the Age of the Machine. It’s a great introduction for pretty much anyone of any age or ability into the world of AI. She also hosted a podcast with AI Giant DeepMind in which she interviews some of the best researchers in the field. You can listen to the podcast here or on whatever app you use to listen to podcasts.

Cover Photo Source: Franck V


Author: Richa Lad

Happy International Day of Friendship!

International Day of Friendship is a special day each year where we are all given the opportunity to reflect on the important friendships and relationships that make us who we are, and thank the people in our lives who make them better! Here at Educademy, we believe in learning through fun, which includes making friends as you code, and supporting each other throughout your course to best learn together.

We have used Scratch to create this short animation celebrating the power of friendship! If you want to personalise it and send it to a friend this International Friendship Day, you can find the code here.

By the end of our Introduction to Scratch course, students will be fully capable of making animations just like these completely by themselves, along with many other fun games and projects! Book your free trial now.

What is Block-Based Coding?

stem-t4l--PnSpCHYKsw-unsplash.jpg

Block based coding involves dragging and dropping pre-made blocks of code from a list into your coding environment. These blocks are placed in the coding environment by the programmer, where they are able to connect the blocks in a certain order. These blocks then act as a script, and they instruct characters or backgrounds to do certain things. Block based coding is the perfect way to introduce kids to coding.

An example of the blocks available in the Scratch programming language

An example of the blocks available in the Scratch programming language

What is a “block”?

Blocks are essentially little packets of code. Each block is an instruction which can be slightly modified by the programmer in order to get something done. For example, in Scratch you have 7 main different types of blocks - these are looks, sound, events, control, sensing, operators and variables. Looks and sounds blocks are pretty much what you’d expects - they allow you to alter the character’s (in Scratch, known as Sprites) appearance and play music or sounds in the background. Events allow you to trigger a line of code when an event happens - for example “when the space bar is clicked, this sprite goes to this position on the screen”. Control introduces something a little bit more complicated - loops! Used in conjunction with sensing blocks, programmers can do some pretty cool stuff - for example, “if the Sprite touches a different Sprite, that’s game over”. Operators and variables can be used for a variety of things, including counting a players score if you’re making a game, or comparing two numbers.

What are some examples of block based coding?

There are so many block based programming languages out there - probably because they’re such a fun and easy way to get into programming from a young age! If you’re interested in learning one yourself, here are some of our favourites:

  1. Scratch

    Scratch is probably one of the best coding languages for beginners out there. It introduces young programmers to concepts such as loops and if statements in a fun, colourful way. Code is used to animate characters called “Sprites”. Although it seems simple, you’d be surprised at how powerful a language it is.

  2. Blockly

    Blocky is a block based coding language created by Google. It looks similar to Scratch, and can be used to compile code in a few different languages including JavaScript, Python and PHP.

  3. Visual Logic

    Visual logic is a little different from the other two languages - instead of using blocks which connect to make a full script of code, visual logic uses the concept of flow diagrams to teach programming to students.

Why learn block based coding?

An example of one of the games you can make on our Beginners Scratch Course

An example of one of the games you can make on our Beginners Scratch Course

There are so many reasons to learn a block based coding language. If you’re new to coding and find the thought of writing hundreds of lines of code intimidating, learning a block language would be perfect for you! It teaches you how to control the flow of your program and demonstrates what you can do with a few lines of code. They’re the perfect stepping stone to learning text based coding languages like Python, C# or JavaScript. Block based coding initially seems a bit futile - how can it possibly be as powerful as a text based language, when all you have to do is drag a few blocks around? This is a fair enough question to ask - I thought the same thing when I first learnt Scratch, but I’ve been amazed at the multitude of things you can do with it. From creating incredible versions of classic games like Flappy Bird and Space Invaders to writing a machine learning algorithm, block languages like Scratch enable the inexperienced programmer to make some pretty advanced programs in not much time at all.

Where can I learn more?

Here at Educademy, we teach a variety of block-based coding languages. If your child is enthusiastic about programming but doesn’t know where to start, why not check out our beginner’s Scratch course (if you’re not ready to commit, you can also book a free trial). For those with a little more experience, check out our intermediate Scratch course (or try the free trial). And for those interested in the wonders of Artificial Intelligence, check our our AI/ML course in Scratch.

Author: Richa Lad