Minesweeper AI VS human WORLD RECORD

  Рет қаралды 1,567,262

Code Bullet

Code Bullet

6 жыл бұрын

I test out my mine sweeper AI against the best human player
Also I added more bombs in to see how many it could take
Become a patreon to support my future content as well as sneak peaks of whats to come.
/ codebullet
Check out my Discord server
/ discord
live QnA at 8:30 - 9:00pm every Sunday AEST
check out the world record
which is actually really impressive
• Video

Пікірлер: 1 500
@penapenis
@penapenis 6 жыл бұрын
That last grid was way too small, cmon.. only 128 x 72.. YES I COUNTED
@solar9706
@solar9706 6 жыл бұрын
Penapenis you had determination no hate here
@dandanthedandan7558
@dandanthedandan7558 6 жыл бұрын
:o
@DarkFrozenDepths
@DarkFrozenDepths 6 жыл бұрын
I request a 300x200 grid with 20,000 bombs lol
@groszak1
@groszak1 6 жыл бұрын
Then won't only 2⁄3 of the spaces be good, and therefore the algorithm would fail most of the time?
@bfc9467
@bfc9467 6 жыл бұрын
it was 128x68... are you sure you counted right?
@resinate
@resinate 6 жыл бұрын
still wanna see 1920x1080 grid lol
@Nartinan
@Nartinan 6 жыл бұрын
imgur.com/a/PltFdMu i imagine it could look something like this... it took my computer 5 seconds to solve the field. to be fair, i had to tell him to only open safe clicks, else it still would search. also what am i doing here
@redbird3209
@redbird3209 6 жыл бұрын
Yes please. And dont use a grid just colorcode all the possible stats (undiscovered, discovered, marked, 1-8, bomb) so the result is just a FullHD image with colores!
@febrezeninja745
@febrezeninja745 5 жыл бұрын
what is that? your screen resolution?
@Ashegao
@Ashegao 5 жыл бұрын
@@febrezeninja745 well mine is 1900x1200 so uhh wait where did everyone go?
@alfredenglund
@alfredenglund 5 жыл бұрын
f yee
@Nighthawkinlight
@Nighthawkinlight 6 жыл бұрын
Your ai needs more parameters. There are many situations in which the ai picks randomly when the location of mines can be deduced by numbers not directly adjacent. A human player can solve maps with many mines consistently where your ai tries and fails dozens of times before finding a map easy enough to be solved without more complex parameters.
@peepock7796
@peepock7796 4 жыл бұрын
Wouldn’t that be fixed with the rule he implemented at the end?
@NXTangl
@NXTangl 3 жыл бұрын
@@peepock7796 Maybe? We don't know how exactly he computes which squares are more likely to have bombs. If it's pure brute force then I guess it would always work.
@Bunny99s
@Bunny99s 3 жыл бұрын
@@NXTangl There is no way, for a human or an AI to ALWAYS win. Even in smaller configuration with only a few mines it's possible that they form an island where you don't know how the interior might look like. A common scenario you can think about is a 3x4 area that has mines at the perimeter (10 mines) so the middle 2 squares are unknown. Imagine you're only missing one mine. So you have a 50:50 chance since there is no way to know or determine which of the two unrevealed squares contains the mine. In larger grids with more mines this can happen even more frequently. Having 2 configurations of 3x3 (8 mines surrounding one square) it's also impossible to tell which of the remaining unknown center squares have a mine. The only way here is brute force. Of course you should keep those undecidable squares for the end as this could help to figure it out. Maybe all those undecidable squares should be mines in which case we know all of them, or they should all not contain any mines because you already found all. However any case in between requires guessing There are more cases than the two I mentioned which are undecidable.Though it usually boils down to some variation those cases (apart from even larger cases where a 2x2 area is enclosed by mines). Note that when two unknow squares are surrounded by mines, it also doesn't help when the perimenter has holes at the long sides. because if there's only one mine in there you don't know which one. In the end the game is a gambling game since the distribution of mines is random. Yes the original minesweeper ensured that the first click is never a mine, but that was the only adaptive part of the game. The grid is either filled with mines after the first click, or if the first click would hit a mine we can swap the mine with any free square during the click. As far as i know he actually considers all information available and actually does a probability distribution between undecidable squares and picks the one that has the least likely chance to contain a mine. Of course all decidable squares have naturally a 0% chance. Have you actually seen the first video? kzfaq.info/get/bejne/ma2Fe8iZq63Vcpc.html
@joeo3377
@joeo3377 3 жыл бұрын
​@@Bunny99s Well, there were definitely grids that the AI gave up on which had squares that are easily determined to not contain a mine, so it demonstrably does not consider all information available.
@Bunny99s
@Bunny99s 3 жыл бұрын
@@joeo3377 Well that is hard to tell from the video as there are something like 3 to 6 actions per frame. Yes I found some edge cases (specifically involving 3s and 2s) where it seems that it has not considered them properly as "linked cells". Though as I said it's actually hard to tell as in most cases you don't even see the "failed" configuration as too many steps are missing in between frames. Currently I don't have the time nor do I want check the code as it's quite a mess to follow the logic ^^. However if you think you can spot the issue, feel free to have a look: github.com/Code-Bullet/minesweeper-AI/tree/master/minesweeperAI
@dandanthedandan7558
@dandanthedandan7558 6 жыл бұрын
Can you try creating an infinite grid with a fixed amount of average bombs per 5x5 grid and letting the AI solve it till eternity, or until it dies? And I you can do that, how much average bombs per 5x5 grid is necessary for the AI to lose under five minutes or even five seconds? I'm basically asking you to force your AI to an eternal prison of minesweeper lol
@balthasar1stern889
@balthasar1stern889 6 жыл бұрын
Cool Idea! I really want to see this!
@ND7226
@ND7226 6 жыл бұрын
Combativ until you die?
@zikoat
@zikoat 6 жыл бұрын
I HAVE DONE THAT... i just havent enabled the bot on my infinite minesweeper version zikoat.github.io/ , i can enable it if you want
@PurplySkye
@PurplySkye 6 жыл бұрын
The Computer Would Crash *(Obviously)*
@dandanthedandan7558
@dandanthedandan7558 6 жыл бұрын
WaZe or you could hack into a supercomputer and run the simulation there at hyperspeed :D
@alexleach4002
@alexleach4002 6 жыл бұрын
I think the only thing you are missing is that most of the time there are multiple squares with the same lowest chance of being a mine. Some squares are likely to reveal more information than others. Perfect example is at ?t=50s . Although 591 of the 600 squares all the have the same chance of being a mine (96/591=16.2%), they do not have the same chance of revealing useful information. A middle piece like the one selected only has a 19.9% chance of being a blank. An edge piece has a 34.3% chance of being a blank and a corner piece has a 49.1% chance of being a blank. This info is knowable and should be used in a prefect program. Below is a spot where you are forced to take a guess. 4 of the 9 remaining squares all have the same odds of being a mine (1/5) but your chances of winning clicking differ greatly between those 4 squares. One square will always give you enough info to win while the other 3 will force you to guess again. The total future risk can be accounted for in many cases. 4 mines left in this 5x5 toy game. All the outside border is known. the 9 interior boxes are unknown. (M=mine, 3=touching 3 mines etc, and ?=unknown) 4 mines left Try to solve yourself or with your program. M 4 M M M M ? ? ? M 3 ? ? ? 3 M ? ? ? M M M 4 M M There are 5 states the mines can be in and 4 boxes have equal probability of being a mine. The portental information revealed makes one of the boxes a much better choice then the others. (you lose half as often when picking it) Can you pick the box that is the best choice?
@flatfingertuning727
@flatfingertuning727 6 жыл бұрын
A simpler example is the 2x4 grid B3B? / ????, with a total of four bombs. Guessing one of the two right-side squares has a 50% chance of instant kaboom, but reveals enough information to win otherwise. Guessing one of the three other squares will have only a 1/3 chance of instant kaboom, but won't reveal enough information to win without taking another 50% chance.
@henrilemoine3953
@henrilemoine3953 6 жыл бұрын
Click the first « ? »
@alexleach4002
@alexleach4002 6 жыл бұрын
@Flat Finger Tuning. Great example.
@cooltv2776
@cooltv2776 6 жыл бұрын
if im right its between the top right and middle right, im going to guess top right of the four mines two are among the bottom three squares, leaving two mines for the remaining six squares. one is adjacent to the 4 on top, leaving one mine between the middle row and top right
@endab5517
@endab5517 6 жыл бұрын
Thank you
@bendystrawz2832
@bendystrawz2832 5 жыл бұрын
CB: "WEIGHING IN AT ONLY..." Me: please use lines of code CB: "1200 LINES OF CODE" Me: YES!
@dannygjk
@dannygjk 5 жыл бұрын
1200 lines of code for a decent Minecraft bot!? I could solve the universe with 1200 lines of code.
@robertlinke2666
@robertlinke2666 5 жыл бұрын
@@dannygjk but that will take 7 and a half million years, and the answer will be 42
@youpviver6773
@youpviver6773 4 жыл бұрын
I myself hoped for bytes, but your idea is great as well
@Liggliluff
@Liggliluff 4 жыл бұрын
@@youpviver6773 especially if it's only some kilobytes.
@Blubb5000
@Blubb5000 4 жыл бұрын
@@robertlinke2666 Wasn't it 10 million years?
@amateurprogrammer25
@amateurprogrammer25 4 жыл бұрын
The thing I love about Code Bullet is he would rather sit there watching his inefficient code take an hour to process than spend 20 minutes making it more efficient and having it complete in 5
@Talon323
@Talon323 6 жыл бұрын
Hey, have you thought of putting an AI to play against an AI in some 2 player game?
@exedeath
@exedeath 6 жыл бұрын
Mugem would be the best option. Imagine saltybet with learning ai.
@kdotdevelopment6398
@kdotdevelopment6398 6 жыл бұрын
AIs that learn by using evolution technically already do that. Hundreds of players are created, and the one that does the best "wins" (or is the one to evolve). But, I do see what you mean, that is a good idea :P
@SoulFoxie
@SoulFoxie 4 жыл бұрын
I'm sure he's thought about it but he's then shrugged the idea off because it was a bad idea because being AI's if they're programmed the exact same way (except one is to use another character or thing) then they'd just end up with the same results
@viniciusdornelo2878
@viniciusdornelo2878 4 жыл бұрын
he already did this with chess
@magicmulder
@magicmulder 4 жыл бұрын
AI 1: starts the nukes towards Russia, knowing the counter strike will obliterate its opponent AI 2.
@RadiantDarkBlaze
@RadiantDarkBlaze 6 жыл бұрын
Code Bullet: "Absolutely no one asked me to increase the size of the grid even further. So I did that." Me: * immediately clicks the like button because I hadn't already done so for some bizarre reason *
@Ranylyn
@Ranylyn 6 жыл бұрын
I did the exact same thing.
@feschber
@feschber 6 жыл бұрын
yeah you can't tell me that a "perfect" algorithm would need like 10 attempts to solve that...
@azlastor
@azlastor 6 жыл бұрын
THANKS!!! I cringed watching this guy have no clue and proudly letting the world know he has no clue...
@gabechevalier1567
@gabechevalier1567 6 жыл бұрын
There can be no perfect algorithm for a luck based game.
@TlalocTemporal
@TlalocTemporal 6 жыл бұрын
But you can perfectly calculate the best possible chance. If you've perfected all the perfectible bits, are you not as perfect as perfect can be?
@firebrain2991
@firebrain2991 6 жыл бұрын
Superintelligent AI plays UNO
@lollolo9492
@lollolo9492 6 жыл бұрын
brillant IDEA !
@TechSupportDave
@TechSupportDave 3 жыл бұрын
that would actually not be that hard to code because of the simple rules of UNO, but what would be hard is everything that a highly intelligent mathematical genius would be able to do - calculating the probabilities of people having certain cards, and utilising this knowledge to be able to statistically win more games than anyone.
@MrRolnicek
@MrRolnicek 6 жыл бұрын
Watching the perfect algorithm fail on its first click makes me feel much better about my playstyle which also has me lose in the very first or second move most of the time.
@EGarrett01
@EGarrett01 4 жыл бұрын
I thought the first click on Minesweeper couldn't be a bomb?
@Liggliluff
@Liggliluff 4 жыл бұрын
@@EGarrett01 Yes, in the original Minesweeper; it generated a board. But if you clicked on a bomb, it would regenerate the boards until there no longer was a bomb there. Newer Minesweepers might be more effective (like just moving the mine).
@hunterwalker2671
@hunterwalker2671 4 жыл бұрын
Huh
@gaspytheghost
@gaspytheghost 3 жыл бұрын
Haha puny human.
@Einargizz
@Einargizz 6 жыл бұрын
0:19 - "A lot of you guys." Sigh... of course you'd be dealing with people who have watched a TED talk about neural networks, telling you why the AI algorithm _that you wrote_ isn't AI. AI is a relatively simple thing to define. AI are autonomous entities, capable of taking in input and performing a desirable action, that are based on conditions that it has been given. In this case, we have a Minesweeper bot, that has been given the goal of clearing a level of bombs. It does so admirably and is clearly an aspect of AI.
@nicknevco215
@nicknevco215 6 жыл бұрын
So my vacuum will take over the world one day.
@Einargizz
@Einargizz 6 жыл бұрын
Well, yes. If all forms of AI are inevitably going to take over the world, as many like to believe, then your roomba is destined to be your future overlord.
@sacr3
@sacr3 6 жыл бұрын
Neural Networks are a form of AI, It tries, fails, replicas the most successful and attempts again. What do you think our brains do? It fails, then tries again and whenever it works, it retains that connection/method and builds off that. Self learning, so sure this programs not about to figure out self automation and take over the world, but its a self learning algorithm that can be applied to literally everything and has been. From Healthcare to games, its doing a much better job than Humans in a lot of examples. Like diagnosing people, we give it all the information and 90% of the time its diagnoses is correct. AI? Sure it is, AI is pretty Broad. Even "Siri" is considered AI but in reality its just a program that recognizes the input and outputs the most relevant information. But again, thats all we do isn't it? We take the input and then output a response.
@Einargizz
@Einargizz 6 жыл бұрын
Neural Network algorithms are most definitely a form of AI. Nobody here was claiming otherwise.
@Einargizz
@Einargizz 6 жыл бұрын
It doesn't apply to any computer program, if they are not autonomous. It's the difference of a remote controlled vacuum and one that periodically goes around your house for you. A remote controlled one waits until it receives a signal to move. The latter one follows an algorithm that maps out your floor automatically. But the latter one does not need to use neural networking to do so. There are vastly more efficient methods to do so.
@MkLC04
@MkLC04 4 жыл бұрын
A new episode of: The Recommendations
@gaspytheghost
@gaspytheghost 3 жыл бұрын
Season 12: The Dark Ages
@alexmagee7571
@alexmagee7571 6 жыл бұрын
Your videos are very inspiring as I delve into the wonderful world of ai. Thanks for publishing your work!
@saurabhdagar9596
@saurabhdagar9596 3 жыл бұрын
This is the kind of Recommendation i want YT to show.
@JourneywithBrandon
@JourneywithBrandon 4 жыл бұрын
I started laughing when you stopped it before the ending. Love your vids! Wish they were more frequent but I get it.
@geriengrico7565
@geriengrico7565 6 жыл бұрын
AI vs AI on Multiplayer games
@GetsLonely
@GetsLonely 5 жыл бұрын
I know this is an old comment, but if you're still interested in this type of thing, there are communities that regularly program AI for multi-player online games and pit them against each other. One of them is a channel on twitch.tv SSCAIT (Starcraft student AI tournament) which is continuously playing Starcraft: Brood War games against fellow AI's, 24/7. These are generally NOT self learning bots, but people update their bots every week or so, and they're always improving.
@ear25864
@ear25864 3 жыл бұрын
I watched half this video last year today(exactly) and I finished it a year later
@gaspytheghost
@gaspytheghost 3 жыл бұрын
This is some movie crap.
@Kenny_Bass
@Kenny_Bass 6 жыл бұрын
Yeah, I'm going to demand that you made a ton more videos, your channel is mighty addictive. Keep up the good work.
@michaell742
@michaell742 6 жыл бұрын
Expands grid “That terrifying” Expands it again “That is the most terrifying thing I have ever seen in my entire life”
@typeterson8376
@typeterson8376 3 жыл бұрын
This version of Code Bullet is so much more polite than his future self
@triplebog
@triplebog 4 жыл бұрын
It's interesting that your AI sometimes dies when there are moves it could make that are 100% safe.
@PandemoniumMeltDown
@PandemoniumMeltDown 4 жыл бұрын
I was wondering about this one, there was no real display of the fail points... I hate slowing down something accelerated. I guessed there were easy fails in this so called hard coded candy.
@Pintkonan
@Pintkonan 4 жыл бұрын
@@PandemoniumMeltDown i dont think the footage is accelerated. the ai is playing so fast =b
@kevinquinn4725
@kevinquinn4725 3 жыл бұрын
That means its realistic A.I. to his definition lol
@jimmyrustles8801
@jimmyrustles8801 6 жыл бұрын
Nice mix of pictures & black text! Really like how you implimented them both into your videos
@bex2
@bex2 6 жыл бұрын
Dude your videos are so cool. Please keep making these :)
@mcblaggart8565
@mcblaggart8565 6 жыл бұрын
SKYE
@lollolo9492
@lollolo9492 6 жыл бұрын
syke?
@DarkReaper949
@DarkReaper949 6 жыл бұрын
SKYE
@EebstertheGreat
@EebstertheGreat 6 жыл бұрын
Pretty sure he meant "psych".
@noctuadiscipulum9715
@noctuadiscipulum9715 6 жыл бұрын
SYKE THAT'S THE WRONG NUMBER!
@YourIQDoesntMeanShitToMe
@YourIQDoesntMeanShitToMe 6 жыл бұрын
*_SKYE_* TO KO KO KO PO POM POM POM
@emilypiens2355
@emilypiens2355 4 жыл бұрын
Make it so that evry pixel in a 4k screen is a square in the grid and use the colors of the numbers to indicate them
@see201
@see201 6 жыл бұрын
Thanks for showing what an increased bomb density does. It's fascinating to see how the difficulty increases seemingly exponentially as you increase the bomb density.
@abathur5011
@abathur5011 6 жыл бұрын
Your video are so nice and your commentary so funny ! Continue like that 😄
@Dezu123
@Dezu123 6 жыл бұрын
its not about a grid, its about a ratio mines/squares, when u have less ratio u wouldnt have a 50/50 problems, atleast not that much
@illesizs
@illesizs 6 жыл бұрын
I want this as my new screen saver.
@craftyle
@craftyle 6 жыл бұрын
illesizs do you have it all ready?
@ProwlXV
@ProwlXV 5 жыл бұрын
Yes
@2000Meilen
@2000Meilen 6 жыл бұрын
5:55 I love it how it looks like the field is litteraly melting away. 10/10 satisfaction points.
@chrishorsfield6268
@chrishorsfield6268 5 жыл бұрын
I love how organic the spread of the AI looked.
@MrPablosek
@MrPablosek 6 жыл бұрын
1:27 Nice to see a guy from my country
@Newt2799
@Newt2799 6 жыл бұрын
Yeah us Ugandans need to stick together.
@MrPablosek
@MrPablosek 6 жыл бұрын
NewtSniper Uganda is dead.
@MrPablosek
@MrPablosek 6 жыл бұрын
Astroxeon Różnie bywa ;D
@chilledwavez
@chilledwavez 5 жыл бұрын
Elo Polska
@wafelgd9715
@wafelgd9715 4 жыл бұрын
Ruski yes?
@candiedthrone
@candiedthrone 4 жыл бұрын
"yea so i won" XD
@TheLonewolf272
@TheLonewolf272 5 жыл бұрын
Code bullet i just wanna say im really enjoying watching these A.I videos and keep thinking of when yours will get to the point of playing Mario successfully or wait for it a larger title like halo, battlefield, Call of duty, etc
@grantmcintyre1795
@grantmcintyre1795 6 жыл бұрын
just found this channel and it is AMAZING keep making videos my dude (and get a mic filter will make the videos seem a higher quality and make you more of that sweet sweet youtube money)
@cartolla
@cartolla 6 жыл бұрын
Where did you get the music for your videos? And btw, nice work! :D
@cartolla
@cartolla 6 жыл бұрын
NeedyZ thanks!
@overlordalfredo
@overlordalfredo 5 жыл бұрын
AI stands for "Algorithmic Intelligence" - Boom! Problem solved...
@alextsukada4013
@alextsukada4013 5 жыл бұрын
Artificial intelligence...
@overlordalfredo
@overlordalfredo 5 жыл бұрын
@@alextsukada4013 you did not get it did you...? It is about the ever going conflict of what is ab AI vs what is an Algorithm...
@alextsukada4013
@alextsukada4013 5 жыл бұрын
Overlord Alfredo ah I see, just needed some clarification. Thanks
@hunterwalker2671
@hunterwalker2671 4 жыл бұрын
An algorithm is a math problem in harder to learn word. Also if that were to be true we would be AI too.
@luckyhmongkey
@luckyhmongkey 6 жыл бұрын
Love the humor and also the DBZ references crack me up! Great work man
@alsifjlasieflooo
@alsifjlasieflooo 6 жыл бұрын
Great mix of voice and your iconic "text speech" on this one!
@rosenbaummilton7720
@rosenbaummilton7720 6 жыл бұрын
Would love it if you did like a short explanation on how you calculated the probability for the squares, not like an in-depth code tutorial, just some pseudocode. Also, I define artificial intelligence as any program that simulates learning.
@5yfyguy218
@5yfyguy218 6 жыл бұрын
Check his last video for explanation.
@GrifMoNeY
@GrifMoNeY 6 жыл бұрын
The explanation is that P(bomb|tile) = Number of possible arrangements of bombs in which the tile contains a bomb / number of possible arrangements of bombs An arrangement is impossible if it violates a number tile.
@rosenbaummilton7720
@rosenbaummilton7720 6 жыл бұрын
Yeah, well I guess I wasn't clear enough. That simple probability is easy to think of, but that would be wildly inefficient, and can't be the way that he did it.
@rodjacksonx
@rodjacksonx 6 жыл бұрын
Sometimes brute force is fast enough.
@8bit_pineapple
@8bit_pineapple 6 жыл бұрын
rosen. Nope. Minesweeper is NP-Complete. So bruteforce is the only known way to go for perfect play. You're underestimating modern hardware a bit. Only caveat is that I'd imagine for speed you'd want to be using a GPU to check all the combinations, maybe write that part of the code CUDA or whatever. Small edit: Oh... and of course you can use simpler rules for finding 100% safe/bomb spots. So check them first for obvious safe/bomb spots, then brute force when necessary.
@koosnaamloos4291
@koosnaamloos4291 6 жыл бұрын
I see you always let it start in the corners. Why? edit: Okay, I've read some of the reactions and I think I know now. The corners do not have a lower probability of being a bomb. The only advantage I can think of is that because there are less tiles surrounding a corner there's a higher chance of having zero mines around it. This opens up more tiles, giving you a point to start from instead of having to take another guess.
@timothyhilditch
@timothyhilditch 6 жыл бұрын
You are more likely to hit a 0 so you uncover multiple squares. I pointed it out in the comments in the previous video. Weird that he didn't mention it. link explaining further. www.minesweeper.info/wiki/Strategy#First_Click
@feschber
@feschber 6 жыл бұрын
I guess it's probably because at the beginning all squares have the same chance of being a mine so the programm just starts with the first one in the array ([0][0])
@feschber
@feschber 6 жыл бұрын
why would you be more likely to hit a zero in the corners? Imo it's just to keep the code simple
@superpowerdragon
@superpowerdragon 6 жыл бұрын
I have played a lot of minesweepers, and the main reason I always start in the corner is that the corner is the place where might get a 50/50 chance and have to guess, which could mean that I might lose all the hard work I have done throughout the game. If I just start in the corner first, then I don't have to deal with this choice at the end.
@feschber
@feschber 6 жыл бұрын
ah okay I never thought of that but I'm still not sure if it's intentional since he never mentioned it
@charliejones3352
@charliejones3352 6 жыл бұрын
I love how you can appeal to both coders and non coders, by explaining the coding, and by making something interesting. Thank you, and keep making these videos
@jannesvanquaillie9151
@jannesvanquaillie9151 6 жыл бұрын
Your videos are great !! It's really fun. Keep on going.
@cosmicmutant33
@cosmicmutant33 6 жыл бұрын
Please make a 3d mensional mine sweeper So basicly minesweeper in layers and witv higher numbers and look if your ai can still do it
@8bit_pineapple
@8bit_pineapple 6 жыл бұрын
Are you sure your AI is perfect? For instance, when faced with many squares that are equally likely to have a bomb wouldn't there be a square that is strategically better? e.g. squares more likely to give more useful information for future turns.
@ABaumstumpf
@ABaumstumpf 6 жыл бұрын
It is a simple program - no AI involved, and ye,s you are absolutely correct - it can be improved as it does not consider what choice leads to a better outcome in the long term: before it would take a single 50% chance to lose it would take a 49% chance hundreds of times in a row considerably lowering its chances in scenarios where it has to rely on chance.
@8bit_pineapple
@8bit_pineapple 6 жыл бұрын
Huh, I didn't consider that. I was just thinking that in situations where you have multiple choices with the same probability, deciding which is strategically the best seems awfully difficult. But you're right, it also seems plausible that in the long run there may be instances where the best move (The one most likely to lead to a winning game) isn't one with the lowest odds of you losing that turn. Like if you have a choice between say, a 50% loss square that gives you allot of information for later turns, vs a 49.99% loss square that will give you little information.
@put4558350
@put4558350 6 жыл бұрын
There is some technical words that easy to confuse here. AI : Artificial intelligence - software that show intelligence like people do. So hard code is still count as AI Self learning AI : Basically and AI that can improve it self. Self learning AI make for something programmer don't have concept to hard code. By leaning to statistics. Newron network AI : one type of Self learning AI design. Self learning AI will take more processing power it may better than this logic base AI at finish the game. But because it will take much more processing power it will not run as fast.
@benjaminbadina2201
@benjaminbadina2201 5 жыл бұрын
@@put4558350 thanks, it's not easy for a stranger to understand every single word. It helped me 👍
@devanbmx1012
@devanbmx1012 4 жыл бұрын
Ur channel has come a long way especially the art
@jjohn1234
@jjohn1234 6 жыл бұрын
Awesome content, keep going
@tjrpmw
@tjrpmw 6 жыл бұрын
Now if we could just make it cure cancer..... :)
@DDryTaste
@DDryTaste 6 жыл бұрын
Buster McGhee what if we could just make you cure cancer..... :)
@jacobshirley3457
@jacobshirley3457 6 жыл бұрын
A lot of people will have to die, though...
@davisjohnson5688
@davisjohnson5688 5 жыл бұрын
"SKYE, Become a Patreon"
@AdalgrimTook
@AdalgrimTook 6 жыл бұрын
Great video, any plan on doing some processing tutorials or shit like that?
@DerrylHopkins
@DerrylHopkins 6 жыл бұрын
Ayy I just subscribed and you posted a video!
@Gemini-Lion
@Gemini-Lion 5 жыл бұрын
What I think is an AI is just a program that simulates intelligence, but artificially. Hence: *_Artificial Intelligence_*
@Lunarcreeper
@Lunarcreeper 3 жыл бұрын
Wow this is very old codebullet video Thanks homepage??
@TheMacgyver3441
@TheMacgyver3441 5 жыл бұрын
Your an amazing to be able to do this. Love your shows.
@nerfherder33
@nerfherder33 3 жыл бұрын
Hahahaha dude the music is amazing!! Mmmmm love it. Might I ask what the songs were?
@quinnmcrae6737
@quinnmcrae6737 5 жыл бұрын
73x138 or 74x138. I lost count near the end of the vertical
@christopherg2347
@christopherg2347 5 жыл бұрын
Making the grid bigger makes it *easier* for the AI. Whateer increase in computation time there is, it would be worse for a human player. And the difficulty is best measured in Size/Bomb ratio. And once you go past a certain bomb ratio, it stops being a game of skill and becomes a game of chance.
@first782
@first782 6 жыл бұрын
I love the text in the background that just says "DEAD" and resets the program every time the AI dies XP But for real this amazing
@hadirizvi5186
@hadirizvi5186 6 жыл бұрын
i am so happy right now, because as far as I know, no one has asked about the song name, that means you actually have good subscribers unlike other youtubers
@TurnaboutAkamia
@TurnaboutAkamia 6 жыл бұрын
I have a question. Why do you have to literally remake every damn game you make your AIs play? Or do you _not_ have to do that, and you just do that because you want to? Don't get me wrong, it's cool that you go that extra mile at all, but I've seen people who work with AI (both of the hard-coded and the machine learning variety) that usually _don't_ seem to do that, so it struck me as unnecessary. lol
@Liggliluff
@Liggliluff 4 жыл бұрын
Because it's easier and faster for him to build in the AI into the game, that can read the data directly from the game, and do inputs directly into it. Still, the AI is not cheating, because it can't read data it isn't given. - Having the AI play games that he hasn't built requires screen reading, and/or memory scanning, which is a much slower process. This is not good if he's going to run 500 entities playing the game, or games requiring more direct and exact input. It also requires analyzing the data, and there can be errors in that too. - The best videos he done on this topic are the ones about Pong and Storm The House, where he actually use screen reading.
@AlexVasiluta
@AlexVasiluta 6 жыл бұрын
Song at 6:20?
@DD-pz8sp
@DD-pz8sp 5 жыл бұрын
Aakash Gandhi - Viking
@TheMaplestrip
@TheMaplestrip 6 жыл бұрын
You should make some screensavers out of the big ones. Just make a multiple hour video of your AI clearing huge _Minesweeper_ fields. That would be gorgeous :3
@izimari
@izimari 5 жыл бұрын
1:16 *"Is that f*cking FRIEZA!?"*
@Ghost_Drive
@Ghost_Drive 6 жыл бұрын
I agree with your definition of AI, but neural networks are cooler in my opinion. I like watching what the computer determines is the best way to win over time.
@Einargizz
@Einargizz 6 жыл бұрын
Neural networks are great for pattern recognition and has been improving image sorting algorithms immensely. But it's not a cure all for everything. For example, A* search is a much better alternative, if your problem is about path finding.
@Ghost_Drive
@Ghost_Drive 6 жыл бұрын
Just skimmed through A* on wikipedia, seems similar to Dijkstra's (as it says on the page), which I used on a homework assignment last semester for a computer science. I would agree that a neural network would certainly perform much less efficiently than this algorithm. I'm guessing the major advantage over Dijkstra's is the heuristic step? That would allow the algorithm to aim the path towards the goal rather than radially expanding outward.
@Einargizz
@Einargizz 6 жыл бұрын
That's correct. How far are you into computer science? I'm sorta surprised that you've been introduced to Dijkstra without your instructors mentioning A*.
@Ghost_Drive
@Ghost_Drive 6 жыл бұрын
I'm currently about to finish my third semester in the program (I'm a semester behind as I started in Physics and added the dual major). The class I was taking was data structures, and the assignment was tied to the directed graph data structure (we had a choice between adjacency matrices and using pointers, can't remember which I used). I'm currently in an algorithms class and a theory class (I really enjoyed going from regular expression to minimum state DFSA's).
@mudkipmatt5769
@mudkipmatt5769 6 жыл бұрын
where did u get the minesweeper
@tannerh7774
@tannerh7774 6 жыл бұрын
He most likely made it, just like with all his other games.
@Pix3lLord
@Pix3lLord 6 жыл бұрын
Thing is there is no real way to apply the ai to another running program cause the capabilities of Processing don't support that and if there is a way it is still simpler just to reprogram these simple games
@tannerh7774
@tannerh7774 6 жыл бұрын
Lord of Pixels incorrect, you can use a language like c++ to read memory
@satibel
@satibel 6 жыл бұрын
processing has the robot class that can take a screenshot and click, and you can determine which number of bombs there is by the color of the number, So it's pretty easy to implement a function to take a screenshot and spit back an array with the number of bombs. Though, when doing an AI you are often remaking most of the engine anyway, so it's not a lot more work to put a gui on it.
@mudkipmatt5769
@mudkipmatt5769 6 жыл бұрын
my comment started a conversation
@Kanerade
@Kanerade 6 жыл бұрын
Yey, when I get back I find a 25 min old vid of my fave computer youtuber! :3
@DeathlyTired
@DeathlyTired 6 жыл бұрын
Muranski's Expert Minesweeper WR is one of the most amazing records in all gaming - when you realise just how exaxctly perfect his choices and execution are. It's stood the test of time, too.
@drdca8263
@drdca8263 6 жыл бұрын
I think your definition is a good one
@drdca8263
@drdca8263 6 жыл бұрын
Also, for the people who say that learning is necessary... one could argue that this system is learning more about the mines over the course of a game. As it clicks, it obtains new information, and based on that information, it updates the probabilities it assigns to different things. This could be said to be learning?
@sixkayjay
@sixkayjay 6 жыл бұрын
Song name at 5:40?
@calebjones3383
@calebjones3383 6 жыл бұрын
I wasn't able to find the song, but the song did remind me/sound similar to: John Dreamer - Becoming a Legend John Dreamer - Brotherhood
@DD-pz8sp
@DD-pz8sp 5 жыл бұрын
Aakash Gandhi - Viking
@somebody237
@somebody237 3 жыл бұрын
Keep up the Great job man.
@PuffleBuns
@PuffleBuns 5 жыл бұрын
My heart nearly stopped at the end when I thought you actually ended the video. . .
@yhi_zuikaku3406
@yhi_zuikaku3406 6 жыл бұрын
Oh dear... There goes my beloved intro. --Zuikaku
@CodeBullet
@CodeBullet 6 жыл бұрын
sorry i forgot
@vcreativeart16
@vcreativeart16 3 жыл бұрын
The snack that smiles back Children
@irishmigit
@irishmigit 6 жыл бұрын
Thank you for increasing the size, I wanted it but didn't think to ask
@enexplogen8230
@enexplogen8230 3 жыл бұрын
I recommend having your AI read #2's better, that is almost a requirement in getting consistent at harder maps
@Corang98
@Corang98 4 жыл бұрын
Who else is here because he hasn't uploaded in two months?
@superllama6768
@superllama6768 4 жыл бұрын
Three*
@localhomie1221
@localhomie1221 4 жыл бұрын
😐
@ftwgaming0
@ftwgaming0 4 жыл бұрын
"Skye" damn... You mean syke or psyche?
@Liggliluff
@Liggliluff 4 жыл бұрын
i.etsystatic.com/11242699/r/il/d0d829/1892086115/il_570xN.1892086115_c5v6.jpg
@sonyatheforestgaurdian3152
@sonyatheforestgaurdian3152 4 жыл бұрын
My eyes tend to be wird but I'm amazed that he got every detain. Even down to the suddle color difference where the bombs are placed.
@danielmarkkula3004
@danielmarkkula3004 6 жыл бұрын
Keep making these bro
@makarmakar9226
@makarmakar9226 3 жыл бұрын
if he gets nor revenue this time i will be so confused.
@PilarHurdle2
@PilarHurdle2 5 жыл бұрын
I disgree with what you think i AI is I think its something I use to make myself feel good on super smash bros
@reveryoungfo
@reveryoungfo 6 жыл бұрын
I love that type of humour :D hahah nice man!
@red_wolf4164
@red_wolf4164 5 жыл бұрын
I could watch this ai play minesweeper all damn day. Love it.
@mudkipmatt5769
@mudkipmatt5769 6 жыл бұрын
6:58 theres a error
@shaangraham
@shaangraham 6 жыл бұрын
Lol
@hvhyper769
@hvhyper769 4 жыл бұрын
6:59
@jellydonut505
@jellydonut505 4 жыл бұрын
5:59 128 x 70
@pupsthemechanic
@pupsthemechanic 6 жыл бұрын
You answered every other question, but as I asked in the last video people were asking what the music was.
@NetAndyCz
@NetAndyCz 6 жыл бұрын
You got me with the ending:D
@muudip9151
@muudip9151 6 жыл бұрын
on minesweeper the frist click should always unlock a open space and in you ai simulation it dosen't do that so that is causing it to fail a lot of the times
@steeledminer616
@steeledminer616 6 жыл бұрын
Uh.... False. Personally speaking I've lost on turn 1 several times.
@ParoxyDM
@ParoxyDM 5 жыл бұрын
Umm if all the tiles are blank and you don’t know where the bombs are... how are you supposed to know the best place to click to open a space?
@simis5294
@simis5294 5 жыл бұрын
Most Minesweeper games guarantee, that you don't loose turn one, however depending on the difficulty it is all but granted, that you'll get an open square at your first click, I usually play with so many mines, that I have like a 25-50% chance to hit a mine, if I just click randomly xD
@someweeb3650
@someweeb3650 6 жыл бұрын
How would only neural networks be considered AI? Pathfinding in video games isn't done with a neural network.
@gdtoob
@gdtoob 6 жыл бұрын
Some Weeb you're right that neural networks aren't the only kind of AI. However, pathfinding in video games is not AI because they operate based on an algorithm that devises the perfect path to take, such as A*. It would be AI if it were able to continuously adjust the algorithm it used to get a more optimal outcome each time.
@VocalMabiMaple
@VocalMabiMaple 6 жыл бұрын
but that music though, sweet sweet jazz-hop chill
@ViktorMartin113
@ViktorMartin113 6 жыл бұрын
Make it even bigger push it to its limits
@_germanikus_
@_germanikus_ 4 жыл бұрын
5:18 Looks like my monitor.
@timothyhilditch
@timothyhilditch 6 жыл бұрын
This algorithm has many faults here is a list of moments your algorithm gives up a guessing when there are still moves. Here is a screenshot with my clearance from 3:38 i.imgur.com/IQeIL6g.png It has already guessed. Here is another screenshot. It has guessed more than 4 times already. i.imgur.com/J3sGOeh.png from 3:42 3:38 bottom right looks like this, reduce the speed of the video if you are looking for the mistakes. ? ? ? ? ?3 1 1 ? 1 00 ? 1 00 You fail and restart 3:40 bottom right again. ?MM ? 3 2 ? 1 0 You die before you solve it. 3:40 bottom right again ? ? ? ? 2 1 ? 1 0 Another solvable you ignore. Please stop calling this algorithm Perfect. Once I called you out in the comment section from not starting in the corner last video. You changed to starting in the corner this video, without even mentioning the change.
@jhgrc
@jhgrc 6 жыл бұрын
Exactly - these kind of links must be done to be able to beat best human players. 20y ago on fairly low level C-programming course we had task to write algorithm-based minesweep solver (communicated via stdin to mineserver and if you guessed and opened a mine you got rejected) where I did this kind of chains like dual-1's are stating there is one mine, so another 1 is telling it's adjacent square does not have mine. And -20y of Moore's law our algorithm were solving large minesweeper fields sub-second timeframe (we were competing with speed and how much you can solve). So video poster's current AI evolution is really not that impressive. Also where to start board? By minesweeper definition your first guess is always guaranteed not to contain mine. So you get coordinates of first guess, initialize board so that there is no mine and tell result. Problem is that if square reveals "1" and you have 9 unknowns around it you must guess. But on above programming course it was forbitten to guess so that "1" was the solution.
@Cowtymsmiesznego
@Cowtymsmiesznego 6 жыл бұрын
This comment deserves more recognition. Great catch! It seemed suspicious that this supposed brute-force program is so fast.
@AndrewKay
@AndrewKay 6 жыл бұрын
In almost all real boards, you can count the number of combinations without iterating through all of them; but you have to do it in a clever way. Consider unrevealed tiles "constrained" if there is a revealed number in their neighbourhood, and "unconstrained" otherwise; let n be the number of unconstrained tiles, and m be the number of mines whose positions are not known. Then if there are k mines in the constrained tiles, there are (n choose (m-k)) combinations of where the remaining m-k mines can be. To count how many combinations have a mine at each constrained tile: - let constrained be a dictionary mapping constrained tiles to 0 (initially) - let unconstrained be a dictionary mapping integers from 0..m to 0 (initially) - let total = 0 # total valid combinations - for each k: - - for each valid combination of k mines in the constrained tiles: - - - let c = (n choose (m-k)) - - - update unconstrained[k] += c - - - update total += c - - - for each tile p where a mine exists in this combination: - - - - update constrained[p] += c Then, the probability that constrained tile p contains a mine is constrained[p] / total. The probability that an unconstrained tile contains a mine is (1/(n*total)) * sum from k = 0 to m of (m-k)*unconstrained[k]. Even iterating through all combinations of k mines in the constrained tiles is unnecessary, since we only need to generate valid ones, this can be done with a backtracking search rather than by generating all and rejecting invalid ones. If you're even cleverer, you can split the constrained tiles into independent sets which share no local constraints. So, I have no doubt that an algorithm can follow the strategy outlined in the previous video efficiently enough for these board sizes, although given the errors Timothy noted, I suspect CodeBullet's algorithm doesn't really follow this strategy exactly - perhaps it estimates the probabilities by a Monte Carlo method instead, or perhaps it is just buggy.
@yolololfun5341
@yolololfun5341 6 жыл бұрын
And the algorithm does not look forward. That is needed because of this situation. Imagine that it has to take a risk, you can choose between a small and a big risk. If it takes the small one, it still has to take the bigger one, but if it takes the bigger one first it will get enough information not to have to take the bigger one. The AI will go for the smallest risk, but that is not going to help it. This situation is a bit hypothetical but it does illustrate how anticipating possible outcomes is an essential part of a perfect AI. The only way I could think of to solve this is make the AI calculate literally every possible game of minesweeper (you could eliminate some possibilities, but the number of games the AI would have to consider would still be astronomically high). It is probably infeasible to do this with nowadays' computers, the same way the perfect chess AI does not exist.
@AndrewKay
@AndrewKay 6 жыл бұрын
But most of the time there is a definitely-safe move requiring no look-ahead, so on reasonable difficulty settings a complete game doesn't require very many guesses in total - the search tree is not very deep. Also, you don't need to play out games all the way to the end if you know they already took more risk than another variation did; and deeper branches mean more guesses, usually meaning more total risk, so you're more likely to be able to prune the parts of the search tree that are deep. I think a branch-and-bound algorithm, combined with an optimised probability-measurement algorithm (like I described above), would be feasible.
@Strudders29
@Strudders29 5 жыл бұрын
When it failed/struggles with 150 bombs I wonder if it’s some sort of density issue. Have you looked at what happens with the larger grids if you have the same bomb:squares ratio as you did in the 150 example?
@Dufftata
@Dufftata 6 жыл бұрын
Im glad you asked for my definition so here I make on up on the spot notifying you that I spend some time on the topic. The issue is with the word intelligence of course. Artificial we call most things made by humans, say "fake copies". For me, intelligence is a system within a system that makes the system stable. People are very fast labeling their algos as AI's. The closest we got to AI (in my opinion) is amazon echo. Check out its language abilities on KZfaq for more. (Horrified Amazon Echo Users Say Alexa Has Gone Creepily Insane while Laughing) Ok now back to video ;D very cool channel glad to find it (at 5am) PS.: making an unconventional Computer in Minecraft, video will come soon, might be of your intererst CodeBullet Cheers
@telemonofficial6924
@telemonofficial6924 6 жыл бұрын
To tu są polacy?!
@BezNazwy__
@BezNazwy__ 5 жыл бұрын
Hejka
@Kensox
@Kensox 5 жыл бұрын
Kamil to mistrz sapera kozaq
@dewe6037
@dewe6037 6 жыл бұрын
you guys are all wrong A.I. is an acronym
@MrID36
@MrID36 6 жыл бұрын
Dewgang_47 Nope. An acronym is an abbreviation which can be pronounced as if it were a word, like NASA and AIDS.
@ArvexYT
@ArvexYT 6 жыл бұрын
The large grid games are actually kind of fun to watch.
@ciaduck
@ciaduck 6 жыл бұрын
That would make a kickass programmed screen saver. :D
@Liggliluff
@Liggliluff 4 жыл бұрын
A process heavy screensaver, but sure
I Created An A.I. to DESTROY Tetris
17:25
Code Bullet
Рет қаралды 3,3 МЛН
BREAKING Storm The House with an AUTO CLICKER
11:24
Code Bullet
Рет қаралды 13 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 43 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 7 МЛН
Making a Calculator using ONLY MARBLES
11:46
Code Bullet
Рет қаралды 2,7 МЛН
How do you solve Minesweeper?
12:41
Apple Maths
Рет қаралды 220 М.
The first artificial intelligence I ever made
17:05
carykh
Рет қаралды 817 М.
Using A.I. to DOMINATE NERDS in TETRIS
31:16
Code Bullet
Рет қаралды 7 МЛН
I created an AI to Play Chess
11:52
Code Bullet
Рет қаралды 2,7 МЛН
I programmed an A.I. to DESTROY the game PONG
11:16
Code Bullet
Рет қаралды 2,9 МЛН
minesweeper variants that get more cursed
12:03
Icely Puzzles
Рет қаралды 490 М.
Minesweeper Opening Strategy: The Classical
11:51
Mine Buoy
Рет қаралды 245 М.
Some of the Shortest Speedruns EVER
20:44
Storster
Рет қаралды 545 М.
AI Learns to DESTROY old CPUs | Mario Kart Wii
9:54
AI Tango
Рет қаралды 1,4 МЛН