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.

Games made in Unity: Hollow Knight by Team Cherry

Image source from Hollow Knight by Team Cherry (2017)

Image source from Hollow Knight by Team Cherry (2017)

It was the shared nostalgia for a “classic game” that pushed three Australian game developers to make their own studio, Team Cherry, in 2012. Ari Gibson, William Pellen, and David Kazi from Adelaide bonded over Zelda II: The Adventure of Link, while brainstorming what would’ve become a hot-selling title and one of the best representatives of the glorious metroidvania game genre. Nonetheless, like many successful studios, this one came from simple, humble beginnings as well.

Combining a game-jamming mentality with massive animation talent, Team Cherry broke into the large leagues in 2014–15 aided by their very successful Kickstarter campaign and diverse stretch goals. More than delivering on their early promise, Hollow Knight was released in February 2017 and is keeping half-a-million side-scrolling, bug-zapping gamers very enthusiastic.

Image source from Hollow Knight by Team Cherry (2017)

Image source from Hollow Knight by Team Cherry (2017)

Wicked, wonderful, and just plain weird, Hollow Knight can be a challenging and artful insect-based adventure. As a cute little bug, you go up against deadly creatures and complicated traps while unraveling the mysteries in fungal wastes, bone temples, and ruined “gothic-like” underground cities. Buying maps along the way, you wield the Knight’s nail, a sword-like weapon, to keep wondrous enemies and fearful bosses at bay.

The game emphasizes skill and exploration across the vast, interconnected underground kingdom known as Hallownest. The key element the developers were interested in reproducing was the sense of going on a grand adventure in a strange land full of monsters and funny characters and secret nooks and crannies, in order to convey the feeling of forging your own path in uncharted territory and having to face unknown dangers.

Brought to life by stunning visuals, Hollow Knight has been well received by critics, holding an aggregate score of 86/100 on Metacritic, and described by one PC Gamer critic as “the most beautiful hand drawn game [he’d] ever played.” Another reviewer lauded the gameplay too: “Hollow Knight knocks it out of the park in terms of gameplay and presentation with a number of the most effective 2D animation I've seen for a game.”


Hollow Knight is a superb reminder that lovely games don’t necessarily must target grand technical achievements. Team Cherry decided to require full advantage of built-in development tools in Unity and extensions available on the Asset Store so as to satisfy their technical goals. This allowed them to concentrate on what they're best at: creating stunning art. They produced the striking visual style from hand-drawn art and traditional animation created in Photoshop and saved as simple PNGs. Then they assigned a couple of easy shader types including sprite_default and sprite_diffuse with minor modifications to those assets. Rather than using complex 3D lighting systems, they handled lighting with soft transparent shapes. The team built levels with 2D assets layered in an exceedingly 3D environment using many of Unity’s out-of-the-box 2D features, including 2D Physics, Sprite Packer, and therefore the Particle System with the assistance of the 2D Toolkit from the Asset Store.

While the team does have some coding experience and did write custom scripts, they created all the enemies and interactive elements using Playmaker, a five-star visual-scripting package.

Reading Gmail with Python - Part TWO

email-4800274_960_720.png

This is a follow-up to my previous blog from my automating reading Gmail messages with Python. If you haven’t checked it out yet, read that blog post before this one.

Another cool thing you can do with Python is reading emails using the Python. In this blog post, I’ll be using a library called “IMAP tools”. IMAP refers to an Internet Message Access Protocol. Unfortunately, Yagmail can only send emails so we’ll have to install a new library in this blog post. If you’re curious, you can read the documentation for that library here.

INSTALLING IMAP TOOLS

Similarly to last time, we’re just going to type in “pip install imap-tools”. Alternatively, you can use an IDE like VSCode and use the terminal there!

PYTHON SCRIPT

from imap_tools import MailBox, AND, MailMessageFlags
PERSONAL_EMAIL = 'yourpersonalemailhere@gmail.com'
PASSWORD = '16passhere'

def check_message(msg):
    filename = "".join(char if char.isalnum() else "_" for char in msg.subject) + ".txt"
    with open(filename, "w") as file:
        file.write(msg.text)

with MailBox('imap.gmail.com').login(PERSONAL_EMAIL, PASSWORD) as mailbox:
    for msg in mailbox.fetch():      
        if MailMessageFlags.SEEN not in msg.flags: 
            check_message(msg)

