How to get started with AI
so, you want to learn more about AI, AI is a term that refers to technology that mimics intelligence and learning as it collects data, some examples of things that use ai are:
- Chatbots that can respond intelligently and relevantly to users
- Voice recognition used by smart assistants like Siri and Alexa
- The youtube algorithm that recommends videos based on what you watch
So, now that I (hopefully) have you exited about AI im going to bore you out of your mind with the basics of how AI works. So buckle your seatbelts, it’s going to be a wild ride!
What is ai?
The idea behind ai is to have a computer be able to make decisions and predictions on its own based on inputs, for example if you wanted a program that can tell if an image it’s given is of a cat or a block of cheese where would you even start? Would you detect if it has eyes? The shape? The color? I cant even imagine how you would code that! On the other hand you could use one of the many prebuilt image classification applications, give it some photos of cats and cheese and train it on those images and after a bit you would have a model that can classify is something is a cat or cheese!
So after that rather long winded example hopefully you have an idea of the benefits of AI over traditional computing solutions. I’ve been rather vague for a while, talkingi8 about “training” and “data” and “models” without really properly explaining what those are.
Let’s start with training, training is in its simplest form is just running the data through your neural network, there is a lot more about training but im not going to get into that.
Data is pretty simple, data is just whatever you feed into your neural network, data can be arrays, which are just collections of numbers, letters, etc, images that have already been classified, input from a camera, words, anything really!
Now for models, a model is the neural network that has already been trained on the input data and has all its weights set, again, there is much more to say about this but for the purpose of simplicity I’ll leave it at that.
Now, that I’ve probably bored you with all this technical nonsense It’s time for some fun examples of, in my opinion the most interesting things people have done with AI!
1.
GPT-3.
GPT-3 is a AI model that can generate text based on an input prompt so it can generate stories, write essays, even write code!
GPT-3 in action (openai.com)
2.
MineRL
Imagine a robot that can play minecraft, that’s MineRl, mineRL is an reinforcement learning program that is trained to play mine craft by rewarding it for doing things like getting wood, iron, diamonds, etc, the end product was an AI that could get diamonds relatively quickly from starting a new world.
MineRL in action (video by william guss, minerl.io)
3.
Stable diffusion, stable diffusion is absolutely insane, it is an AI that can generate images based on a text input, its results are incredibly high quality and i think that it is just Mind-Blowing.
Ai generated cats(playgroundai.com)
So, now that you have an idea of how amazing AI is, what are you most exited about!
Anyways see you later so, bye for now.
Neural networks, the basics.
Now In my last post I talked a lot about neural networks but what are neural networks?
Neural Networks.
So, the whole point of ai is to simulate thinking right? If that’s the case why not just simulate some sort of brain? This is the idea behind neural networks, sort of.
So in a brain, some input nuerons get fired, this leads to other neurons firing and this just goes on and on until a decision is made.
The way we simulate this is we have an artificial neurone that has some binary inputs(x1, x2, x3, etc.) and outputs a binary value (y), this whole system is called a perceptron, So right now our formula for a perceptron looks a bit like this :
We can simplify this using sigma notation so we get something a bit like this:
Now, if you’ve been paying attention you might have noticed that earlier I said that Y is a binary output. Currently Y is just the sum of the perceptrons inputs. One simple way to make Y binary is by checking if Y is greater than some threshold, so, like this:
Now for weights, a weight is a value that you multiply x by to give different inputs priority.
Say you have a perceptron that tells you if its a good time to watch Netflix, it takes in three inputs, x1, x2 and x3 and gives a Boolean output Y, x1 is if you dont have anything important to do first, you have a really good work ethic so this is pretty important so how about we give it a weight of 5, next x2 is if your phone is not at low battery, you dont mind too much if you phone dies but you still want to be able to finish a show so this is of medium importance to you, so lets give this a weight of 3, the last value is if you know what to watch, you like having and idea of what you’re going to watch but you also like scrolling through netflix so this isn’t very important to you, let’s give this a weight of 1, now our finished perceptron looks a little bit like this (apologies for my bad drawing skills) :
Let’s say you have nothing important to do so x1 = 1, now lets say your phone is at low battery so x2 = 0 and finally lets say you have a show that you’ve really been wanting to watch, so x3 = 1, now we multiply the inputs by the weights so x1 = 5 x2 = 0 and x3 = 1
This is an extremely simple representation of a single neuron neural network, if you pack multiple neurons together you get a neural network, a neural network has an input layer where values are inputted into the network, some hidden layers in the middle, and a output layer at the end. There is a lot more to say about neural networks but this post is getting long so im going to stop it here, I hope I’ve given you enough of an understanding about the basics of AI and the potential it holds, anyways im going to stop typing before my wrist starts screaming so, bye for now!