 Hey guys, it's MJ the student's act tree and in this video I'd like to showcase my artificial intelligence that I made for the game rock paper scissors So in this video, I'm just gonna be playing a round of rock paper scissors And I'm gonna be explaining how the artificial intelligence works So it's a little bit of a demonstration. So let's turn on the statistics So that we can see how the brain is working First thing to note is these are the probabilities that the AI has assigned for its choices When we starting off, it's purely random. So it's going to be 33.3 percent recurring for each one There is a little bit. I've just rounded the doubles two integers and just for display purposes So that's why you'll see 34 for scissors, but they are all the same Okay, so very first game all Random it doesn't know anything about me. It doesn't know how I play. So let's go. So I'm gonna go with rock Okay, and wow, what do you know? I've beaten my artificial intelligence, but this is purely down to chance So I've won and I've beat because it shows scissors. I chose rock Okay, now again, it doesn't have enough information to know how I react after a win So it has no information on how I react after an am I gonna repeat my play or am I gonna change it? But I'm quite happy with rock. I mean I played rock and I won't let's see what happens when I play rock again. Okay Well, I'm I'm pretty good at rock paper scissors. I've beaten my artificial intelligence again. It's chosen scissors But now it has a little bit of information Here we see that it knows that when I win I tended to repeat myself So repeating is greater than the alternating and so it now flexes the probabilities It wants to beat me So it's increased the likelihood that it will choose paper and it's now decreased the likelihood that it will choose scissors It's also slightly increased the chances for rock and this is so that it could maybe get a draw as We can see the confidence hasn't changed because it hasn't lost. It hasn't made a bad decision yet But now let's say I choose rock again Okay, I've lost because it chose paper We saw paper was the most likely choice and because it was the most likely choice The AI confidence is going to increase So the confidence will only increase when the artificial intelligence wins and it chose the most likely probability and the confidence will decrease if it loses and it chose the most likely choice and Now this confidence is what I use to flex the probabilities But So I've now lost as you can see the probabilities have all reverted back to 33% because when it comes to losing it was my first loss. It doesn't have any information on how I play when I lose So my last choice was rock. I want to change it up I you know rocks failed me now. So let's go with scissors. I look at that I've won and the artificial intelligence confidence didn't change because there was nothing that was most likely So I've now won With scissors it chose paper. So it knows what happens now when I win It needs to increase the likelihood for rock and decrease The likelihood for paper, but that's my strategy. I like to when I went I like to repeat and Bam, there we go. I've lost But now it also has information on how I what happens when I lose it knows that I tend to Alternate when I lose and you can see the artificial intelligence's confidence has increased now to 17 Sorry that that reset button is in the way So it knows that my previous result was scissors and it knows that I tend to alternate When I lose hence it's quite safe to play paper But now let's say I so what I've chosen scissors and it thinks that I Alternate let me let me be a little bit naughty and go with scissors. So here we go. Here we go I won I saw the probability was quite high for paper. So I'm cheating a bit here, but artificial intelligence chose paper and what's interesting now is the confidence has now decreased because it was like we thought The opponent was going to alternate, but they repeated So now if there's another loss, we'll see the probabilities will go back to 33 percent Let's check. Oh Now this is another interesting one it's gone back to 33 percent because this is our very first draw and There's no information on a draw. So it will revert back to 33 percent Chance for each and this way the AI can't be beaten in the long run because let's say you even have all these Statistics and you are choosing you are playing against it The confidence will decrease to an amount where it doesn't then change and it stays at 33 percent So it comes down to luck if you had to be someone who you know Let's say you just go on a rampage and you just click Clicking rock for whatever reason you just go rock rock rock rock rock rock rock rock rock You can see here that the the repeat for each of them are now increasing confidence is going up and The AI is just dominating the game There will be the occasional draws because it's quite a you know, it doesn't want to be it doesn't be too predictable So you see the probabilities almost lock in there at 57 percent and The reason for that is I have kept confidence at 25 So when it hits 25 it decreases back down to 24 This is just to make sure that the probabilities don't become negative and then weird stuff starts to happen So yeah, that is my my artificial intelligence You can see it's very confident at the moment. It's dominating me But why don't you have a go and download it for yourself and and yeah, maybe you can beat it I will put links in the description below for The Google Play Store. This is only going to be on Android. There's the little Android man and I am I have written a whole article explaining the inner workings and the philosophy behind it And why I did certain things this way and not that other way I don't want to make this video too long by describing this all here, but I will put links Also in the description or also somewhere on the screen here For where that article gets published or on whose blog puts it up But yeah, that's that's basically my artificial intelligence in a nutshell I think it's pretty cool in the way it flexes probabilities. It's got a stochastic nature to it You can't beat it all the time because it's not deterministic like a lot of the other artificial intelligences on rock paper scissors, so I think it's great But let me know what your thoughts are in the comment section below and also use that space if you have any questions Thanks guys so much for watching and if you haven't subscribed because I will be posting more fun videos like this. Cheers