I’ve wrote the code entirely myself using the iMap Tools library. The code I’ve wrote checks if a message is unseen. If it is a new text file containing the emails subject and inner text will be created.

An example image of a new folder

An example image of a new folder

Before Running the Program

Firstly, create a new folder and store the Python file within this folder. This will be where all the unseen emails will be stored in .txt files.

  1. The Variables and Importing the Library

from imap_tools import MailBox, AND, MailMessageFlags
PERSONAL_EMAIL = 'yourpersonalemailhere@gmail.com'
PASSWORD = '16passhere'

Here, I’m importing the necessarry things from the library and am declaring the constants that we’ll be using. In the PERSONAL_EMAIL variable, store your gmail email and in the password variable, enter your 16 character password that was received in part one.

2. The Library Using Gmail

with MailBox('imap.gmail.com').login(PERSONAL_EMAIL, PASSWORD) as mailbox:
    for msg in mailbox.fetch():      
        if MailMessageFlags.SEEN not in msg.flags: 
            check_message(msg)

Firstly, we’ll log in with the supplied username and password in the mailbox. Next, we use a for loop to get each message in the mailbox. For each message, if it is not seen, we’ll call a function to store the message subject and text to a .txt file.

3. The Check Message Function

def check_message(msg):
    filename = "".join(char if char.isalnum() else "_" for char in msg.subject) + ".txt"
    with open(filename, "w") as file:
        file.write(msg.text)

This function will check if the file name is appropriate and doesn’t contain any character that Windows can’t recognise in the subject line e.g “?”. This will then store the subject name as the .txt file. The new file name will then be written to a new file and the message text will be stored in the respective text file. This rinses and repeats for every message.

An example image of the final output

An example image of the final output

Quite a simple program but it works rather well if you want all your emails stored somewhere!

Author: Sophie Dillon

10 video game facts you probably didn't know

Do you love video games? Of course, you do! Well now is your chance to catch-up on 10 unique video game facts which you might have not known to show off to your friends, or possibly needed in the next video game inspired trivia quiz you do on Buzzfeed!

Tetris GameBoy version

Tetris GameBoy version

1. The first video game in space

The first video game played in space was the Game Boy version of tetris. In 1993, Tetris traveled aboard a Soyuz TM-17 rocket to the MIR Space Station, where it was played by the Russian cosmonaut Aleksandr A. Serebrov. The game was sold at auction for $1220 later.

Minecraft

Minecraft

2. The first version of Minecraft was created in just six days

In 2009, the Swedish programmer, Markus Persson (also called “Notch”), set out to create a sandbox game which allows free and organic exploration in the virtual world. Initially, the game was called “Cave Game” before quickly being renamed “Minecraft”. The game was created in six days, from 10 May 2009 to 16 May 2009. The very first alpha version was released the next day!

Concept Xbox

Concept Xbox

3. Xbox was nearly called the DirectX Box

When the first Xbox was being discussed, Microsoft was going to name the console DirectX Box, named after the DirectX team. The console was initially going to be a silver X with a PC board inside and a hidden Windows OS. The name was eventually dropped to the name we know today, Xbox.

Infinity blade

Infinity blade

4. Fortnite had to remove a weapon as it was too powerful

The Fortnite creator, Epic, had to remove a ‘mythic’ weapon in 2018 called the Infinity Blade because it was too powerful. The item gave players unprecedented mobility, the ability to nearly one-hit any other opponent, and the ability to break down any player-built structure, all while restoring a significant chunk of the player’s health back with each kill. Let's hope Epic doesn't make the mistake again.

Playstation 2 Startup Screen

Playstation 2 Startup Screen

5. PlayStation 2 startup screen

If you have ever had, or even just played, a PlayStation 2 you might remember the seemingly random blocks and towers when turning on the console. Well, this actually represents your game progress. The more you play and save your game, the taller the blocks and towers appear. The towers represent the game, and the longer you play the taller they get. The blocks represent saved data.

Creeper

Creeper

6. The creepers, in Minecraft, began as a coding error

One of the most popular mobs in Minecraft, the creeper, actually started as a coding error. Persson didn’t actually design the monster but was actually set out to create a pig; However, he accidentally switched figures for desired height and length when inputting the code. The result is the mob we know and love.

World of Warcraft

World of Warcraft

7. World of Warcraft pandemic

