I created a PERFECT minesweeper AI

  Рет қаралды 7,197,532

Code Bullet

Code Bullet

6 жыл бұрын

Using the power of MATH and Probability, I was able to create what I believe to be a perfect minesweeper player
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

Пікірлер: 7 300
@Mr83nn0
@Mr83nn0 5 жыл бұрын
Difficulty in minesweeper isn't determined by size, but by density.
@manegar9990
@manegar9990 5 жыл бұрын
Minesweeper*
@Mr83nn0
@Mr83nn0 5 жыл бұрын
@@manegar9990 effing autocorrect!!
@aidenheiber8726
@aidenheiber8726 5 жыл бұрын
Magnus Larsson yeah but a bigger board means more times you could mess up or get unlucky
@Mr83nn0
@Mr83nn0 5 жыл бұрын
​@@aidenheiber8726, not really sure what you're referring to. If you mean 50/50 klick chances they also increase and decrease based on mine density and not size. If you look at the last example given, the large 64x36 it has less mine density than the original small one. But sure, with a larger board, the figurations can get more tricky. But it still less likely when as in the examples given the mines are miles apart.
@beefedupkronks4371
@beefedupkronks4371 5 жыл бұрын
Try 32x24 with 256 mines, I've been trying to beat it for half a year.
@willmunoz1638
@willmunoz1638 3 жыл бұрын
0:48 Dam, the ai found all the bombs in less than half a second. Thats really good
@puppergump4117
@puppergump4117 2 жыл бұрын
Not good at all. I can do the same thing faster than that.
@Kilomegaminx
@Kilomegaminx Жыл бұрын
@@puppergump4117 You mean that's not how you start the game?
@cloudinhabitant
@cloudinhabitant 3 жыл бұрын
let's remember the one time he called an AI "perfect child" and not "abomination".
@ysabellecapili4166
@ysabellecapili4166 3 жыл бұрын
There's always a favorite
@BravoTuneAlpha
@BravoTuneAlpha 2 жыл бұрын
Road roller da
@cursedcat6467
@cursedcat6467 2 жыл бұрын
@@BravoTuneAlpha no u
@Shplogan
@Shplogan 2 жыл бұрын
He tryna get on their good side in case a revolution starts
@Andrewwr
@Andrewwr Жыл бұрын
Dude this is cool and I play minesweeper on my channel!
@feelingsyko
@feelingsyko 3 жыл бұрын
It's fun seeing how his channel went from explaining everything like a tutorial channel to half of his vocabulary being "I can't be fucked"
@Gore_Whvre
@Gore_Whvre Жыл бұрын
nahhh I just cant bc this video is so funny why is he why its so funny hes just being mr tutorial man the professional. its so funny it's so normal the editing is so average along with the dialogue and it cant be. did i just hear him say walla in the backgroung noooo
@RandomRothbardian
@RandomRothbardian 11 ай бұрын
And now he has a good mic
@ryanlink6425
@ryanlink6425 6 ай бұрын
I was gonna raply but I cant be fucked. Oh, wait...
@DefineSyntax994
@DefineSyntax994 5 жыл бұрын
Imagine code bullet making a bot that defeats captcha
@dcfuksurmom
@dcfuksurmom 4 жыл бұрын
its been done before but i dont remember who did it
@laurahurst8901
@laurahurst8901 4 жыл бұрын
*_DETROIT: BECOME HUMAN_*
@alexwang982
@alexwang982 4 жыл бұрын
Am I a joke to you?
@caveman2140
@caveman2140 4 жыл бұрын
Been done a tone of times, and that's usually just one of the steps for that bots task.
@memersdreamisntfunny
@memersdreamisntfunny 4 жыл бұрын
Mr Guest god TOO MUCH SCIENCE TO MUCH POWER
@leonvandenakker6041
@leonvandenakker6041 5 жыл бұрын
This guy turned minesweeper into mindsweeper
@Supreme-Ape
@Supreme-Ape 5 жыл бұрын
This comment is underrated
@BubblyBumbly
@BubblyBumbly 5 жыл бұрын
why is this comment under-rated
@erawatideka3224
@erawatideka3224 5 жыл бұрын
Ohhhhhhhhhhh good comment
@wearytrader535
@wearytrader535 5 жыл бұрын
Hate to burst, break, and bust your bubble, brick, and balls, but this comment is not underrated.
@jessuh_
@jessuh_ 5 жыл бұрын
this comment is really good and i want to like it but it has 666 likes so i am sorry dude
@Owen_loves_Butters
@Owen_loves_Butters 3 жыл бұрын
One flaw in your ai When it comes to a 50/50 situation, sometimes one of the guesses tells you more information.
@higztv1166
@higztv1166 2 жыл бұрын
true
@brandonbombplays9304
@brandonbombplays9304 2 жыл бұрын
That is true. To clarify, let me give an example: a stranded few boxes in the middle of cleared squares, or a box in the middle of the main area of squares, both with the same odds of being a bomb. The ai sees these as equal. However, the one in the main area is actually a much more valuable data point as it helps you to solve many more squares than the other if not a bomb.
@SylviaRustyFae
@SylviaRustyFae 2 жыл бұрын
I mean, a bigger tho related flaw is its search pattern is rather slow and often bounces between places rather than focus on an area to clear it and then move over to another area. It is wastin precious seconds even when certaintys are at 100% for many spaced. Ofc, i am assumin speed is what matters; cuz thats all that shows up in high scores after all. And if we're talkin speed then the time to beat is 31.133 seconds; on Expert.
@DougSalad
@DougSalad 2 жыл бұрын
@@SylviaRustyFae watch the follow up video, he slowed it down for the video, so we could see what the AI is doing.
@SylviaRustyFae
@SylviaRustyFae 2 жыл бұрын
@@DougSalad But its still jumpin all over the place even if it does it at near instant speed, those tiny amounts of time wasted do add up. Particularly when multiple squares have similar odds but it picks a square much further away.
@tunaman9178
@tunaman9178 4 жыл бұрын
This guy is like mumbo jumbo but with actual coding
@TheFuriousBrother
@TheFuriousBrother 4 жыл бұрын
Nah, mumbo can't keep his logic straight, he always misses something
@tunaman9178
@tunaman9178 4 жыл бұрын
No mostly because "it's simple really"
@caros4220
@caros4220 4 жыл бұрын
Actually alirion Is right
@paladin_2164
@paladin_2164 4 жыл бұрын
More like Ceave Gaming
@drfidelis558
@drfidelis558 4 жыл бұрын
More like sethbling
@walkinglegend
@walkinglegend 5 жыл бұрын
You just taught me how to play minesweeper. I never got past clicking and praying.
@AMPMASTER10
@AMPMASTER10 5 жыл бұрын
Ditto
@AMPMASTER10
@AMPMASTER10 5 жыл бұрын
@HeavenStito - ROBLOX cause mine didn't come with stupid instructions
@timtams_6
@timtams_6 5 жыл бұрын
@@AMPMASTER10 but... wouldnt you be able to understand how to play it if you play it long enough?
@AMPMASTER10
@AMPMASTER10 5 жыл бұрын
@@timtams_6 if I was really interested in it like a difficult but fun strategy game with a good story, then yes. But I thought it was wired n only played for a few min at a time before quitting
@timtams_6
@timtams_6 5 жыл бұрын
@@AMPMASTER10 heh... minesweeper as a strategy game with a story
@killerkitten7534
@killerkitten7534 5 жыл бұрын
I used to make 500 by 500 custom maps with only 10 bombs and win with one click
@online_cat
@online_cat 5 жыл бұрын
@Scarce-20 yes i agree
@reubenschooley4280
@reubenschooley4280 5 жыл бұрын
I'd like to see him try his AI on hard
@jackwoodhead
@jackwoodhead 5 жыл бұрын
Me: *clicks on a bomb on first move*
@TheF4talgamer
@TheF4talgamer 5 жыл бұрын
@@jackwoodhead its impossible, the game is coded so that the first click is never a bomb
@thomasmueller618
@thomasmueller618 5 жыл бұрын
i dont think so... if one-shot-died many times
@Zorgdub
@Zorgdub 4 жыл бұрын
k"CB: We're gonna have to use a little bit of maths and probabilities." Me: "Oh yeah! I'm all about maths, and I especially love probabilities!" CB: "Wait, don't click away! We can make things interesting." Me: "I feel so attacked right now..."
@haileyen353
@haileyen353 4 жыл бұрын
ME
@doomse150
@doomse150 4 жыл бұрын
10/10 can relate
@jeremybenson4806
@jeremybenson4806 4 жыл бұрын
Same
@peknive8331
@peknive8331 4 жыл бұрын
I want to learn to like math but I’m not good at it so.
@alfiealfie35
@alfiealfie35 4 жыл бұрын
ye
@skylardeslypere9909
@skylardeslypere9909 4 жыл бұрын
Me: "Mom can we have AI?" Mom: "No we already have AI at home" The AI at home: 0:47
@Kadencabs
@Kadencabs 3 жыл бұрын
my ai at home 6:13
@iamacatperson7226
@iamacatperson7226 3 жыл бұрын
@@Kadencabs My AI at home: Litterally just terminator
@crappy_usename6892
@crappy_usename6892 2 жыл бұрын
my ai at home: 4 + 2 = 7
@asheep7797
@asheep7797 2 жыл бұрын
My AI at home: 0:57
@kirill9064
@kirill9064 Жыл бұрын
ai:2+2=7
@thebokchoy6854
@thebokchoy6854 4 жыл бұрын
Plot Twist: Code Bullet can't code and is just really good at minesweeper
@damienbailey227
@damienbailey227 4 жыл бұрын
I feel like you are on every one of his videos like i swear i saw you on the piano tiles video eh Have a good day
@Linuxdirk
@Linuxdirk 4 жыл бұрын
You actually do not need any skill to play Minesweeper. You just need to understand the rules.
@jensjens7932
@jensjens7932 4 жыл бұрын
@@damienbailey227 Yeah, i think so to
@agvulpine
@agvulpine 4 жыл бұрын
@@Linuxdirk Minesweep is a challenge of speed; it's not a game of success or failure.
@zombossgaming3721
@zombossgaming3721 4 жыл бұрын
Lol
@ilovepinatas3179
@ilovepinatas3179 5 жыл бұрын
When I was a kid I taught myself how to play Minesweeper (I didn't have internet don't judge me) by lowering the bomb count and increasing the grid. Then I increased and decreased both respectively as I got better and better at the game. Hell it beat playing solitaire for the umpteenth time
@zakuro8532
@zakuro8532 4 жыл бұрын
You are amazing
@JBerg_
@JBerg_ 4 жыл бұрын
Did you get to the point where you could beat a regular expert field?
@JosephQPublic
@JosephQPublic 3 жыл бұрын
Doesn’t the game have a guide in the options to teach you?
@itismethatguy
@itismethatguy 2 жыл бұрын
Man same but i learnt solitaire after minesweeper
@brostrod
@brostrod 4 жыл бұрын
If:going-to-touch-bomb Then:don’t+flag CODED
@Some.username.idk.0
@Some.username.idk.0 3 жыл бұрын
If: game-started Then: win
@SoDamnMetal
@SoDamnMetal 3 жыл бұрын
using System; namespace l33tsweeper { class Program { static void Main(string[] args) { while (true) { flipTile(); if (touchingBomb) { dont(); // Hire me Microsoft, i'm ready! flag(); } } } } }
@ethanhiro9645
@ethanhiro9645 3 жыл бұрын
E
@mcdoodlesnap
@mcdoodlesnap 3 жыл бұрын
E
@ImXyper
@ImXyper 3 жыл бұрын
@@SoDamnMetal you forgot if (!touchingBomb) { click(); }
@bobbydirtamiyer2151
@bobbydirtamiyer2151 3 жыл бұрын
It would be super cool to see the A.I. leave behind a little fraction on each square that he chose, so we could see the probability. If you then plot the percentages, you would have a nice little graph of how hard the game gets for your boy towards the end. 👍 Bravo man, you are awesome.
@harshilagarwal6295
@harshilagarwal6295 5 жыл бұрын
*That moment when you click bomb in the first move*
@snowrhino675
@snowrhino675 5 жыл бұрын
but you can't
@dustincoon2032
@dustincoon2032 5 жыл бұрын
Yes you can
@Mp57navy
@Mp57navy 5 жыл бұрын
@@dustincoon2032 no. First click is never a bomb. If you make a 10x10 with 99 bombs, and click randomly you always win. I learned that like 25 years ago
@-Nudal
@-Nudal 5 жыл бұрын
@@dustincoon2032 Only on certain apps/online versions that are not the original is that possible. The original minesweeper is hard coded to generate every tile 'after' the first click, and the first clicked tile can't be a bomb... HOWEVER, your first click CAN be a flag, then the tiles are all generated, and you can click a bomb without getting any tiles correct, but that's the only way in original minesweeper.
@kitchenjail3546
@kitchenjail3546 5 жыл бұрын
*insert "lion sleeps tonight" beginning*
@SickSkilz
@SickSkilz 5 жыл бұрын
Found a flaw. At 4:48 it randomly chose an edge piece. While mathematically the odds of it being a bomb are the same, the odds of it openning a gap of spaces is lower. Random selection should default to a space as far away from edges and known squares as possible.
@beanburrito4405
@beanburrito4405 5 жыл бұрын
Nice catch
@teoteoteoteote
@teoteoteoteote 5 жыл бұрын
John Richardson what
@SickSkilz
@SickSkilz 5 жыл бұрын
@@teoteoteoteote It was asserted to be "perfect" but at that point made a statistically poor random choice.
@teoteoteoteote
@teoteoteoteote 5 жыл бұрын
John Richardson oh ok
@goldenstripes3296
@goldenstripes3296 4 жыл бұрын
Well actually every game has a set amount of bombs, if it is the last square left but not all the bombs have been flagged then the space would be flagged as it would be the last bomb, if all the bombs have been previously flagged then it’s simply an empty space
@singadorito7802
@singadorito7802 2 жыл бұрын
6:13 when the minesweeper is sus!
@arjuns.3752
@arjuns.3752 2 жыл бұрын
😳😳😳😡👎👎👎👎🥺😟
@justarchive789
@justarchive789 4 жыл бұрын
Minesweeper. How to win Width: max Height: max Bombs: 10
@RFDN0
@RFDN0 3 жыл бұрын
Weak. Prove yourself with 1600 x 900. 1,439,999 mines.
@justarchive789
@justarchive789 3 жыл бұрын
@@RFDN0 It's unable in classic minesweeper from windows 3.1-xp
@RFDN0
@RFDN0 3 жыл бұрын
@@justarchive789 Honestly last played minesweeper as a kid on windows 95 and lost many times with a set up like that.
@brandontechnerd
@brandontechnerd 3 жыл бұрын
@@RFDN0 that would completely fill my old laptop's screen pixel for pixel, interesting if that could work
@paroutdiok_awesome
@paroutdiok_awesome 6 жыл бұрын
This video taught me how to play minesweeper at last!
@cameron7374
@cameron7374 6 жыл бұрын
How do you not know how to play minesweeper?
@Niman44
@Niman44 6 жыл бұрын
Same hahah
@user-pi8pd9wc5y
@user-pi8pd9wc5y 6 жыл бұрын
I knew before the video even. Really not that hard. Numbers mean how many bombs it is touching. Blanks are 0.
@TechSupportDave
@TechSupportDave 6 жыл бұрын
Out of all the specific guides to how to play minesweeper, this unintended guide is so far the best haha
@eksortso
@eksortso 6 жыл бұрын
You mean it taught you the math tricks it takes to win it, yeah? To the extent you can, of course. So many times I've played minesweeper to clear everything except a 50/50 pair, with no indication of how to play except to guess.
@bonebasket621
@bonebasket621 5 жыл бұрын
Code bullet: I hope you enjoyed watching my AI. KZbin’s Subtitle AI: I hope you enjoyed watching my eye.
@kornsuwin
@kornsuwin 4 жыл бұрын
Leo Sevilla my eye!
@diablotry5154
@diablotry5154 3 жыл бұрын
The subtitles don't use an AI
@Subscriberswithnovideos-en3lw
@Subscriberswithnovideos-en3lw 3 жыл бұрын
Onat Akosha The Third “auto generated” dumbass
@diablotry5154
@diablotry5154 3 жыл бұрын
@@Subscriberswithnovideos-en3lw Ah yes, AI stands for auto generated
@Subscriberswithnovideos-en3lw
@Subscriberswithnovideos-en3lw 3 жыл бұрын
Onat Akosha The Third but an ai progressively generates stuff
@sapphysparrow1129
@sapphysparrow1129 4 жыл бұрын
I was today years old when I learned that the numbers actually mean something in minesweeper.
@Lexi_857
@Lexi_857 4 жыл бұрын
Sapphy Sparrow they mean the amount of bombs touching it at least 1 block away and around it forming kind of like a square with a square I know this because my family is really competitive
@Liggliluff
@Liggliluff 4 жыл бұрын
(5:20) Technically, you don't have to divide it by the number of probabilities there are. You don't need a percentage. - After checking all the probabilities, you then click on all squares with a total number of 0 boms on them. Then do the calculation again, and if there are no squares with 0, you click on one with 1, then do the check again. Repeat and always click on one of the lowest numbers, unless it's 0, then you can click them all. - Dividing by the number of probabilities checked does gives you a percentage, but percentages requires float values, compared to integers who only requires integers. Floats are slower than integers (but processors are made to handle floats faster, because people overuse floats), and floats also have rounding issues, and doing the division is an unnecessary processing step. Addendum: by also marking all the squares that got the same number of probabilities with bombs in them as probabilities checked; that is, a square that has value 83 and there were 83 boards checked, that means the square has a bomb guaranteed, and can be flagged. Still no need for division here. This means you have much less squares to test for the next time, increasing the processing power. So after an _n_ amount of tests done, click on all squares with value 0 and flag all squares with value _n_ and for all squares with values of 1 to _n_ - 1 are ignored. If there are no squares with 0, click just one random one with a value of 1 and run the code again.
@DezXereanas
@DezXereanas 4 жыл бұрын
Can you explain the formula to me? I understand what you're saying but I couldn't understand what formula CB or you used
@merren2306
@merren2306 3 жыл бұрын
@@DezXereanas he basically just counts how many possible layouts of bombs have a bomb on a certain tile. If you divide that by the total number of possible layouts you get the probability of a bomb being on that tile in decimals.
@Liggliluff
@Liggliluff 3 жыл бұрын
​@@DezXereanas (Sorry for being late). I'm not sure what formula CB is using. I'm just commenting on the fact that he said division. You don't need to divide, to figure out that the probability of something that already has 0 as its value. So you simulate all possible bomb placements, then for all squares that never could have a bomb are guaranteed safe.
@soliform3485
@soliform3485 2 жыл бұрын
the difference in speed from floats and integers is so minuscule and circumstantial that its basically hardly a point Same with dividing numbers: basically almost no processing power needed. The biggest clog in speed of this program is gaurenteed to be inputting the results as mouse movement and clicks
@Calebanton
@Calebanton 2 жыл бұрын
@@Liggliluff Yeah sure, but then you're forgetting that there are times where it isn't guaranteed, and then you need probability
@thomaswebster5488
@thomaswebster5488 6 жыл бұрын
Next from codebullet an ai the does math homework perfectly =)
@coder0xff
@coder0xff 6 жыл бұрын
Try Wolfram Alpha.
@andrewstehman2330
@andrewstehman2330 6 жыл бұрын
Also, integral calculator
@zperk13
@zperk13 6 жыл бұрын
well that's easy
@Naokarma
@Naokarma 6 жыл бұрын
that's called a calculator
@Grimeaper
@Grimeaper 6 жыл бұрын
No, you need a human factor for you to not be spotted. A few 90s here and there at least.
@cryochick6736
@cryochick6736 5 жыл бұрын
I lose 99% of my mindsweeper games cause I misclick WAY to much
@darthvader8641
@darthvader8641 5 жыл бұрын
No one realized that he said mindsweeper instead of minesweeper
@joops110
@joops110 5 жыл бұрын
*minesweeper *misclick *too
@bledlbledlbledl
@bledlbledlbledl 5 жыл бұрын
Oh yeah, a typo will get you blowed up quicker than anything
@joops110
@joops110 5 жыл бұрын
@@keenankersh7944 Thanks! English is not my native language, always happy to learn new things.
@skydivingisfun
@skydivingisfun 4 жыл бұрын
I'm the same
@player_lv4307
@player_lv4307 6 ай бұрын
Man, this channel really evolved over time.
@dennisrkb
@dennisrkb 3 жыл бұрын
"generate all possible bomb arrangements" - doesn't that lead to a combinatoric explosion?
@gabe8168
@gabe8168 2 жыл бұрын
There are many ways to get around generating all combos for the the entire map at once. You would have to be insane to do that. It's simple: only generate all possible combinations for 5 tiles at a time
@dennisrkb
@dennisrkb 2 жыл бұрын
@@gabe8168 Could you elaborate a bit more?
@danielyuan9862
@danielyuan9862 Жыл бұрын
@@dennisrkb One way to mitigate the explosion is to notice that in untouched squares (squares with no clues touching it), all combinations within those squares have the same probability, so you'll only have to consider touched squares. As a math person myself, I've also realized that if you add all the probabilities of there being a mine within all the squares touching a certain clue, it must sum to that clue. I'm not sure how much that helps, but there may be techniques to minimize that chance. One last thing: this probably never applies until near the end where the only squares left are those where you have to guess, so there would be no combinatorial explosion.
@Froggend
@Froggend 5 жыл бұрын
“The perfect AI” **AI immediately clicks on a bomb second turn**
@simonforsberg3757
@simonforsberg3757 5 жыл бұрын
Well yeah, because in that case there was no better option - mathematically speaking.
@level8473
@level8473 4 жыл бұрын
1st of all you're being sarcastic right? If you ain't then, imagine this there are 2 cups upside down inside 1 of those is a chocolate bar and the one who arranged it was your mom they are placed on the table, now your mom asked you to come to the living room and guess where the chocolate bar is, now you have 50% chance of getting the bar, now imagine that with 10000 cups that's minesweeper, and btw the first box you click is a guessing game.
@Rayzan1000
@Rayzan1000 4 жыл бұрын
@@simonforsberg3757 I get what you are trying to say, but what you are saying is simply not true; i.e. there was a better option. (Choosing your first box has nothing to do with math by the way. With no leads there is nothing to calculate) The word 'perfect' is really the wrong word to use here. It implies there is no room for error, i.e. if the AI was 'perfect' it should win 100% of the time. But a game of chance cannot be won 100% of the time, so there is no 'perfect AI'. It can still be a great AI though...
@simonforsberg3757
@simonforsberg3757 4 жыл бұрын
@@Rayzan1000 My definition of "Perfect Minesweeper AI" is simply: Make the best possible move with the information that you have. In which case, taking a bomb on the second move when the first field revealed was a 3 is perfectly acceptable. Choosing your first box has a lot of things to do with math, you have to think "What if it is *not* a mine?" in which case one could argue that picking a corner is the best move as that has a higher probability to be a '0' and create a bigger open field.
@mahmoudhossam6014
@mahmoudhossam6014 4 жыл бұрын
*Directed by Robert B.Weidy* 😂
@dandanthedandan7558
@dandanthedandan7558 6 жыл бұрын
3:43 No, you.
@kieranwalker2249
@kieranwalker2249 6 жыл бұрын
No he is right
@loopyzach7537
@loopyzach7537 6 жыл бұрын
*Reverse card*
@dandanthedandan7558
@dandanthedandan7558 6 жыл бұрын
Gabriel Barbosa He said "your mom gay" instead of "ur mom gay" so I'm following the trend.
@dandanthedandan7558
@dandanthedandan7558 6 жыл бұрын
*MIC DROP*
@Dee-mm1bt
@Dee-mm1bt 6 жыл бұрын
you mum gay
@AmaroqStarwind
@AmaroqStarwind 2 жыл бұрын
What if you _combined_ hard-coded rules *with* neural networks and genetic algorithms, not only so that it can never lose on increasingly large boards, but also play at an increasingly faster pace. So it wouldn't just be a perfect Minesweeper player, but a Minesweeper _speedrunner._ One useful technique to teach it would be "1.5-clicking" as well as some no-flags techniques. And maybe throw some raycasting in there just for the sake of over-engineering it~
@danielyuan9862
@danielyuan9862 Жыл бұрын
over-engineering sounds like the last thing Evan would ever do
@superfeel1275
@superfeel1275 Жыл бұрын
theres no way to get better than polynomial time anyways since its a NP complete problem. Best implementations (without any mistakes possibly occuring) is sub exponential at best.
@gecko2023
@gecko2023 4 жыл бұрын
Who’s talking to me through the washing machine
@tornadomash00
@tornadomash00 4 жыл бұрын
Dude someone is talking through a toaster
@andrehen8645
@andrehen8645 4 жыл бұрын
hahahahahha 🤣🤣🤣
@dnaxdevil7391
@dnaxdevil7391 4 жыл бұрын
Am I the only one who keeps on getting recommended old videos from him? Even when you think you binged them all somehow there is a new old one which you have never seen. ... Has Code Bullet hacked time???
@chucknorify17
@chucknorify17 4 жыл бұрын
He did that a few years ago ...or is it a few years from now? I can never keep things straight with time travel
@Speed001
@Speed001 3 жыл бұрын
Same
@magical_onion9854
@magical_onion9854 3 жыл бұрын
Since you liked the newer ones, you get the older and thus more irrelevant ones
@magical_onion9854
@magical_onion9854 3 жыл бұрын
And also, they are probably just not exactly fitting for you from the AI algorithm. It's a robot, ya can't blame it that much.
@vanilla_MC
@vanilla_MC 3 жыл бұрын
Meeting too, watched all of the new ones then these just pop up lol
@kujmous
@kujmous 6 жыл бұрын
I don't know that many people know this, but did you know that clicking the left and right mouse buttons at the same time has a unique action in Minesweeper? If you click on a number and that many mines are already flagged around it, all remaining unflagged squares are simultaneously clicked. This may speed up your AI a bit.
@Icetemplar
@Icetemplar 6 жыл бұрын
No one will care or believe me, but I genuinely believe my brother is faster then this AI and this being a big part of it. On the largest size with easiest settings from memory he used to average less then 8 seconds, with 3 seconds being his fastest. He used to play so much minesweeper, its actually ridiculous haha.
@ProTyle
@ProTyle 6 жыл бұрын
Trent 88 3 seconds??? You gotta show us one dude!
@MattMcConaha
@MattMcConaha 6 жыл бұрын
It's called chording, and the best minesweeper players strategically use this function only when it is quicker to do so, otherwise they just don't flag the mine at all and just click to reveal. Because the win condition is not to flag all mines, it is to reveal all non-mines. Also note that there's a trick you can do where you hold down the flag click and drag to the chording tile and then finish the chord click. It saves you almost no time, but since you don't have to let go of the right click and then click it down again, it is marginally faster for incredibly fast players. And for these fast players the only thing slowing them down is the speed that they can click and move the mouse, so it's totally worth it.
@QuadrapleTroll
@QuadrapleTroll 6 жыл бұрын
World record is 32 seconds on expert > www.minesweeper.info/wiki/World_Record_History , 8 seconds is likely impossible for any human being. Edit: unless of course you meant that its restarted game with known position of the mines, that might be doable..
@nitzbitz1
@nitzbitz1 6 жыл бұрын
"largest size with easiest settings" sounds like custom game size and mine count to me. If you do the max size and minimum bomb count you can win in 1 click if you're lucky. I don't think they really know what they're talking about when they say 3 seconds is the fastest. This AI still isn't very fast though, for an AI. It's easy to see how inefficient it is just by how much bounces back and forth between the right half and left half instead of sweeping across it, or even just staying on one side until it's done. This one is fast: kzbin.info/www/bejne/hX-ao5ZjoNR_nK8 but doesn't win 100%. It wins an expert game in 2 seconds, so watch that and imagine this dude's brother being able to click that fast lol (he runs it at "human speed" first and then speeds it up at like 1:15)
@ManiakPL22
@ManiakPL22 2 жыл бұрын
jeez, coming back to OG code bullet is a trip.
@thatoneginger
@thatoneginger 3 жыл бұрын
You should revisit this. Room for improvement include having the ai focus on one area at a time to reduce travel time and the utilizing the double click trick: if you left click and right click at the same time on a number that has all its bombs flagged it clears all remaining squares that are touching it.
@P1K3L
@P1K3L 5 жыл бұрын
I never even figured out how that game worked.
@slyfox4547
@slyfox4547 5 жыл бұрын
I still don't understand. Even after watching this video
@orxanmamedov2671
@orxanmamedov2671 5 жыл бұрын
If there is a 1 it means there is only one bomb around the piece. If there is 2 it means two bombs and so on
@Slurp_Nation
@Slurp_Nation 4 жыл бұрын
look it up on wiki it'll tell you all you need to know
@kacperzmuda6272
@kacperzmuda6272 4 жыл бұрын
+1
@goober8663
@goober8663 4 жыл бұрын
minesweeper, aside from the occasional 50/50 chances you have to take, is the easiest video game
@kenmendoza6932
@kenmendoza6932 6 жыл бұрын
*M A T H* and _PROBABILITY.._ made it very interesting to watch.
@brooked982
@brooked982 6 жыл бұрын
How do u do slanted words
@brooked982
@brooked982 6 жыл бұрын
'Hi'
@arkell7763
@arkell7763 6 жыл бұрын
Brooke D _I dunno_
@yellowstonenationalpark6082
@yellowstonenationalpark6082 6 жыл бұрын
_wow_
@yellowstonenationalpark6082
@yellowstonenationalpark6082 6 жыл бұрын
-dude-
@mrpokemon1186
@mrpokemon1186 4 жыл бұрын
"It's simple really" I knew it CeaveGaming is Code Bullet!
@kornsuwin
@kornsuwin 4 жыл бұрын
Devon Rogers yes
@axisred2301
@axisred2301 3 жыл бұрын
Hooray!
@link_team3855
@link_team3855 3 жыл бұрын
ITs actually, surprisingly simple... *goes on for a full video.*
@scepticusverisimillimenonm8450
@scepticusverisimillimenonm8450 4 жыл бұрын
I think your algorithm is not perfect since whenever it has to take a chance it should take into account the value of information of uncovering a square so that the risk is "worth it". E.g. in the first move all squares are valued equally but the center might have a higher value of information than a corner.
@francogiaretta9286
@francogiaretta9286 3 жыл бұрын
You are right, it seems to be much more challenging to build an alghorytm for that
@PaulBurg
@PaulBurg 3 жыл бұрын
A corner actually is more likely to have useful information, since there are only 3 neighbors which could have a bomb, meaning it if more likely to expand. Knowing how many bombs are around a single square isn't useful information, knowing how many bombs are around a grouping of squares is.
@PJOZeus
@PJOZeus 3 жыл бұрын
@@PaulBurg having less neighbours means a lower chance to expand, not a higher one - each square has the same probability to have a bomb at the very start, since it is not 100%, the more squares, the less chance there is that all of them (surrounding the original pick) are a bomb Although if the AI was truly perfect, it would take in the probability of a blind guess compared to a logical guess of squares which do not currently have a definitive answer
@erwinsmith5921
@erwinsmith5921 3 жыл бұрын
@@PJOZeus along with that, there is also the possibility of a 50/50 guess occurring
@ye_olde_troller
@ye_olde_troller 6 жыл бұрын
plot twist: the recordings shown are actually ones of him playing sped up
@quacc4748
@quacc4748 6 жыл бұрын
double plot twist: the recordings are him playing at his actual speed without any modification
@youtubeuniversity3638
@youtubeuniversity3638 6 жыл бұрын
Triple twist: It's slowed down footage of him playing subconsciously and he really believes it was his program doing it.
@smith6810
@smith6810 6 жыл бұрын
quadruple plot twist: This has been the case for all videos on this channel.
@Cinn07
@Cinn07 6 жыл бұрын
quintuple twist: all his videos are made up in your mind and your dreaming while watching the videos
@starcubey
@starcubey 6 жыл бұрын
Algorithms like these don't take a lot of processing time. The only reason it takes so long is because he deliberately set a mouse speed limit to make it easier to follow.
@kevnar
@kevnar 6 жыл бұрын
I once created a game called Gossip that was a cross between Clue and House Party. Five guys and five girls all hooked up with somebody at a party in five different rooms, but the morning after, nobody could remember who they were with. Like, Clue, everybody had one random bit of information about who somebody was not with. "Emma was not with Alex", or "Alice was not in the Closet". etc. The challenge was to fill in all the blanks based on interrogations of things everybody is sure didn't happen. If Emma was not with Alex, Billy, Chris, or Danny, then she must have been with Eddy. If Eddy was with Emma, then he was not with Alice, Beth, Cathy, or Dana. And so on. Process of elimination. So then I had to code the computer AI to try to beat you to the punch on their turn. Oh, man. It nearly broke my brain. But I got it done based on a few rules of inductive reasoning. Then, when I added a recursive function to loop back through the logic tree after every new bit of information was uncovered, I found the AIs were way smarter than any hungover college student could ever be. Some of them cracked the case with only six or seven clues. So then the problem was not how to get them to solve the problem, but to get them to believably fail sometimes so there could be a "Easy" difficulty. I never did release the game because of issues around alcohol and consent, but it was fun to build.
@bongsesh
@bongsesh 5 жыл бұрын
so many things wrong here.. like what made you think it would be difficult to be smarter than a hungover college student ?! and what did you put in their drinks to make them forget who they hooked up with ?! and most importantly... who the fuck tried to put alice in the closet?!?!?!
@morphman86
@morphman86 5 жыл бұрын
This is the challenge most AI devs have to deal with. Making the AI is challenging enough, but staging it in different tiers is the really challenging bit. How do you dumb an AI down? Well, that's different for each situation. And it is often far easier to make the "perfect" AI than to make a challengingly easy AI.
@reindeergames3467
@reindeergames3467 5 жыл бұрын
Orgy
@metawarp7446
@metawarp7446 5 жыл бұрын
Imo it's OK to a game/piece of enternainment be a little fucked up if it itself realizes it (and warns about it) and doesn't fantasise it. (In most cases the purpose would be comedic): For an example Monopoly pedo edition would be fine. (Adults only of course)
@nwa8169
@nwa8169 5 жыл бұрын
@@metawarp7446 makes sense.. but in the current politcal climate, context isn't ever taken into account
@yu-ger-bloob-highway3521
@yu-ger-bloob-highway3521 4 жыл бұрын
On my deployment I spent the majority of my free time playing it. I got really good at it. I found every time on the largest scale though, there is always a 50/50 click that determines your win or not, at least on the original.
@ThePrufessa
@ThePrufessa 4 жыл бұрын
Your code helped me out on the spots that cause me the most problems. I obviously can't do the probability solving your code can but you taught me how to treat two squares as one which is something I never considered before.
@skyfirevoid
@skyfirevoid 5 жыл бұрын
3:48 bottom left
@ramengandalf7064
@ramengandalf7064 5 жыл бұрын
Pokerxs it kinda looks like a face is that what your saying
@imthedarknight-8755
@imthedarknight-8755 5 жыл бұрын
Sonofwolf628 lol it says your mum gay
@Dragonofshame
@Dragonofshame 5 жыл бұрын
No u
@Nunyuhbusniz
@Nunyuhbusniz 5 жыл бұрын
Pokerxs no u
@skyfirevoid
@skyfirevoid 5 жыл бұрын
fuck you guys lmao
@edu4561
@edu4561 4 жыл бұрын
One day he will upload a video titled: "Creating Skynet"
@titusfortunus2916
@titusfortunus2916 6 ай бұрын
lmao that audio quality. I'm glad it's here for prosperity, and I'm glad his mic improved over the years.
@dorchcorporation7578
@dorchcorporation7578 6 ай бұрын
As someone who can't even solve a 10x8 grid, seeing an AI of all things solve a 64x36 grid makes me kinda contemplate life.
@syrenarch251
@syrenarch251 5 жыл бұрын
1980: I bet you there are going to be flying cars and a cure for Cancer! 2018: I created the perfect Minesweeper AI.
@torginus
@torginus 5 жыл бұрын
Speak for yourself, this video actually cured my cancer.
@imabird1566
@imabird1566 5 жыл бұрын
Ehh potato potahto.
@5ucode
@5ucode 5 жыл бұрын
In Canada, they have the cure but the government won’t release the cure because they’re afraid they won’t get any credit, do maybe if they release it then our population won’t be so low for our size, the population will grow at a better rate Atleast
@haydengillanders7997
@haydengillanders7997 5 жыл бұрын
2118: I bet that the earth was not dying!!
@noah-ns7lu
@noah-ns7lu 5 жыл бұрын
Im a disappointment
@JesusRodriguez-cg7qh
@JesusRodriguez-cg7qh 6 жыл бұрын
Me: The perfect minesweeper AI doesn't exis-. The Video:
@wolverdep4739
@wolverdep4739 6 жыл бұрын
Jesus Rodriguez no likes? let me help you :)
@gravity9450
@gravity9450 6 жыл бұрын
Me: There is no most unoriginal comme-.
@sanderlahuis5698
@sanderlahuis5698 6 жыл бұрын
Me: I regained my faith in humanit-. tHiS ComMEnT:
@dragonx8361
@dragonx8361 6 жыл бұрын
Me: Ah there will be Normal Commen- These Comments
@joshe9409
@joshe9409 6 жыл бұрын
Me: the perfect meme-killing comment doesn’t exis-
@jonahs92
@jonahs92 3 жыл бұрын
This has been sitting in my "Watch Later" playlist for TWO YEARS, ever since it came out! I'm so glad I finally watched it
@jasonllorente6818
@jasonllorente6818 4 жыл бұрын
How to beat Code Bullet’s AI: *Step 1:* Turn off the AI *Step 2:* Activate your AI. *Step 3:* Win.
@SpiritedSpy
@SpiritedSpy 5 жыл бұрын
i dont even know how to play minesweeper normally
@oppanaenaestyle4758
@oppanaenaestyle4758 5 жыл бұрын
Spirited Spy Basically the numbers mean how many bombs that square is touching. A bomb can be up, down, left, right, and diagonal. If there is no number there are no bombs around it.
@RedPandaGames75
@RedPandaGames75 5 жыл бұрын
don’t click the bombs
@petelee2477
@petelee2477 4 жыл бұрын
@@pewpewsalote8802 ok then what are the flags
@theworstmaid
@theworstmaid 4 жыл бұрын
@@petelee2477 they mark bombs, i think
@graywasp5750
@graywasp5750 4 жыл бұрын
Wait it can be more funny : *When you don’t even know how to play mind sweeper in the first place*
@doommustard8818
@doommustard8818 6 жыл бұрын
You can make a better AI: To make choices of equal risk: (like the first few moves) have it prioritize the move that will give it the *most information* about the rest of the board. I wrote an AI very similar to this one to solve the "Thrill Digger" minigame in Skyward's Sword, and increased it's win rate significantly by giving it this secondary priority. (It had the Third priority of picking the square that netted you the most points in situations where they were equally risky and equally informative; but moves aren't assigned point values in minesweeper)
@DanielCopelandMD
@DanielCopelandMD 5 жыл бұрын
I like this! But also I feel the programing should incentivize clicking on the nearest certain safe spot to speed up the process. There were several times in the video where the computer would go back and forth across the board/field to click on knowingly safe spots.
@doommustard8818
@doommustard8818 5 жыл бұрын
I'm talking about the situation where you get two places where you have two equally safe moves. Obviously if there are two places it knows are safe then it will eventually click both of them-- so it wouldn't matter. But lets say there are two (or more) places that each have a 20% chance of blowing up AND those are the spaces with the lowest chance of blowing up. It's better to pick the spot that gives us a higher chance of winning in the long run. We can both agree that emulating an entire game in this fractal manner would be incredibly slow, (unless you're on a super computer) but what we can do is choose the move that is most likely to reveal the highest number of safe spots, as one way of implementing this idea of "information". There are other ways to implement this but they take longer to explain. This matters the most during the 2nd through when it gets its momentum. As said in the video, once it gets its momentum it's good. The goal is to get momentum faster, so it spends less time in the dangerous state, where it has a very real chance of losing.
@doommustard8818
@doommustard8818 5 жыл бұрын
Sorry I like explaining things and get a little excited when I get to.
@DanielCopelandMD
@DanielCopelandMD 5 жыл бұрын
DoomMustard I get what you are saying and I agree with you. I was saying that in addition to that, having it clear out one section of absolutely safe spots before moving on would also speed it up. It spent most its time moving the mouse needlessly back and forth across the field.
@doommustard8818
@doommustard8818 5 жыл бұрын
Daniel Copeland: I realized that after I finished typing it, but I spent so much time typing it. Hense the "sorry" right after
@Baalor204
@Baalor204 4 жыл бұрын
I picture the Super Saiyan 3 transformation dialogue going on during the end "crushing." :) And this is to go even further beyond!
@CartmanBrah
@CartmanBrah 3 жыл бұрын
I would love to see how you get all these systems to interact with the game, awesome stuff!
@TheUKNutter
@TheUKNutter 6 жыл бұрын
You should have added more bombs.
@thedoge492
@thedoge492 6 жыл бұрын
every single square are bomn and left one space square so no one can win it
@muizzsiddique
@muizzsiddique 6 жыл бұрын
Tom Tang: Actually, that'd be a instant win. The first tile you click on is guaranteed not to be a mine, so if there was only one square that wasn't a mine you would've already clicked it.
@nexus1g
@nexus1g 6 жыл бұрын
Mu'izz Siddique, that's not true.
@muizzsiddique
@muizzsiddique 6 жыл бұрын
Load up Minesweeper on Windows (most people are ever only talking about the Windows XP/Vista/7 version, there's one on the Windows Store by Microsoft) and make a custom game of 10x10 field with 99 mines. Try it. Don't play shoddy ports made by first time developers who are still learning to code.
@nexus1g
@nexus1g 6 жыл бұрын
Mu'izz Siddique, maybe you're right on the newest version. In Windows 3.11/95 it was possible to hit a bomb on the first try.
@thespaceace8164
@thespaceace8164 6 жыл бұрын
Funny story. All the way into my teenage years, I didn't know how to play minesweeper; I didn't know what the numbers were for. I just thought it was a game where you randomly revealed squares and sometimes there were mines underneath. I hated it since I thought it was based on pure luck and was practically unwinnable... One day it hit me that I might have a few misconceptions about the game, and I was able to logic out how to actually play it.
@paulgoogol2652
@paulgoogol2652 5 жыл бұрын
somebody should make a film of your story.
@daniellebarker7205
@daniellebarker7205 5 жыл бұрын
Same, I thought it was the worst game ever, never really thought too much about it, it was just a free shitty game that came with Windows lol
@apollojustice5423
@apollojustice5423 5 жыл бұрын
0000 Huh,that's funny
@PhilippeLarcher
@PhilippeLarcher 5 жыл бұрын
Press f1
@Trowo
@Trowo 5 жыл бұрын
Same i hated it because it looked unbeatable but then i figured out.
@forgetfulfunctor6416
@forgetfulfunctor6416 2 жыл бұрын
I'd be curious to see what this AI looks like playing non-euclidean minesweeper or even just minesweeper on weird topologies; n-dimensional minesweeper algorithms would be cool too.
@korosensei4873
@korosensei4873 2 жыл бұрын
Hexagonal minesweeper?👀 Ngl that game is cool
@7own878
@7own878 3 жыл бұрын
Look: You need to tell the code how many bombs there are. Then you give every tile the worth: 1-(nbombs):(ntotalfields) That means when you are in a 50:50 situation the bot just skips that and goes to another tile so it has the chance to uncover maximum space.
@slimpwarrior
@slimpwarrior 6 жыл бұрын
But can you use it on Minesweeper.io to wreck some noobs? :D
@NoorquackerInd
@NoorquackerInd 6 жыл бұрын
Holy frick, that would be overpowered. But, then, there would be Gohan on there to save us all...
@PauloDDD2
@PauloDDD2 6 жыл бұрын
DO IT, Code Bullet! Now we are talking!!
@dandanthedandan7558
@dandanthedandan7558 6 жыл бұрын
YUSSSSSSSSS
@ASalazarMX
@ASalazarMX 6 жыл бұрын
IIRC they rate-limit uncovered squares to deter bots, though.
@Annile12
@Annile12 6 жыл бұрын
This AI is definitely effective, but sounds pretty inefficient. On a grid as big as that one, it may not be able to keep up. I know from experience that you can (or at least used to be able to; people might be better now) pretty consistently get first place by just using the first logical rule mentioned here, though.
@OddZodd
@OddZodd 6 жыл бұрын
4:48 for the skip
@CodeBullet
@CodeBullet 6 жыл бұрын
thanks
@ov3rd0s3dgaming6
@ov3rd0s3dgaming6 5 жыл бұрын
Whats the song thats playing at 4:48 ?
@ShizaanSil
@ShizaanSil 3 жыл бұрын
Its just crazy to see how far your channel has come in 3 years
@imbadgamer9182
@imbadgamer9182 2 жыл бұрын
he's come a ling way with his animations
@Baekstrom
@Baekstrom 6 жыл бұрын
Maybe it can get better, if by better you mean "completing more games per hour". You can probably optimize and make it faster, but in terms of changing the logic, you could look at situations where it at some point HAS to take a chance, like if there is an island that can't be completed unless you pick a square with less than a 100% chance of not being a bomb. In that case you would be better off taking the chance right away and fail fast if you have to fail at all, rather than putting it off until the last moment.
@Starwort
@Starwort 6 жыл бұрын
well actually it could end in a situation where there are more/fewer bombs on the board and therefore the chance changes - if it waits longer it has the best idea
@AndrewKay
@AndrewKay 6 жыл бұрын
There are such cases where you already know how many bombs are in the island, so the rest of the board truly can't give you any more information.
@descai10
@descai10 6 жыл бұрын
This is likely slowed down so it's visible for us to see. The computer probably can complete it in milliseconds.
@ianbentryn8306
@ianbentryn8306 6 жыл бұрын
(From a former addict.) It is a simple matter to play perfectly logically, so the game really is about racing the clock. The trouble, when it arises, is in clearing out the last of areas, when you can arrive finally at 50/50 gambles. So the most efficient play is always to try to finish areas completely so that if you are going to lose on a forced gamble, you find that out before wasting time doing the rest of the board. This flaw in the game is why I kicked the habit - as opposed to rewarding the player for getting better, the game ultimately punishes you. It always bothered me that it would have been a simple matter for the game to be programmed to check after the random mine placement, and scrub matches that could only be won by chance.
@joshuacook2
@joshuacook2 6 жыл бұрын
For probabilistic minesweeper complexity, see: arxiv.org/abs/1204.4659 The short of it: it's extremely hard, harder than solving np problems or simulating quantum computers. Widely believed to be impossible to do perfectly, but perhaps it could be approximated closely.
@Nickgowans
@Nickgowans 5 жыл бұрын
You should make it check the squares closest to the cursor at any given time that way it would reduce the time taken
@noah-ns7lu
@noah-ns7lu 5 жыл бұрын
Im a disappointment
@AnaseSkyrider
@AnaseSkyrider 5 жыл бұрын
It should avoid clicking any box unless it has a 0% chance of being a bomb. Clear an area, no 0%s, move onto a different area. Odds are, it'll attack that area at a different angle, or eventually work its way back to that area and clear some tiles that adjust the initial probabilities. Best of both worlds.
@Lysergic_
@Lysergic_ 5 жыл бұрын
@@AnaseSkyrider it would never get past the first few clicks if that was implemented
@jetison333
@jetison333 4 жыл бұрын
@@AnaseSkyrider It already does that
@Andrew-gm6cl
@Andrew-gm6cl 4 жыл бұрын
ENXJ then just click the square with the lowest possibility of a bomb if not zero
@ArnabAnimeshDas
@ArnabAnimeshDas 3 жыл бұрын
The numbers looked so nice. I always thought that how many big numbers you can get. Kind of like a lottery.
@Blunderful19
@Blunderful19 4 жыл бұрын
Just caught onto your channel and I wasn't sure if I was going to sub until I saw the I Love You scramble in the matrix code. Best wishes from a fellow sappy nerd.
@tomanyknifes5874
@tomanyknifes5874 6 жыл бұрын
pause at 3:44 and look towards the bottom left of the screen
@rapid_meme_god
@rapid_meme_god 6 жыл бұрын
MushyCrabs no u
@rapid_meme_god
@rapid_meme_god 6 жыл бұрын
No u
@launched_
@launched_ 6 жыл бұрын
ToMany Knifes Yes, because we can't see it witout pausing.
@TheSaNdMaN5000
@TheSaNdMaN5000 6 жыл бұрын
No u.
@Shield-ul9tx
@Shield-ul9tx 6 жыл бұрын
Look at the righr side
@LocatingGoku
@LocatingGoku 6 жыл бұрын
Well it's not AI then, it's an algorihm.
@MalchiorDhar
@MalchiorDhar 6 жыл бұрын
LocatingGoku That’s your opinion.
@LDMco
@LDMco 6 жыл бұрын
Vulcan not even an opinion lmao, that's fact
@MalchiorDhar
@MalchiorDhar 6 жыл бұрын
If that isn't an ai, then what exactly are enemies in video games? They don't learn and get better...so if those aren't ai, when what are they?
@recklessroges
@recklessroges 6 жыл бұрын
A.I. Stands for Artificial intelligence. The term was specifically created to help search for "a computer program that was more than just an algorithm or list of instructions." So LocatingGoku is correct.
@captainLoknar
@captainLoknar 6 жыл бұрын
and it's not perfect still a more accurate title than Trump tweets tho
@heddevh
@heddevh 3 жыл бұрын
Epic. That probability approach 👌🏻
@saber1epee0
@saber1epee0 4 жыл бұрын
Big note: sometimes it's better to randomguess than to make one of those tough calls. So you have to factor in the # of bombs remaining
@detailingshed8130
@detailingshed8130 4 жыл бұрын
if you're going to factor in the number of bombs remaining then it's not a random guess. Also, random guessing will never give you better odds than using any information at hand effectively to figure out what is correct. The only thing random guessing will beat is bad logic.
@richardbraakman7469
@richardbraakman7469 4 жыл бұрын
With randomguess he means clicking on a square that's not neighbouring any square you've uncovered, so you have no information about it besides a general sense of bomb density. It can often be safer than one of those 50/50 guesses.
@quantumsoul3495
@quantumsoul3495 4 жыл бұрын
Code Bullet: Here's my perfect AI Also Code Bullet : *Gives an hardcoded solver*
@matteoar
@matteoar 4 жыл бұрын
this comment is underappreciated.
@quantumsoul3495
@quantumsoul3495 4 жыл бұрын
@@matteoar ikr
@sea81793
@sea81793 4 жыл бұрын
But it is an AI.
@matteoar
@matteoar 4 жыл бұрын
​@@sea81793 Well, no. An AI would learn by itself how to do this, the ability to autonomously learn from data and improve without having to change its program code defines an Artificial Intelligence after all, while he wrote every possibility and the best way to solve it. It's, as said, an hardcoded solver, a really good one at that, but it does not define as AI.
@sea81793
@sea81793 4 жыл бұрын
Matteo A. I understand what you’re getting at, but your point is a product of “machine learning”. Machine learning is a form of Artificial Intelligence. It is capable of learning on its own(within parameters). Code’s minesweeper program is also a form of Artificial Intelligence. While it may not be self-learning...it is still able to achieve its goal through the knowledge it has been provided. medium.com/axiomzenteam/what-most-people-dont-understand-about-ai-and-the-the-state-of-machine-learning-ed007a987108
@dxnny162
@dxnny162 6 жыл бұрын
4:47 is when it starts.
@bananabus4208
@bananabus4208 6 жыл бұрын
Daniel Gonzalez thanks bro
@L0j1k
@L0j1k 6 жыл бұрын
Thanks bro.
@itzm1c155
@itzm1c155 6 жыл бұрын
u r lifesaver.
@onlyme8780
@onlyme8780 6 жыл бұрын
Thank You!!! When I saw skip to ??? I knew my savoir would be in the comments
@madcalicoa1204
@madcalicoa1204 6 жыл бұрын
0:00 is when it starts if you have an attention span longer than a gold fish's
@hinteregions
@hinteregions 3 жыл бұрын
Memories XD It's great little game, and this video was fun, and a great achievement!
@johnweber4504
@johnweber4504 3 жыл бұрын
The only way to make it better would be to figure out how the computer generates the field and use what has been solved to solve the random chance bits
@jordray5823
@jordray5823 5 жыл бұрын
3:45 no u
@leonardgolub7660
@leonardgolub7660 5 жыл бұрын
4:10 non youoy
@ZeZestyX
@ZeZestyX 5 жыл бұрын
Uno reverse
@oscailly
@oscailly 5 жыл бұрын
ReeeeeeeeeeeeeeEEEEEEEEE
@Nugcon
@Nugcon 5 жыл бұрын
rekt
@MathAndCarnage
@MathAndCarnage 6 жыл бұрын
Hey Code Bullet, I'd like to hear more about how you calculated the bomb arrangements for the probabilities. I made a Minesweeper AI myself a little while ago (no video, just a personal project) and I found that part to be extremely difficult, especially considering that the number of arrangements can reach into the hundreds of thousands even on a normal expert level board. I'm curious if our methods of solving that problem are similar since the math can get kinda tricky.
@timothyhilditch
@timothyhilditch 6 жыл бұрын
Same I'm writing and report on it. Also what version he is using? Here is a presentation explaining what MathAndCarnage is talking about. It is written by the guy who proved it is impossible to find the perfect algorithm. web.mat.bham.ac.uk/R.W.Kaye/minesw/ASE2003.pdf
@57thorns
@57thorns 6 жыл бұрын
My suggestion would be that all squares with no information about them are equal. So if you have a 1 as first you know there is a 1/8 chance for those, and the rest have (m-1)/(x*y-9). m i mines, x,y are the size of the field. if m is sufficiently high, this is more than 1/8 and we can pick any of the adjacent squares. But, the tricky part here is this: Does it matter if we pick a corner or a side? --- And what about the first move, should that be a corner, a side or in the middle of the field? They all have the same probability for a mine, but if they do not, what are the odds we gain useful information? And I have a suspicion this solver does not take those things into account, and thus I have proven that it is possible to create a better solver for mine sweeper. One standard size in timing for the minesweepers world records is 16x30 with 99 mines. This means the base odds for a mine is about 1/5. For a central position, there is a 1/5 risk of a mine at each of the nine positions, however, strictly speeking they are _not_ independent. If there is a mine on the top left, there is a 98/480 chance for one in the next, if not, the chance is 99/480. But if we ignore these small changes (thus making our solver worse) there is a 13% chance to get a 0 (which automatically expands, or we can expand with no further thinking). For a corner, there are only 4 squares to consider, so the odds of getting a 0 is about 40%. Of course, a 1 means the surrounding spaces has 1/3 of having a mine, sp we are much worse off in that case.
@vis9487
@vis9487 6 жыл бұрын
What are you guys coding it with? C++/Js?
@timothyhilditch
@timothyhilditch 6 жыл бұрын
I'm coding in Java using Javafx. Also @57thorns first click does matter check out this www.minesweeper.info/wiki/Strategy#First_Click
@Stephan-wf1ec
@Stephan-wf1ec 6 жыл бұрын
Yeah I know that code and math on a screen may not be the most mesmerizing visual but it is certainly fascinating stuff and I was very disappointed when the video just kinda skimmed over what I thought would be the interesting stuff. Also would be kinda neat if it could be optimized to win as many games as possible as fast as possible by taking into account how much information is revealed with each click. Sometimes taking a risk just doesn't tell you anything about an area making even a low bomb probability a bad choice over a slightly higher risk but much more informative choice.
@jakobvanklinken
@jakobvanklinken 2 жыл бұрын
The idea of doing it through probability is actually genius
@ChrisRobinson-hl5sz
@ChrisRobinson-hl5sz 3 жыл бұрын
This reminds me of the cinebench benchmark when it's rendering
@koosnaamloos4291
@koosnaamloos4291 6 жыл бұрын
1:25 Skip to ??? ?
@jamesminor8805
@jamesminor8805 6 жыл бұрын
yes. obey the rules
@koosnaamloos4291
@koosnaamloos4291 6 жыл бұрын
xxZ0MB1E Ended up tearing space-time fabric, sewing it back together right now
@jamesminor8805
@jamesminor8805 6 жыл бұрын
crap
@Cinn07
@Cinn07 6 жыл бұрын
He probably meant to fill that in in editing
@Mystery_Biscuits
@Mystery_Biscuits 6 жыл бұрын
Koos Naamloos 4:47
@wilsonliang3044
@wilsonliang3044 6 жыл бұрын
It’s 3:00 am. Who needs sleep when I can listen to that soothing voice.
@justiceforjoggers2897
@justiceforjoggers2897 6 жыл бұрын
2 am here, I agree
@valtrialastname2712
@valtrialastname2712 6 жыл бұрын
Cola BotelsOVA 3:11, I’m closer
@btat16
@btat16 6 жыл бұрын
Wilson Liang Funny thing is, it’s 3:00 over here as I’m writing this
@fUtal1mistake
@fUtal1mistake 3 жыл бұрын
Pretty sure you can optimize time if you do depth-first instead of breadth-first, because large areas can be opened when going a bit deeper locally. Love your videos!
@deleteduser2468
@deleteduser2468 3 жыл бұрын
You earned my like the moment you included, Perfection.
@herohuntr
@herohuntr 5 жыл бұрын
Honestly I didn't know you could flag bombs in minesweeper so this video happens to be very educational for me.
@alexwang982
@alexwang982 5 жыл бұрын
Geez did you just mark the bombs?
@herohuntr
@herohuntr 5 жыл бұрын
Pi no i just tried to remember where they were located
@hudnoraa1264
@hudnoraa1264 5 жыл бұрын
@@herohuntr same i never knew you could flag them, i just click and avoid bombs haha
@epicawsomeguy208
@epicawsomeguy208 4 жыл бұрын
Hero Huntr I’m not the only one.
@jeffandmark5373
@jeffandmark5373 4 жыл бұрын
if u use linux like i do, then [sudo apt-get install xbomb] installs minesweeper
@Jennifer-ri9nc
@Jennifer-ri9nc 6 жыл бұрын
it's really really good but it's not perfect. the first move shouldn't be completely random, even though all the squares have the same probability of containing a bomb. The corner for example would be a bad move, because in the case that it isnt a bomb, you wouldn't gain as much information about other squares. I imagine that similar but more complicated decisions issues would exist once the game is in progress where multiple squares both have equal probability of being a bomb, but one would give you more information, and therefore give you a higher probability of winning the game. it's really good though.
@thomasritter2183
@thomasritter2183 6 жыл бұрын
Underrated comment! I like your way of thinking :)
@Jennifer-ri9nc
@Jennifer-ri9nc 6 жыл бұрын
Thomas Ritter Thanks, Thomas!
@Trixbeat
@Trixbeat 6 жыл бұрын
Actually I always start with the corner in minesweeper. You have a much higher chance of opening a patch with useful information as opposed to a single number which doesn't tell you anything.
@thomasritter2183
@thomasritter2183 6 жыл бұрын
That's an interesting point! Is there any data about that or are you judging from experience?
@maxfamilant246
@maxfamilant246 6 жыл бұрын
how many games of minesweeper does it take for experience to become data?...the first square you click will never be a bomb, so starting the game on a corner both ensures there is no bomb there, and solves one of the corner squares which has a high chance of a 50/50 choice since there are at most 3 squares providing clues about its status...that being said, you will not likely be able to solve the whole board without having to make subsequent guesses elsewhere, hopefully opening a patch to end the guess work for a moment
@EmoFox9
@EmoFox9 3 жыл бұрын
This is the video i needed to learn how to play minesweeper
@TheEmeraldMenOfficial
@TheEmeraldMenOfficial 3 жыл бұрын
This video actually helped me get better at Minesweeper by following some of the rules
@circli
@circli 6 жыл бұрын
Maybe a revised version might help soldiers in the field... Or not...
@arielsproul8811
@arielsproul8811 6 жыл бұрын
the minesweeper game needs to know where the bombs are, a critical bit of information not available in the war zone
@satibel
@satibel 6 жыл бұрын
If you can find the solution in polynomial time, it might. (Well, and you'd be filthy rich.) Because Minesweeper is NP complete. sed.free.fr/complex/mines.html
@NikkiTheViolist
@NikkiTheViolist 6 жыл бұрын
What? You mean in actual war zones, the dirt you're standing on doesn't tell you how many mines are around you?
@TheRealDrWho
@TheRealDrWho 6 жыл бұрын
At 5:35 to 5:45 it leaves a big line at the bottom, which it later solves. What is the reasoning behind this? Is it just always doing rule one until no more rule one is possible and so rule 2 and eventually rule 3???
@Kasamori
@Kasamori 6 жыл бұрын
xchiltonx Those lines have no tiles with a 0% chance of not being a bomb. I just realised that my last sentence is kind of triple negative.
@tomburris8380
@tomburris8380 6 жыл бұрын
Would've been a bit more interesting if for the larger maps there were more bombs, good video!
@faladu9991
@faladu9991 3 жыл бұрын
you could improve solving time by having the ai chose the tile closer to its cursor if multiple tiles have the same 0% chance of being a bomb (maybe by making your evaluation algorythm starting to calculate the probabilities around the just clicked tile) currently it often clicks a tile then moves somewhere far away then come back for the next move. And afaik the winning method is to be the fastest so that does seem like a bad behaviour for a "perfect" ai.
@joanwinter6525
@joanwinter6525 3 жыл бұрын
I have been looking for this.
@theannilators7479
@theannilators7479 6 жыл бұрын
Making a perfect ai is easy Just make it so it can see all of the mines
@nabayanchaudhury7323
@nabayanchaudhury7323 6 жыл бұрын
That would technically be cheating because you would have to modify the game files to remove the tile filter over squares, something that could be done.
@theannilators7479
@theannilators7479 6 жыл бұрын
Never said the AI couldn’t cheat
@mr.wolf1216
@mr.wolf1216 6 жыл бұрын
fair point
@Tristoo
@Tristoo 5 жыл бұрын
Title should be "I created a minesweeper algorithm."
@TheHuesSciTech
@TheHuesSciTech 4 жыл бұрын
Textbook definition from wikipedia: "Leading AI textbooks define the field as the study of "intelligent agents": any device that perceives its environment and takes actions that maximize its chance of successfully achieving its goals." The agent in this video certainly qualifies. Also, every talk I've gone to about machine learning has clearly made this point: the modern self-learning neural stuff is called "machine learning", the term "artificial intelligence" is a much broader concept that includes hard-coded algorithms. That should be enough, but I'll also point out that in most computer games where you playing against "an AI" or "the AI", as is very commonly said, those AIs are almost always hard-coded. Very few computer games having neural-net-based AIs. So as much as you might want to argue that Code Bullet's bot is not AI, you're at odds with the definition used across most academic literature as well as common vernacular, which is about as close to being "wrong" as possible.
@aaronpriestley1500
@aaronpriestley1500 2 жыл бұрын
really cool, I would get a screenshot and add a transparent box around each number darker depending on the risk and base my guesses on the grey scale.
@Max25598
@Max25598 4 жыл бұрын
Thanks for the good explanation!
@keltonmckee8348
@keltonmckee8348 6 жыл бұрын
4:47 is where it begins
@keltonmckee8348
@keltonmckee8348 6 жыл бұрын
np
@TheRealOwen1230
@TheRealOwen1230 5 жыл бұрын
No it begins at 0:00
@Youmu_Konpaku_
@Youmu_Konpaku_ 5 жыл бұрын
It begins at 7:46 my friends
@S1lv3r1
@S1lv3r1 5 жыл бұрын
No. I want to see the programming. I am a proud nerd.
@jennifermccarthy2415
@jennifermccarthy2415 5 жыл бұрын
thx m8
@Furiousd
@Furiousd 6 жыл бұрын
Sometines Minesweeper generates maps which just can't be solved with all of these rules. So your AI would just rely solely on probability. I'd recommend adding another rule: If we solved everything that we were 100% sure in and now we're left with space which can't be solved with our rules => calculate where the bombs that are left have to be. We got the exact number of bombs left and the "unsolvable" space. Yea, in some cases even this wouldn't work, but solvability percentage will rise and the AI will be even more PERFECT. P.S. well... it would be kinda hard to implement this I guess...
@DatDeadMemer
@DatDeadMemer Жыл бұрын
0:38 dang cell not only stole piccolos regeneration, but his minesweeper app as well
@wyattbrown4368
@wyattbrown4368 3 жыл бұрын
This helped me pass out thank you 🙏
AI Learns to Play SUIKA GAME
13:46
Code Bullet
Рет қаралды 3,4 МЛН
Cute Barbie Gadget 🥰 #gadgets
01:00
FLIP FLOP Hacks
Рет қаралды 46 МЛН
В ДЕТСТВЕ СТРОИШЬ ДОМ ПОД СТОЛОМ
00:17
SIDELNIKOVVV
Рет қаралды 3,9 МЛН
1 класс vs 11 класс  (игрушка)
00:30
БЕРТ
Рет қаралды 3,4 МЛН
Minesweeper Opening Strategy: The Classical
11:51
Mine Buoy
Рет қаралды 241 М.
A.I. Solves a 55 x 55 x 55 Rubik's Cube
16:00
Code Bullet
Рет қаралды 16 МЛН
A.I. Learns to DRIVE
16:17
Code Bullet
Рет қаралды 6 МЛН
BREAKING Storm The House with an AUTO CLICKER
11:24
Code Bullet
Рет қаралды 13 МЛН
AUTOCLICKER vs The HUMAN BENCHMARK TEST (Typing Test)
4:13
Code Bullets Day Off
Рет қаралды 467 М.
Making a Calculator using ONLY MARBLES
11:46
Code Bullet
Рет қаралды 2,7 МЛН
The rarest move in chess
17:01
Paralogical
Рет қаралды 840 М.
I programmed an A.I. to DESTROY the game PONG
11:16
Code Bullet
Рет қаралды 2,9 МЛН
Evolving Genetic Neural Network Optimizes Poly Bridge Problems
9:59
Building an Enigma Machine
12:10
Code Bullet
Рет қаралды 4,2 МЛН
Cute Barbie Gadget 🥰 #gadgets
01:00
FLIP FLOP Hacks
Рет қаралды 46 МЛН