welcome to the Cs classroom this is artificial intelligence for the a-level computer science exam in this tutorial we will cover all of the content you need to tackle any AI related questions on the exam however this isn't a huge component of the a-level syllabus or exam in fact this is generally just going to be one five to seven point question on paper three usually a multi-part question however in my opinion this is not one of the more difficult topics so it's more like loow hanging fruit and hence I recommend you watch this tutorial so that
you can maximize your exam score now we're going to start off by talking about Ai and types of AI basically what AI is is AI is a computer-based system that tries to solve problems by simulating how humans how the human brain works and how humans learn now a subset of AI that we're going to be focusing on is machine learning so if I am using the term machine learning I'm still referring to AI or artificial intelligence now there are four types of AI that we're going to be talking about supervised learning unsupervised learning reinforcement learning
and deep learning now we'll also be we'll also be learning about something called neural networks which works behind the scenes of supervised learning and deep learning more on that in a second now the first thing we want to learn about is supervised learning and actually I would say before we learn about super supervised learning I just want to explain how this whole machine learning thing works to begin with so generally what's going to happen is as I said with machine learning we are attempting to make a prediction or we're attempting to get some output based
on some input this may be a prediction this may be a classification of an image or text according to certain categories uh this may be this may also just just be a situation in which we need to learn what the best path is through a series of obstacles for example an AI attempting to play chess or find its way through a maze the point is we have some input and based on that input we want to be able to get some output either based on past Behavior or some other data so what we're going to
be doing is putting in some input data into an AI model we'll call this a model and then getting some output now this model is a combination of algorithms and data so in certain cases we can actually teach this model to give as a certain output based on a certain input in other situations it'll be working on its own to find patterns in our data and then classify them accordingly or give us output accordingly now with supervised learning we can can basically learn we can basically teach our machine learning model based on past experience so
this is maybe a bit complex we'll come to this image later but in this example the way our machine learning model and supervised Learning Works is we should be able to put in images of animals and based on those images the machine learning model should be able to decide whether each image represents a cat or not now in supervised learning what we're going to do first is something called training so we're going to teach this model to be able to recognize a cat and what we're going to do is we're going to be in order
to train it we're going to give it data with labels so we will give the machine learning model a series of images and each each image will have a label a text label attached to it that label will signify whether whether or not it is a cat so that way the machine learning model can adapt can change its collection of data and algorithms in order to be able to then recognize an image of a cat without having the label basically we show the model what a an image of a cat we tell the model that
it is a cat and we do that a bunch of time so we do that you know maybe a couple of hundred times that way the model can actually learn what a cat looks like so that when we give it when we give the model images um that don't have labels images of all kinds of animals it can pick out what the cats are that process of training is what signifies supervised learning now next we have something called unsupervised learning so with supervised learning generally we were able to perform tax tasks like classification in in
this in our example we talked about classifying images of cats but we could also do things like classifying uh spam emails as opposed to regular emails um you could analyze images and break down people by race we can do all sorts of things really now while supervised learning operated on uh past data unsupervised learning doesn't really require any training at all it just takes any set of data that doesn't have any labels and then it kind of analyzes it on its own and then separates it into different categories now the algorithm doesn't know what categories
they are it just knows that these things are different so basically you can think of it as something that just takes in a bunch of data and then find and then tries to figure out what's different about them and then outputs groups of different things without labels then it's up it's up to us to figure out what those groups signify like what is unique about each of those groups for example after the unsupervised learning model or algorithm outputs its results result we would then add a label rectangles circles triangles uh hexagons and so forth so
with supervised learning we had some sort of training um where we trained the algorithm giving it we gave it known data right so we gave it data with labels and we trained the algorithm un supervised learning we just give it a bunch of data and then it just puts it into different buckets now again to kind of talk a bit about the difference between supervised learning and unsupervised learning um with supervised learning we're typically we're typically be doing classification tasks like dividing Socks by color or even identity fraud fraud detection um we could put in
some data for um sets of information that are fraudulent and those that aren't so then that so then our supervised learning algorithm can distinguish between the two um we might also do things like Market forecasting so making predictions based on some past uh empirical data now with unsupervised learning we're not really doing much prediction we're just kind of separating Things based on their P based on patterns or based on their structure so we might SE we might separate customers um based on their behavior into different buckets um that can also inform how we conduct marketing
but the point is is that we are in supervised learning we're inputting pre- categorized data label data unsupervised learning we're inputting unlabelled data in supervised learning we're getting some prediction and unsupervised learning we are just getting our result is going to be the data the DAT data that we input but just separated into different buckets which it's then up to us to label now the next type of learning we're going to go over is going to be reinforcement learning so reinforcement learning is similar to supervised learning except the model is being trained in real time
so think about a mouse going through a maze and then getting sugar whenever it gets to the end that's the example of reinforcement learning now to clarify that let's go ahead and let's look at an example so right here we have a robot that theoretically needs to make its way to the diamond so as this robot goes through this maze it can detect different things so it can detect fire um and perhaps other obstacles so what we could do is when we basically we would have a computer program that is going through a digital maze
right and this computer program is going to have some sort of point system so maybe it starts zero points so what we would do is we would have this computer program try all different paths so for example it might go here and then try to go here it might go here and then try to go here it might go here and then we just straight however we're going to we're going our algorithm is going going to have a reward system so when we hit the fire we might we might give we might tell our algorithm
to give our to get like to give us negative points um when we do successfully move a square forward without going to the fire it might be+ one when we hit the diamond it's obviously going to be like plus 20 or something like that so the point is with reinforcement learning we're basically trying a bunch of different tasks and when when we do those tasks and we achieve a desired result we're going to we're going we're going to reward our algorithm uh when we don't get a Desir result we're going to we're going to I
guess punish our algorithm with negative Point count for example so that way our algorithm can learn the behavior that's required to complete the task that we wanted to it's basically like teaching a child based on a system of punishment right like a child breaks your favor favorite vase and you give them a timeout the child gets an a you give them candy it's the same thing but on an algorithmic level and this is this is in a lot of ways how for example you could train machine you could train algorithms to play chess to work
its way through a maze or really to complete any task where there are a bunch of different possible tasks or there a bunch of different possible paths and we actually don't even know what the best one is but we want our algorithm to figure it out and get to the end and then to be able to replicate that behavior over and over again so really when we talk about uh when we talk about algorithms learning by making mistakes we I guess another good example is when you see robots doing different things and then uh learning
from their mistakes and adapting that's an example of reinforcement learning this is basically what we just talked about um now I kept talking about this robot in the Maze that's actually called an agent it's like I guess an entity that's being rewarded or an entity that's moving around uh in an environment with a series of rewards and penalties but it's basically adaptive learning and we just keep iterating until the algorithm or until the agent knows the best way to accomplish the task that we wanted to with the highest reward and with the least punishment so
the highest point count okay so now what we've got right here is an a-level exam question we're actually not going to complete this question but what I do want to do is answer the questions based on what we already know so we learned about supervised learning reinforcement learning and unsupervised learning so I want to look through these descriptions and then match them up with the appropriate definitions once we go through deep learning we'll return to this question and examine it again now first we have supervised learning now if you look up some of these descriptions
this is going to be the best answer so supervised learning enables learning learning by mapping an input to an output based on example input output pairs so what this is talking about is so basically with supervised learning remember we talked about training the model first with data with labels those are input output pairs so the algorithm or the model learns based on um based on historical data or past data that has the input with the corresponding output and then based on that it can make itions as to what the output for a given input should
be next we have reinforcement learning so reinforcement learning is best described as enabling learning in an interactive environment by trial or error using its own experiences so this is basically description of that whole maze you were talking about and the reward and Punishment system next unsupervised learning enables learning by allowing the process discovered patterns and own that were previously undes undetected so with unsupervised learning we are basically just detecting patterns and then after that we'll have to classify them based on what we see deep learning is what we still need to cover and now we're
going to take a look at that and then return to this question afterwards so the foundation of deep learning is something called neural networks which is also referred to as artificial neural networks on the a level exam now neural networks are actually meant to uh simulate the system of neurons that exists in our brain however the way that we look at it an algorithm while while an analog could be our actual neurons it's really organized in a much more simplistic format in every neural network we're going to have an input layer right here we're going
to have some hidden layers and then we're going to have an output layer now an A neural notwork is what's behind supervised learning and deep learning which we'll talk about in a moment now if we go back to our cat example right remember we were talking about how we're putting in images of cats with labels and then we are um and then we're getting eventually we should be able to predict whether an image it contains a cat or not now what our input layer is going to do is our input layer is actually going to
accept images of cats so each time we want to input an image it's going to go through a neuron in our input layer now once it goes into our input layer it's going to be uh it's going to be sent out to every single neuron in our uh hidden layer and then from each one of those neurons it's going to be sent to every single neuron in the subsequent layer until we get to the output layer and the output layer is where we're actually going to get cat it's actually where we're going to get our
answer so we're basically putting in our data into our uh input layer we're doing the processing in the hidden layer and then our output layer is what's going to give us the answer now we're going to talk a little bit more in depth on this hidden layer but basically the way this is going to work is that initially when we train our neural network we're going to be putting in data with our label to the input layer and then we'll get through our H we'll get do all the processing on our hidden layer and then
we'll get to our output layer and if and based on our output from the output layer so if we get the wrong output then we're going to go back and we're going to change some things about these hidden layers so these hidden layers aren't like static things we change these hidden layers based on our training so that we can then get the desired desired output based on the equivalent input now what that means let's talk a little bit more about that so I think what I'm going to do is we're going to talk about an
example where of of detecting email spam and based on based on the example I'll explain more about how neural networks work now the object behind this real world scenario to explain neural networks is to create a system that allows us to distinguish between uh spam email and normal email we're not actually going to write code but I'm just going to use this as a way to explain how neural networks work okay so how this works is we're going to have some text in our email so we have the spam email and the best way to
understand how a newal network works is to think about how we analyze an email to figure out whether it's spam or not so when we look at an email we're looking for certain key words right so we're looking at things like discount maybe like percent off um free act now things that sound really gimmicky now for us it's pretty clear we we pretty much know what we're looking for either consciously or subconsciously however we need to teach those same things to our neural network now in order to show you how that works we're going to
follow our email through our neural network as it's being trained so remember with supervis learning we're starting with a training process so what we're affec ly going to be doing is we're going to be putting our spam email to our neural network and then we're going to be seeing how it does and based on whether it correct based on whether neural network correctly outputs that it's spam or not we're going to be changing our neurons in our hidden layer now what we're going to do first is we'll take our email we're going to take all
the text of our email and put it into our input layer now from our input layer layer all the text is going to go to each of these neurons so all the text of the email will go to this neuron this neuron this neuron and this neuron right here now what's important to note is that each of these neurons represent a particular word that we're looking for in a spam email specifically this might be uh like discount this one might be like 50% off um this one might be like percent off and this one may
be um I don't know this one may be act and that's not just going to be our first layer all of our hidden layers are going to basically be doing the same thing so each of them will have a particular word or phrase that matches a spam email corresponding to each neuron so for example right here it may be like um like sign up or something like that now the idea is that each neuron has a a weight and it has something called an activation function so basically what's going to happen let's say that we
put the spam email in and then it hits this discount uron basically that discount neuron it's going to output something closer to a one as opposed to a zero now if it has 50% it's probably going to Output a one uh if it doesn't have percent off it's going to Output a zero if it doesn't have act it's going to Output a zero so basically these neurons are each going to send some sort of signal based on whether the um that the word that corresponds to that neuron is contained in the email or not and
then we're going to pass the text so we're going to pass our signal or one 110 from each neuron along with our text to every single other neuron in the next layer and we're going to repeat that process now when we get to the end if this is really a spam email then we should get spam in that case we're not going to change our hidden layers but if we get it wrong and it says not spam then we're going to adjust some of these layers particularly those that return to one because if we got
not spam we should be getting spam that means our neurons that detected successfully detected a word in a spam email should have a greater weight so that means that that means that we might have something like um we might have something like two so that means that this each of these neurons these ones that were that were lit up that had one will count from more so they'll end up counting for three or four depending on depending on our training algorithm so this process of adjusting weights to give our neurons more importance is called back
propagation So eventually we're going to change the weights in our neural network so that those neurons that are more important for detecting spam have more importance and more influence over over our final result than those that are not and that's essentially how a neural network works we have weights and these weights influence or these weights are basically how influential uh each neuron is now the activation function basically takes um basically it's basically responsible for taking our result in our neuron and then turning it into a specific numerical value that we can send on to other
neurons and that results in our output so the activation function is really about kind of wrapping our result up in a numerical value that we can then use to effectively um calculate whether we have a spam email or not a spam email and the weight is responsible for how influential each of our neurons is at the end of the day what I want to highlight is that each neuron represents a particular characteristic of our spam email and each time um our new each time our neuron each time the the word for a specific uh neuron
matches something the spam email that neuron lights up and sends a positive signal and based on that signal combined with our activation function when we get to the end we can make a prediction as to whether they're spam or not so after we put a bunch of data in with labels our weights are going to change so that means that every every result that goes through here might give us a five every result that goes through here might give us a one every result that goes through here might give us a negative 1 and the
weights of all these neurons how influential they are is going to change throughout training so that way way once we put in an email that doesn't have a label that we don't know to be spam or not spam we'll get spam we'll get a correct result at the end and that's basically how neural networks work so just to kind of summarize our input layers accept data our hidden layers are responsible for deciding what the input what the um output should be based on our input and it's also our training occurs then our output layers output
the final prediction in our scenario whether it's spam or not now this could very easily work for images as well except in the case of uh images we'd be breaking down our image into pixels inputting this into our input layer and then we would most likely have neurons that are trying to detect either collections of pixels so patterns of pixels or the presence of individual pixels but the concept Remains the Same now if you want to if you want to know more about how this neural network works in depth I I did actually write a
description here but it's quite dense so I didn't really want to go through it word by word I felt like a diagram was a better way to illustrate it now let's take a look at some a-level questions to get a better understanding of neural networks particularly from the exam perspective so the question here is State the reason for having multiple hidden layers in an artificial neural network now in our spam example each remember each neuron represented a particular word or phrase that might correspond to spam in an email so that means that the more neurons
that we had the more likely we were able to detect a spam email and the more accurate accurately we were able to detect it because we can effectively look for more data points that correspond to a spam email so it turns out the reason we might use uh more hidden layers is to solve a is to if we're trying to solve a problem that has a higher level of complexity so if we have more data points that we want to look at image recognition is a great example particularly for looking for something very specific moreover
if for example in our spam email we were able to look for more words that correspond to spam instead of less then we'd also be able to improve the accuracy of our result it's just a question of looking at our input data with more granularity so we can solve more complex problems and we can improve the accuracy of our result and ultimately that helps the neural network to learn and make decisions on its own although this is kind of like a weird answer I mean this is just like a really like this is not a
specific answer I feel to the question the other qu the other thing we have here is the other reference we have is to deep learning now we haven't talked about deep learning yet but if you go to deep learning so deep learning is basically a form of supervis learning but it just has many more hidden layers in the average neural network so it supervised learning with some of the example neural networks we saw we had two layers of neuron two hidden layers of neurons now with a deep learning we're going to have many more hidden
layers to be able to analyze more complex problems and this is also meant to simulate the human brain because the human brain is more similar to a neural network with for example hundreds of hidden layers rather than just two so the main difference between deep learning and just regular supervised learning which both of which make use of neural networks is is the Deep learning has many more hidden layers now I want to go back to one more question which I think is a great summary of um of neural networks in general this question is explain
how artificial neural networks enable machine learning now some of the answers are that they replicate the way the human brain works um weights and values are assigned for each connection between nodes now nodes is referring to neurons in our um in our neural network now here it says that they're assigned for each connection um so that means the link from one hidden layer to another I would argue that actually like there's different ways to Define this um probably for the a level exam it's better to say that the weights are assigned to each uh connection
um the data are input at the input layer and passed into the system um so they're analyzed by each subsequent hidden layer um the process of training is repeated many times until we get the optimum output so this is that back propagation we're talking about we're adjusting weights uh decisions can be made without being specifically programmed that's the whole point of neural networks we do have an actual reference to back propagation here and here it says back propagation of Errors will be used to correct any errors that have been made so this is where we're
changing weights we're changing the characteristics of the Hidden layers in order to respond to errors in prediction um we have the output layer provides the result so basically this question in this question if you describe an AR official New York New yor neural network as we did then you would be able to probably knock out the Four Points required so we'll talk a little bit more about some look at some deep learning a level questions describe what is meant by Deep learning so uses artificial neural networks contains a high number of hidden layers um we
can say it's a specialized form of machine learning and it can extract higher level features maybe solve more complex problems outline the reasons for using deep learning uh makes good use of unstructured data can outperform other methods if the data size is large um we can process data with a non-linear approach this has to do with that activation function that we talked about earlier so that activation function allows us to take our results and then modify them in a way that's not linear so this is as opposed to doing something like this I guess this
is particularly more important when we're talking about making um numerical predictions this means that we're not just going to be doing a linear regression to predict data we're going to be looking at data nonlinearly so we can make more perhaps accurate uh predictions particularly in working with numerical data uh deep learning is also effective at identifying hidden hidden patterns and more so than than humans and we can have a more High we can have a more accurate outcome with higher numbers of hidden layers so it does better when data sets a large we can use
a nonlinear approach especially when predicting um numerical data it makes it easier to identify patterns that won't be visible to humans and with a higher number of hidden layers we can get a more accurate outcome okay so the first shortest path algorithm we're going to look like is going to be Dy stress algorithm as it's actually called now generally shortest path algorithms allow us to find the shortest path from one point in a network to another point so from one no from one node or one vertex to another vertex and we'll see what that looks
like in a moment in a graph so with dyar's algorithm where we want to find basically dyar's algorithm allows us to most efficiently find the path from one point to another point and when we see it on the a level exam we're going to be solving problems like this calculate the shortest distance between the base and each of the other towns in the diagram using Dyer's algorithm so basically to illustrate how this algorithm works I'm just going to go ahead and solve this problem now we're starting at the base right here and we need to
find the distance to each of these six towns and these numbers like five for example represents the distance from the base to each town so what we're going to do is we'll start with the distance from the base to town one and we need to look at all the possible paths because that's what what dyar's algorithm is going to do so if we go directly from base so if we go directly from base to town one distance is four okay but we have other ways to get to town one we could go we could go
from base to town three and then from town three to town one and then together we'd only we'd have a distance of two and one which adds up to three so our shortest path is actually going to be three next if you want to get to town two we have a couple options so we could go directly from the base to town two which would be a distance of five we could go to town through town three and five which would give us six and I think that's kind of about it I don't really see
any other way so probably your distance is just going to be five uh the next thing is we have Town three now to get to town three we could go through town one which would give us a distance of five because 4 + 1 is five um or we could just go straight there which is a distance of two so we'll just stick with two um for Town four we have a couple options we can go through town one which is going to be 4 + I'll just use a different color it's going to be
4 + 7 which is going to be 11 or we could go through town three and town one which is going to be or town three town 5 Town three and town 5 so we'll have 2 + 1 is 3 + 6 is 9 Which is less than 11 so probably want to stick with nine for that one now to get to town five um I think it's pretty simple we're just going to go through town three from the base so we're going to have 2 + 1 which is just going to be three to
get to town five and then to get to town six we have a few options we can go from the base through town two which would give us 13 5 + 8 we could go from the base to town three to town 5 to town six um and that's going to give us 2 + 1 + 5 which will give us 8 um we could also go let's see three h I guess we could go to through town three town five town and then Town two to get to town six but that would just give
us like 2+ 1 + 3 + uh + 3 + 8 which is like like uh 5 + 1 6 14 so probably your answer there is eight so basically it's really just about finding the shortest distance even if that means going through different towns or going through multiple towns as opposed to just one town and let's see if we got that right and I think we did 352 938 perfect that's basically how you solve a Dy stress algorithm problem and that's what you're going to see on the exam now the next step of Al
algorithm we want to look at is going to be the AAR algorithm which is similar to Dyer's algorithm with one difference so we still have these distances but we also have something around so we have these distances right here which is represented by G so I'm just going to circle these in red for our distances but then we also have something called a heuristic and the heuristic is the predicted distance to our um destination at each node so for example if we go from home to um if you go from home to a okay that's
distance of one but then we have an H equals 10 so our projected distance to the school actually if I didn't make it clear in this in this particular question we want to go from our home to our school our home node to our school node so basically this looks like d d algorithm but if we go from home to a we know our distance from home to a is going to be 1 but then we have H equal 10 so our projected distance from the home to the school via node a is going to
be 11 basically the H tells us our projected distance uh to our destination which is our school from any given town so our projected distance from our home to our school is going to be uh 14 our projected distance from um node B to our school is going to be um 7 Etc so we're going to make decisions on how to proceed through this diagram uh based on our not necessarily based on the actual distance but by first figuring out the minimal projected distance and then going from there so basically what we need to do
is we need to fill out this chart so what we need need to do first is we need to find we're going to go to like the only like the first towns away from our home so we just want to go to the towns that are next to our home and then figure out what the shortest projected distance is so if we go from home so let's say we go from home to a okay that means that our projected distance is going to be 11 if we go from home to C that means our project
distance we're going to have a real distance from home to C which is four plus our projected distance right here so we're going to have 4 + 9 is 13 and if we want to go from our home to B which is the next other Town that's next we're going to have our real distance from home to B which is five and then our projected distance from B to the school which is going to be 12 okay so we're adding a real distance from our home to our next town and then we're adding that to
our projected distance from that next town to the school to figure out what the minimal path is and that looks like a so in this chart we need to fill this in we have 11 right here uh to node B we're going to have the cost from home node was uh to B was five that's the G that's the actual cost and our heuristic which is what our projected distance was at B is seven so we're going to write seven right here and we're going to have 12 as our total and then for C our
cost from our home to the to node C was actually four and then our heris there so predicted distance this school is nine so we're going to fill it out we're going to get 13 so we need to write all these things down in this chart they gave us and now that we've done this we need to figure out what what is the lowest total so what is the lowest projected distance overall from our home to any one of these notes and that's a so because that's a uh we now know that we need to
go through a to get to our um like destination to our school so we need to see everywhere we can go through a from our home so from a we really have a couple of options um we can go from a so basically now we're looking at the at like the secondary nodes right so we can go uh from A to B and then from B to the school so now if we go from if we go through a and b to get to the school we're going to do to get our total we're going
to add up the real distance from home to a which is one so we'll say from so now we're going to say from A to B so home to A to B we're going to add up our real distance from home to a which is one our real distance from A to B which is three and then our heuristic or our projected distance from B to the school which is seven so we're going to do 1 + 3 + 7 which is equal to 11 um and then the next thing we're going to do is
let's see is that right yeah we have 1 + 3 um + 11 okay so the next thing we're going to do is we're going to try another alternative so we're going to try going from our home to our to a to e now from home to a we have one and then from a to e we have six so from home to a we have one from a to e we have six and then our projected distance from uh from each of the school is three that's three right here so you have 1 +
6 + 3 which is going to be uh 10 those are only real options like as far as secondary nodes go through a so right now so what we're going to do is we're going to write so we're going to write B right here the cost from the home node was uh that was like 1 + 3 so our actual cost that was 1 + 3 and then theistic was actually that was what was that that was seven and that ends up 11 but then we also go to E right here right that was our
second uh like sort of path and there we had 1+ 6 for the distance from our home note and then we added on for heuristic we added on three so we basically 7 + 3 is 10 so given that our path from a to e is the minimal path of this moment we're going to go from here so we're going to start right here and then we have two ways to get from there to the school which is our ultimate destination we can go through node F so if you think about going from the home
so now we have I'll just give you another color we have our home to to a to e to F so we're going to add up our um our actual distance from a to e to F and then on top of that add our heuristic from F to the school so we're going to do 1 1 + 6 + 1 so 1 + 6 + 1 and then we're going to add our heuristic which is three and that gives us a cost to get to from home to the school via a a e and f
so 7 + 1 is 8 + 3 = 11 then our other path is to go straight through um straight from each of the school and that's actually just like we know what the cost of that's going to be like we don't have another node so we can say home to a to e to school is going to be equal to it's going to be 1+ 6 uh yeah 1+ 6 + 5 which is going to be 12 actually so right here we have 11 on the other hand here we have 12 so right here
we're just going to write F and we can say um we can say let's see yeah so we're going to say 1 + 6 + 1 1+ 6 + 1 and our heris stic from there was three so that's going to give us a solid let's see 7 + 8 11 and then we also just had we're going straight to the school right so we type right school right there and that was just going to be like one uh + 6 + 5 with no heuristic which is going to give us 12 so that means
that our final path is going to be from home to a to uh e to F and then to the school and this right here is one point and then our work in our chart is actually going to be worth uh 4 Points so right here we almost got all of it but there are a few things so we need to have one mark for each of these calculations um so our first one is just going to be B which is going to be line uh I'm just going to go ahe and Mark which ones
we got right and which ones we didn't that's going to going be on line three right here and then our next one is going to be C which is on line four so that's another Point next one is going to be from B to e on lines five and six so B and E and lines 5 to six so these calculations right here uh next we have from F to school so that's going to be these two right here um so we have node F and node school and then I guess the last one we
actually need to do which we left out is that's like really our final calculation so that's not including theist theistic because right here we included theistic um when we're making our calculation from uh a to e to F but we need to do the real calculation which is is going to be 1 + 6 + 1 + 3 because here theistic was the same as the actual distance and that's going to give us our 12 and that's going to be our last point right there those are our four points now actually the order doesn't matter
for points which we nailed um but yeah I guess the one thing that we missed was just the last and final calculation and then if this is a fivepoint question we get four points for our table and then five points for reading our path and this is our path right here which we also got right so anyways that's actually it for shortest path algorithms um you basically particularly the I think the Dy algorithm was the easiest the ASR algorithm is not so complex but you just need to be taking into our predicted lengths from each
node um which is also known as theistic and hopefully that explanation kind of cleared up how we'd work through these kinds of problems now one last thing we're going to cover which we kind of already talked about was the concept of graphs so not only our neural network but also the um the diagrams we saw for our dyar algorithm and the AAR algorithm are all um are all graphs when we're talking about graphs it's important to refer to these as nodes or vertices vertex for singular now these are used to visualize paths both through neural
networks and paths for our shortest path algorithms and we use graphs and so that we use graphs not only to represent these in a clear way but also because often times we can use graphs in the form of Link lists or other such data structures um so that they can be processed by algorithms so it's a format um for storing data as well such that they can be processed by algorithms that are used to perform something on them now right here we have a question explain the use of graphs to at artificial intelligence and this
is an important question because we mainly covered graphs in the context of shortest path algorithms and so we can say that artificial neural networks can be repres presented using graphs they can provide a structure for relationships between nodes such as like the the hidden layers the initial layer and the final layer um AI problems can be solved as finding a path in a graph like our shortest uh path problem which is technically an AI problem they can be ingested or analyzed by range of algorithms um and I guess an example of this would be back
propagation where we're actually going back into a network algorithmically algorithmically changing certain characteristics for each node or neuron which is the weights um which we can say is at those neurons or at those nodes okay so that is about it for AI um one thing I did want to cover at the like before I let you guys go is my machine learning course so this is just kind of a quick intro to machine learning for the a level exam but I'm actually planning creating a whole machine learning course for high school ERS who may be
interested in getting into data science or AI in University if you'd like if you're this this seems like something that's of interest to you then please um click on the link in the description to subscribe to my online store and you'll get a notification when this course is out I'm not going to spam you I like very rarely send emails through this links but this is just in case you're interested anyways if you found value in this video please remember to like the video and go ahead and subscribe to the channel for future videos on
a level computer science in preparation for the exam have a nice day