In the MMORPG World of Warcraft, there was a virtual pandemic which began on September 13th 2005 and lasted for one week. It started by accident due to an oversight by the developers. The epidemic began with the introduction of the new raid Zul'Gurub and its end boss Hakkar the Soulflayer. When confronted and attacked, Hakkar would cast a hit point-draining and highly contagious debuff spell called "Corrupted Blood" on players. The spell, intended to last only seconds and function only within the new area of Zul'Gurub, soon spread across the virtual world by way of an oversight that allowed pets and minions to take the affliction out of its intended confines. This resulted in changes in normal gameplay for a while until the pandemic was able to be controlled by the developers.

Sonic the Hedgehog

Sonic the Hedgehog

8. Sonic the Hedgehog is inside all of us

A gene and protein that separates your right brain from the left, and determines you have two eyes is called sonic hedgehog. The name was not inspired by the video game but in fact a comic-book series. A British post-doc named Robert Riddle drew inspiration from a Sonic comic his 6-year-old daughter was reading. The gene appropriately has a spiky appearance. 

Enderman

Enderman

9. The Enderman language, in Minecraft, is actually English in reverse or pitched down

One of the most haunting Minecraft species is the Enderman. Their speech is nearly impossible to understand with the human ear, however, most of its speech is, in fact, English words and phrases played backwards or lowered in pitch. So next time you play Minecraft why not try to translate some!

FIFA 2001 - Smell the Pitch disk

FIFA 2001 - Smell the Pitch disk

10. Games that had a smell

The UK version of FIFA 2001 and Gran Turismo 2 shipped with “scratch and sniff” discs. If you scratched FIFA's disc, you would “smell the pitch”. Rubbing Gran Turismo 2’s disc would deliver the authentic smell of a “pit-stop”.

Do you want to make your very own games?

Join us on one of our Online Summer Coding Camps for Kids and Teens to learn how to make your very own game in various programming languages


Reference:

  • https://www.amazon.co.uk/Tetris-Game-boy-Boy/dp/B00002SVEO

  • https://static.independent.co.uk/s3fs-public/thumbnails/image/2018/02/09/13/st.jpg?w968

  • https://en.wikipedia.org/wiki/File:Minecraft_cover.png

  • https://qph.fs.quoracdn.net/main-qimg-d0a88777901b7a39c92fc6b14c3c7684

  • https://cdn.vox-cdn.com/thumbor/T4AztdWd7sDmeUFNf-QKJyXgj5U=/1400x1400/filters:format(png)/cdn.vox-cdn.com/uploads/chorus_asset/file/13615729/Screen_Shot_2018_12_10_at_10.19.30_AM.png

  • https://thumbs.gfycat.com/FlickeringWearyAmericankestrel-max-1mb.gif

  • https://art.ngfiles.com/images/1114000/1114896_amenduhh_creeper.gif?f1576629556

  • https://upload.wikimedia.org/wikipedia/en/thumb/9/91/WoW_Box_Art1.jpg/220px-WoW_Box_Art1.jpg

  • https://www.pinterest.co.uk/pin/839428818017038727/

  • https://gamepedia.cursecdn.com/minecraft_gamepedia/3/39/Enderman_Screaming.gif?version=26c249d6cc6e4e920614c2506b95bd13

  • https://1.bp.blogspot.com/-b4qjQjq7jVU/UAZ9OknI0yI/AAAAAAAAB6A/caQvv_11JYw/s1600/FIFA+2001.jpg

Author: Robert Nimmo

Automating the boring tasks in Google Drive

Have you ever got bored doing a monotonous task over and over again, on google drive, and wish there was a simpler and less repetitive way to get these tasks run. Google provides a scripting language called Google Apps Script for that very reason, which lets you automate the boring stuff. There are other ways to automate tasks in Google Drive such as using external libraries/modules in programming languages like Python. One of the many libraries in Python for this is PyDrive, which lets you use the Google Drive API to automate your own tasks. For this blog tutorial, we will be sticking to the Google Apps Script which doesn’t require any additional software as you can write this all in your browser. Google Apps Script is a flavour of JavaScript and has a very similar syntax to JavaScript, while also allowing you to do Google Drive specific operations easily.

Through this blog tutorial, we will explore how to create some simple automated operations to do which you can expand on afterwards.

To start go to your Google Drive homepage at https://drive.google.com/drive/my-drive.

Click on “New”, then press “more” at the bottom of the pop-up. You should now see an option called “Google App Script” click on this.

This should open a screen like the screenshot below.

1.jpg

Automating creating a new GoogleDoc and sharing

Often when you are working in a workplace or in a team project you might be having to create multiple Google Drive documents and sheets. This often requires sharing with the same multiple people which can become quite annoying after a while. Especially if it’s there is a long list of people. So we are going to create a script to do this for us!

Firstly, once we have created a new Google App Script document, edit the project name to whatever you would like. I’m going to call mine “Create GDoc for project”. This might take a few seconds to be done. If you have an error try creating a new project instance by clicking “File” => “New” => “Project”.

Once you have created a project you will see a file called Code.gs which has a function called “myFunction()”. Feel free to delete this as we will start with a blank file. 

We will start by creating a function to do the operation.

function createDocument() {

}

We have created the function so let’s create the new document. As we are using the Google App Script language Google has made it really easy to create new documents by using the “DocumentApp” class.

function createDocument() {
  var doc = DocumentApp.create('Daily Briefing');
}

Now for the last step of our simple script, let’s share the document with a set of predefined users. Firstly we need to get the document file id. We can get this easily by using the “getId()“ method with our doc object. Afterwards, we are going to use an array to store the other user’s emails. Using a for loop we will, one by one, add each new user as an editor to the document by the file id.

function createDocument() {
  var doc = DocumentApp.create('Daily Briefing');
  var fileId = doc.getId();
  
  var editors = ["user1@gmail.com", "user2@gmail.com"];
  
  for (var i=0; i<editors.length; i++) {
    DriveApp.getFileById(fileId).addEditor(editors[i]);
  }
}

To run the finished program press the run button at the top of the window. When you first run the program for the first time you might get a popup like below.

3.PNG

If this happens follow the steps to authorise your app to run. And allow the app to access it’s required permissions.

We have now finished showing you how to do this basic example, but that shouldn’t stop you looking further. Why not create your own scripts for your own need or edit this code yourself with the help of the Google App Script Guides to add new features. You could modify the code so it’s run at certain times of the day or you could even have the document set up with a predefined style already.

Do you want to learn more?

If you enjoyed this tutorial and want to find out more about programming and scripting why not join one of our Online Summer Camps for Kids and Teens.


Author: Robert Nimmo

The growth of the game industry

Image Credit: Newzoo

Image Credit: Newzoo

When somebody talks about the industry of entertainment, most individuals think straight away about the movie industry and the music industry. Numerous individuals watch the Oscars, Grammys, Golden Globes, MTV Video Music Awards, etc. 

Of course, there's an undeniable charm within the film and music industries. But would you be shocked to find out that these two are not the top-grossing sectors in entertainment? As a matter of fact, these two put together can’t even match half the revenue the video game industry is earning. Concurring to the most recent figures, the video game commerce is presently bigger than both the motion picture and music businesses combined, making it a major industry in entertainment. This year, the worldwide video game industry is esteemed at least US$152.1 billion from 2.5 billion gamers around the world. By comparison, the worldwide box office industry was worth US$41.7 billion whereas worldwide music incomes come to US$19.1 billion in 2018.

Consider the top blockbuster movie to date, Avengers: Endgame. When it premiered on April 16, it raked in over US$858,373,000 during its opening weekend. It even surpassed last year's Avengers: Infinity War, which generated US$678,815,482 in gross revenue.

In any case, while these movies got so much consideration and appreciation from the overall population, they still couldn’t beat the highest-grossing entertainment launch in history, Grand Theft Auto V’s release back in 2013, which earned US$1 billion in just over three days.

More fame doesn’t mean, all things considered, greater profits.

The game industry can be arranged into three principle classes – PC, mobile, and console gaming. Portable gaming, which incorporates smartphone and tablet gaming, is the biggest sector, representing US$68.5 billion of the complete evaluated income this year, up by 10.2 percent from 2018.

Image Credit: Newzoo

Image Credit: Newzoo

Console gaming is evaluated to create US$47.9 billion in incomes, up 13.4 percent from a year ago, while PC gaming is seen gaining US$35.7 billion, up 4 percent.

Portable gaming is relied upon to take up 59 percent of the worldwide game market by 2021, while console and PC gaming will have 22 percent and 19 percent individually. Plainly, portable gaming has gone far since its introduction to the world in 1997 when the compelling Snake was pre-introduced in more than 400 million Nokia telephones.

Last but it least, we ought to mention E-Sports. E-sports means "electronic sports", a kind of competition that includes the utilization of computer games. An ordinary e-sports competition appears as multiplayer computer game rivalries between groups of expert gamers. The most widely recognized games played today are multiplayer online battle arena, first-person shooters, battle royales, and real-time strategy games. A couple of the most noteworthy and most prestigious e-sport competitions today are played in Dota 2, Fortnite, Counter-Strike: Global Offensive, League of Legends, StarCraft II, and Overwatch. With its developing prevalence, e-sports has raised casual gaming into a competitive game of skills, strategy, and team play. Today, being a professional gamer can be a rewarding career as numerous competitions are being organized in different parts of the world and tens of thousands to millions of dollars being given away as prizes. The prize pool for the latest Dota 2 competition, for instance, came to over US$34 million

Gone are the days when gaming was only an activity to pass the time. The ascent of e-sports has radically changed the image, developing the gaming culture from a niche community to what is now something that millions of people watch like sports.

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.

Is Coding Hard To Learn?

coding.png

Often, people can be put off by programming because it can be too hard, requires too much persistence - or just is too new and scary. These are all perfectly reasonable things to be put off by, but coding is an amazing and rewarding skill. In this article, I’ll be covering why people shouldn’t be put off by coding.

“It’s too hard”

This is probably the most common excuse on why people don’t want to learn coding. At first, coding can appear hard, certainly. But most things can be hard at first. Learning a language could be hard at first if you don’t know the basics, similarly to riding a bike or learning mathematics. If you don’t know the basics, coding can be hard. Although it may take time and patience - once you get the basics down - it really is a rewarding experience.

“It requires too much persistence”

People mainly use this excuse as they genuinely believe that they cannot pursue anything that requires a lot of time. This simply isn’t true - this stems from a belief of self-doubt that people cannot do something.

For example, imagine that a child liked a video game. They may be completely new at a video game, but continued playing it regardless as that video game was their passion.

Imagine coding like this but rather than this, it is a passion that is developed over time rather than instantaneously. Everyone starts somewhere and if you continuously pursue coding and work at it, you will undeniably get better and better at it.

“It’s too new and scary”

Most skills are going to be new and scary. No one is going to be good at coding overnight - it is something learnt all the time. Although it might sound intimidating, and sound as if it’s only for naturally logic-based thinkers, this simply isn’t true. Why not try one of our courses and see what you’re capable of?

Beginner Friendly Languages

Image credit: Wikimedia Commons

Image credit: Wikimedia Commons

Some languages can be quite hard and off-putting due to the complexity of each respective language. Such examples include C, C++, etc. Some beginner friendly languages include:

  • Scratch! When you think of a programming language, Scratch may not necessarily be the first thing that comes to mind. However, Scratch is most definitely the beginner-friendly programming language out there, at least when it comes to children. It works on the principles of “block-based programming”, where you may not necessarily be directly writing code, but you’re learning the fundamental logical thinking behind learning code.

  • Python! Python is recommended as an introductory language for lots of people. The simplified syntax is similar to the English language. This code can also be executed a lot faster.

  • Javascript! If you’ve ever been interested in web development, we offer a beginner-friendly and welcoming course for Javascript. This is a highly flexible language and would be welcoming for 11 years old onwards.

If you’re interested in any of these languages, we offer a wide range of introductory courses for these languages from the most friendly tutors. If this strikes you and £180 seems too pricey, use code SD-QCNQ-Z87X-SU20 for 20% off!

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

Where Should I Host My Python Project?

So you have finished your Python project and want to share it with your friends and family, however, you don’t know where to start. Well this blog post should help you narrow down the options to find the best option for you and your project requirements.

Hosting your project can be the most exciting part when developing your project as you now can share your hard work and talent with everyone else; however, this can also be one of the most frustrating and sometimes complicated parts due to the number of options out there and complexity of hosting your project.

The first question you have to ask yourself is what type of project is it? Are you using a web framework, such as Django or Flask; Are you wanting your code to be scheduled to run automatically at a certain time of day; Are you using a graphical library such as PyGame or Turtle; Or are you just wanting to host a console (command line) application. Depending on how you answered this question depends on where you end up hosting your project. 

Web framework hosting

This is the most common reason why you would probably be hosting a Python project. Web frameworks in Python, such as Django and Flask, are currently a very popular way to create small and large scalable data driven websites due to the simplicity in creating the website and the power of the Python programming language. This has resulted in a lot of hosting sites to support hosting Python web frameworks. Two of the most popular are PythonAnywhere and Heroku.

logo300x300.png

PythonAnywhere

PythonAnywhere is one of the most popular sites for hosting your Python project, especially for small personal projects, and there is a good reason for this. You can host, run, and code Python all in the cloud! Unlike many other hosting sites PythonAnywhere has a free tier for hosting. This is great when you don’t want to spend loads and just want to share it with friends and family. There are limitations with this, however, if you are not expecting your website to have a lot of traffic and don’t mind not being able to change your url this is a great starting place. You can upgrade with your needs later as your website grows in scale. One of the biggest advantages of using PythonAnywhere is the simplicity. You can start hosting your website and project in minutes not hours, this helps considerably with their quickstart installers for Django, web2py, Flask, and Bottle; however they support any WSGI web framework.

2.png

Heroku

Heroku is another great option for hosting Python web framework projects. It requires a bit more work to start hosting and requires you to be comfortable using the command line of your computer. This option also has a free option, just like PythonAnywhere, to help you get started and the price goes up depending on how much traffic you are expecting and more advanced functionality. One benefit of Heroku over PythonAnywhere is the ability to use websockets in your project, which is not able to be done in PythonAnywhere at the time of writing.

There are other Python web framework hosting sites; however, these are the two easiest and most popular ways. These web hosting sites take out all the hard work of hosting. You don’t have to worry about setting up a database and you can get help if something goes wrong. When your websites start growing you can quickly scale up easily without having to worry about any problems.

Scheduling a Python Script to run

Pythonanywhere

If you are wanting to schedule a Python Script to run at certain times of the day, hosting your script in the cloud might be the easiest option. The easiest place to do this is using PythonAnywhere. PythonAnywhere allows you to quickly set up a task to run the python script to run daily at a particular time of day, or for paying customers hourly at a particular number of minutes past the hour. It's rather like a simple version of Unix's cron utility. This allows you to quickly get your tasks scheduled and up and running.

heroku

Heroku is another way to schedule a python script to run. This is a bit more complicated to set up as it isn’t by default a feature of Heroku. You will have to add an add-on to your dyno. There are many add-ons available for this so you can just choose the best for you. One of the most advanced feature rich add-ons for this job is advanced-scheduler

3.png

aws lambda functions

Another way to schedule a Python Script is using an AWS Lambda functions. AWS lambda functions allow you not only schedule a script at certain times of the day but also when a certain event occurs, such as an inbound HTTP POST comes in to API Gateway or a new file is uploaded to AWS S3. This will require a bit more work to set up, but might be beneficial if you want to do more with your Python script.

Hosting a graphical (Turtle, PyGame) or console based project

trinket-logo-notag-white.png

Trinket

The best way to host a graphical project, like Turtle or PyGame, or a console application is using Trinket. Trinket allows you to share code from any device and lets you run and write code in any browser, on any device. It works instantly, with no need to log in, download plugins, or install software. And you can easily share or embed the code with your changes when you're done. Both PyGame and Turtle projects can be hosted using Trinket. Once you have created your Trinket, you can easily share the project by sharing the link, or by embedding the Trinket in a website. This is a great way to add Python projects to your website, especially if you want to host games created with PyGame and requires very little work to set up! One downside to Trinket is there are a limited number of external modules that you can use which could limit more complex projects.

Here is an example of Trinket being embedded into a web page. This is also one of the projects we do in our Introductory Python Course!

Hopefully you now have been able to choose the best option for your needs and now can start hosting your exciting projects which you can share with everyone else!

Do you want to learn more about Python?

Join us for our Online Summer Camp For Kids and Teens to learn more about Python and many other programming languages.


Reference

  • https://img.stackshare.io/service/4940/logo300x300.png

  • https://www.brandeps.com/logo-download/H/Heroku-logo-vector-01.svg

  • https://www.factor-a.com/wp-content/uploads//2019/05/Dayparting_Ad_Scheduling_Amazon_Sponsored_Ads-e1563961091588.jpg

  • https://www.netclipart.com/pp/m/348-3487927_transparent-aws-lambda-icon.png

  • https://trinket-app-assets.trinket.io/logo/PNG/stacked/trinket-logo-notag-white.png

Author: Robert Nimmo