AI learns to play pool

  Рет қаралды 2,657,435

Code Bullet

Code Bullet

Күн бұрын

Using the genetic algorithm I train an AI to play pool.
Source code is up
github.com/Code-Bullet/Pool_AI

Пікірлер: 2 000
@CodeBullet
@CodeBullet 6 жыл бұрын
Source code for this is up so check it out github.com/Code-Bullet/Pool_AI
@JamesHBall
@JamesHBall 6 жыл бұрын
Hey, could you make a tutorial series on how to make these sort of AIs? We all find them so interesting and I'm sure there's others that want to see a tutorial!
@svens3722
@svens3722 6 жыл бұрын
which language is this
@gokuladethyat1466
@gokuladethyat1466 6 жыл бұрын
please make an tutorial how to make an AI
@PaintedPapaya
@PaintedPapaya 6 жыл бұрын
I would love to see an AI that actually reacts to the situation. Instead of just selecting the best from random attempts you could use each of the ball's coordinates as inputs to a neural network with 2 outputs representing angle and power. You wouldn't have to train the shots one by one and the resulting network could actually play games against opponents which would be super interesting.
@manuelmcclain8060
@manuelmcclain8060 6 жыл бұрын
whats the name of the second song you used
@Skibbi198
@Skibbi198 5 жыл бұрын
Wow these old CB videos are strange.
@wgoddard1988
@wgoddard1988 5 жыл бұрын
Duke Skibbington can’t believe he went from this to his own animated character in what, less than a year.
@IanMustafa
@IanMustafa 5 жыл бұрын
@@a_andrade6939 Evan is AI confirmed
@bookbeard9792
@bookbeard9792 5 жыл бұрын
*sniff* They grow up so fast.
@yinyang1217
@yinyang1217 5 жыл бұрын
Yea
@dasin6
@dasin6 5 жыл бұрын
really CB is a sentient AI trying to make more sentient AI by informing humans on how to make AI that CB then can train into sentient AI
@alexxans1154
@alexxans1154 5 жыл бұрын
There is a simple reason ai will never become a professional pool player. It doesn't put the powder on the end of the stick
@jacobr7729
@jacobr7729 5 жыл бұрын
alex xans he needs more gunpowder
@TheThunderwesel
@TheThunderwesel 5 жыл бұрын
It's also isn't taking into account the affects on the next shot. It's just hitting the best shot it can from it's current state. A pro player will be moving the cue ball into positions to make his later shots easier.
@jerri1918
@jerri1918 5 жыл бұрын
@@TheThunderwesel nah, its definitely just the lack of powder that's limiting its abilities
@ryanolsen294
@ryanolsen294 5 жыл бұрын
Jacob R lol that’s funny
@madmedalx1048
@madmedalx1048 5 жыл бұрын
But it’s chalk...
@darrenzou2483
@darrenzou2483 4 жыл бұрын
Black ball literally 1mm from going into the hole. White Ball: I have decided that i want to die
@donoui1989
@donoui1989 4 жыл бұрын
its called cue ball lol
@georgedeane2564
@georgedeane2564 4 жыл бұрын
@@donoui1989 ok boomer
@eggmeister6641
@eggmeister6641 4 жыл бұрын
@DeShawn ok boomer
@eggmeister6641
@eggmeister6641 4 жыл бұрын
@DeShawn Ah yes. Gen D. My favorite gen.
@yto6095
@yto6095 4 жыл бұрын
it's called cum ball
@ColinFox
@ColinFox 3 жыл бұрын
Man, the friction on that table is incredible. It's like there's a centimeter of water on it or something.
@ZedF86
@ZedF86 3 жыл бұрын
Fun fact, this pool game was designed with a foam pad instead of slate.
@AidenC2718
@AidenC2718 2 жыл бұрын
It’s called ‘pool’ for a reason.
@slapdagger5693
@slapdagger5693 2 жыл бұрын
@@AidenC2718 Badum tss
@Enthralpy
@Enthralpy 5 жыл бұрын
"FINISH HIM" _suicides_ I'm dead lmfao 😂
@HighbrowDirector
@HighbrowDirector 4 жыл бұрын
Maybe Cortana listened the finish command and killed the AI
@zperk13
@zperk13 3 жыл бұрын
so was the ai
@rosetheblackcat
@rosetheblackcat 5 жыл бұрын
Genetic algorithms be like: I looked at 200 different possible outcomes In how many do we win? One
@grinreaperoftrolls7528
@grinreaperoftrolls7528 5 жыл бұрын
Is this the one where we win? If I tell you, it won’t happen .
@Maxgamer-fd7hv
@Maxgamer-fd7hv 4 жыл бұрын
noice
@marekpiirikivi9877
@marekpiirikivi9877 4 жыл бұрын
That's more or less how self driving vehicles work. :)
@ShitpostHeaven
@ShitpostHeaven 4 жыл бұрын
Cody Barkman except in the endgame he looks through like 16 million possibilities
@yto6095
@yto6095 4 жыл бұрын
@@ShitpostHeaven 14000605
@Rathclav
@Rathclav 2 жыл бұрын
It would be fascinating to see a retake of this from your modern perspective, with a few extra integers of consideration for the generational AI. Maybe sunk balls are worth 3 each, any balls in a line with the white ball and a hole are worth 2 but only one can trigger this bonus score, and any balls in front of a hole is woth 1 each? A fascinating proposition. I bet with those extra incentives, the AI would quickly add multi shots as a priority.
@BowenAV
@BowenAV 3 жыл бұрын
Meet CB when he wasn't constantly yelling for 10 minutes
@Inversine
@Inversine 3 жыл бұрын
i honestly kinda like this better, he isn't trying so hard to be funny
@illosovic
@illosovic 3 жыл бұрын
@@Inversine omg exactly, its so try- hard and comes of as fake and just trying to be quirky
@fangier0
@fangier0 Жыл бұрын
@@illosovic Also he doesn't swear
@alishakatiyar4066
@alishakatiyar4066 4 жыл бұрын
I can feel the AAAAAAAHHHHHHHH! SOUND at Last of the video 😂😂
@simplydolci8562
@simplydolci8562 5 жыл бұрын
Plot twist: This video is actually called "Will the pool ball hit the corner?
@geekjosh4u
@geekjosh4u 6 жыл бұрын
Gradual Growth Genetic Algorithm. GGGA
@Lyrakrosis
@Lyrakrosis 4 жыл бұрын
Good Game, Generated Ai (Kappa)
@muggzzzzz
@muggzzzzz 4 жыл бұрын
Gorgeously Good Gradual Growth Genetic Game GGGGG :D
@mrexists5400
@mrexists5400 6 жыл бұрын
the fail at the end XD i think it took the "black ball is last" too literally XD
@kinouura5276
@kinouura5276 5 жыл бұрын
Could you possibly remake this video? I enjoy the way you talk through stuff and explain things. This just isn't the same. Idk if you see these hopefully you do.
@Anonymous-vh6kp
@Anonymous-vh6kp 5 жыл бұрын
Kino Uura Yeah I skipped through to find the voice, didn’t bother watching.
@x0dogx
@x0dogx 5 жыл бұрын
I watched it because I though it was cool. And I agree that he should remake this with voice over it, or just revisit it again
@TheAlphaTeamPlays
@TheAlphaTeamPlays 4 жыл бұрын
And if he does it again, he should add an actual pool stick (idk what it’s called) and animate it
@Qu4RkCraft
@Qu4RkCraft 4 жыл бұрын
He should do a remake with q learning
@user-rv9vk8by5i
@user-rv9vk8by5i 4 жыл бұрын
And set it up so that it's 2 player, AI vs AI Not only would he have to finally animate the stripes, it'd give him a valid reason to redo the video
@LordDecapo
@LordDecapo 6 жыл бұрын
Only thing that messes with me about this. Is that it looks to be chasing not just a perfect game, but the same perfect game. Have you thought about taking two of these systems and alternatating which one shoots each time one misses? Similar to real pool. This would be similar to a GAN... and may be able to give you training for a more diverse set of ball positions.
@jetison333
@jetison333 6 жыл бұрын
LordDecapo that's the way the algorithm works, it finds one perfect game. It doesn't do any analyzing of the game board, it's just a series of shots to make a good game.
@LordDecapo
@LordDecapo 6 жыл бұрын
jetison333 I get that yes. This is a static function optimization system. I was referring to future work by him. Like a next step of this. Because personally, that would be an awesome next version. A pair of pool playing ML systems that have some random nature to them to make each game unique. So they have to learn the game, rather then a single function.
@jetison333
@jetison333 6 жыл бұрын
LordDecapo ah okay
@joephillips6634
@joephillips6634 6 жыл бұрын
The shot should have a small amount of error built in so it's not the exact same game every time
@LordDecapo
@LordDecapo 6 жыл бұрын
Joe Phillips agreed. That would be enough to make it a much more robust bot
@budzik775
@budzik775 4 жыл бұрын
i didn't realise how old this was at first and i was like "wait hang on a sec why is there just a wall of text where is his sweet voice" Dang
@KimiiiRaikkonen
@KimiiiRaikkonen 4 жыл бұрын
Same ! Did not realize at first I was watching an older video :D
@genmasaotome3503
@genmasaotome3503 Жыл бұрын
The best part of code bullet videos is the commentary
@stephennewcomb4277
@stephennewcomb4277 5 жыл бұрын
Your code is good and all but lets be honest I came to hear you talk about your code your struggle your cockiness the celebration just to be torn down and then rebuilt again with more and more confidence. Your videos are just like the struggles of life and inspire me to keep pushing forward making changes and even when it is bad I know I'm constantly getting better just like your code.
@PieMoe
@PieMoe 5 жыл бұрын
This went from agonizing to satisfying really quickly
@x0dogx
@x0dogx 5 жыл бұрын
I’ve just recently found you and I’m loving both your old and new videos. Keep up the amazing work!
@videogrillo
@videogrillo 6 жыл бұрын
Among all I wanna congratulate you for your video edition and explanation: super clear and precise yet not overdetailed
@panbeing
@panbeing 6 жыл бұрын
this channel is easily the most entertaining one
@jacobtylor8390
@jacobtylor8390 4 жыл бұрын
Love your vids code bullet! Your hard work deserves more recognition keep it up :D
@daemonburns-waight2421
@daemonburns-waight2421 5 жыл бұрын
Math is pretty. Love the stuff CB, new vids with commentary are awesome too. Keep up the good work!
@hollowstarfire
@hollowstarfire 4 жыл бұрын
Could you try this again? Like, another video? I’d like to see how this might be done in Q learning. Like the driving video, have each ball in in the right order=points
@GG-pv9cn
@GG-pv9cn 4 жыл бұрын
The problem with Q-learning is that the number of states gets out of hand very quickly. Q-learning starts to become impossible rather quickly in any situation more complex than tic-tac-toe. To illustrate how Q-learning would not work in pool... Imagine: in any valid state, there are anywhere between 2 (cue + 8 ball) and 16 (cue + 8 ball + 7 solid + 7 striped) balls on the table. For every combination of ball numbers, each ball can be anywhere on the table, with the exception that they can't overlap (I'll ignore this for now but we'll soon see that it doesn't even matter). What table dimensions are necessary to capture a small enough change in position to be relevant? Real pool table dimensions are 100x50 inches or 88x44 inches (2:1 length-width). In order to capture the possible positions between 0 and 1 inch, let's say we represent a 100x50 inch table with a 10,000x5,000 2D space. That's 50 million coordinates. Then you'd need to store EVERY POSSIBLE LOCATION of 16 balls in those 50,000,000 coordinates. Then you'd do the same for 15. Then 14. 13... all the way to 2. By the way, there are 7.29 x 10^109 possible combinations for 16 balls across 50,000,000 locations (50,000,000 choose 16). Rounding, that's a 7 followed by 109 zeros. 70,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 states in the Q-learning matrix, JUST FOR BALL LOCATIONS. Also, because in each state you also need to keep track of each action that's possible in that state, you'd need to multiple that huge figure by every possible direction+power combination with which you could hit the cue ball. Even if we enforce the most rigid, grid-locked 2D board possible with a 100x50 2D space (5,000 locations possible) then that leaves 7.119x10^45 possible locations JUST for 16 balls. In summary: Q-learning is appropriate in environments that can be represented by very few, discrete states and actions. Q-learning does NOT scale well in environments with continuous state-action spaces, because the number of states and actions to keep track of is too big for any computer to realistically keep track of and process.
@GamingRevenant
@GamingRevenant 5 жыл бұрын
Could an A.I. play a game like HL2 or Far Cry?
@allmyhomiesloveparsley
@allmyhomiesloveparsley 3 жыл бұрын
went unnocited for way too long x)
@gamezilla5641
@gamezilla5641 3 жыл бұрын
Yes but it would be too confusing to code for one person
@xferas7766
@xferas7766 3 жыл бұрын
Kalendarmenn Neural network wouldn’t be the best way to learn AI to play a big and complicated game. There is a lot of easier ways to do it.
@12yanschump
@12yanschump 3 жыл бұрын
Google created an AI to play StarCraft 2. You can find videos of it on KZbin
@dr.jacksonbright5723
@dr.jacksonbright5723 3 жыл бұрын
I think there are way too many decisions to make every frame for any computer other than the human brain to be able to figure it out
@keepfighting4687
@keepfighting4687 4 жыл бұрын
I really loved the ultimate fail at the end! Good work bud, that was awesome!
@blubber0_0
@blubber0_0 6 жыл бұрын
That was great, I enjoyed it! Keep doing these!
@randomviewer896
@randomviewer896 6 жыл бұрын
LOL What was the AI even thinking when it did that fial shot at the end?
@biratuba
@biratuba 6 жыл бұрын
probably "all my decendents have bassically the same score, so it doesn't matter witch one survive", since the fitnes algorithim was basically at 99.9%, or maybe he programed so it would also try to get the white ball near an hole and it decided it would be more benefitial to get it in to the hole instead of the black one
@SusejFTW
@SusejFTW 6 жыл бұрын
Similar to the Snake it realized its whole existence is a fabrication designed to achieve one goal. It chooses to make us aware of it through a final 'Screw you!' on the last shot
@icantpronounce
@icantpronounce 6 жыл бұрын
It didn't actually have a goal it was just a random arrangement of vectors and the vector just happened to aim in to a hole
@SusejFTW
@SusejFTW 6 жыл бұрын
Ahh. So there is no goal orientation at all across development? Purely environmental management or something
@akaraven66
@akaraven66 6 жыл бұрын
Black ball on black hole, probably didn't realise it was still in play and made the last shot the only shot it could make, drop the only ball on the table being the white one.
@Cometags
@Cometags 4 жыл бұрын
“Geoffrey? Break out Lucille.” Geoffrey barges in with a huge computer and asks the guy to challenge him in 8ball instead*
@kosatuner
@kosatuner 5 жыл бұрын
nice job with this man.. i'm really enjoying ai problems lately... i guess i will get a grasp of them soon and start coding myself... really really nice to see people working and experimenting... cheers
@jonuuh
@jonuuh 6 жыл бұрын
Fantastic work man! keep this up! i love the unique content :)
@david203
@david203 4 жыл бұрын
Perhaps it is my imagination, but in your final good run I thought I could see many missed opportunities to pocket multiple balls with one shot. It might be very entertaining to start with a random but legal break, then force-compute from that starting point a perfect Straight Pool run with a maximum number of balls pocketed by each shot, with black going in last in its group of balls. Should require a great deal of computation, but should look amazing.
@jambozx
@jambozx 6 жыл бұрын
In my opinion this isn't much different from brute forcing and to solve this problem brute forcing would most likely be more efficient and easier anyway. I think machine learning AI is about making the AI adjust to any changing situation within the limits of the problem it's trying to solve. What you've done is simply brute forcing the shots for a single solo game of pool, except with extra steps so I don't think it's proper use of the algorithm for the AI.
@Gigaguenther
@Gigaguenther 6 жыл бұрын
I agree and he said himself that this is not the optimal scenario for a genetic algorithm. I'd like to see an implementation of a neural network, so that the GA could be set to work on teaching the ai to react to the current board - that would of course add tons of complexity and possibly change the whole spirit of this little experiment
@Mycrosss
@Mycrosss 6 жыл бұрын
Yeah the algorithm he used here is lacking, he gave the AI no info on how he should be aiming. The snake/asteroid AI that he made was given the ability to look in 8 directions which gave it some awareness to it's surrounding and power to deduce properly, this one's basically brute force, goes through each combination until it finds one that works
@LemurDrengene
@LemurDrengene 6 жыл бұрын
That's often how genetic algorithms work, and why I never use those. They are bad at adapting and generalizing.
@lolbutters
@lolbutters 6 жыл бұрын
That is literally how this type of AI works. Heck that's how evolution works. Just brute force your way and keep what works. That's why there's several generations, each on improving on the last.
@jambozx
@jambozx 6 жыл бұрын
You didn't understand. We were made by evolution like the AI in this video, yes, but we can live our own unique lives instead of us all living the exact same life every time. This AI can only live one exact same life and will not work if anything in the environment is changed. A well done genetic algorithm AI would be able to do that.
@skipeveryday7282
@skipeveryday7282 6 жыл бұрын
You are awesome I really respect this type of work.
@GoldBallTV
@GoldBallTV 6 жыл бұрын
😂 loved the ending. Another fun and very interesting lesson!
@matesboat9466
@matesboat9466 6 жыл бұрын
Oh boy the fail attempt was beautiful
@azimkhan6102
@azimkhan6102 6 жыл бұрын
The problem of the algorithm memorising inatead of learning could be fixed if another player begun the game. This adds more control over the outcome of the game to you.
@EKWB
@EKWB 3 жыл бұрын
wow, this popped up on my feed and I though "great, New CB video"... Well it was nice to see the progression from this, to CB of today!
@MakcumPycckuu
@MakcumPycckuu 6 жыл бұрын
You're so cool, dude! Great job! 👍
@Velppp
@Velppp 6 жыл бұрын
I was thinking about the game "Breakout" or "casse-brique" in french. That can be fun to watch an AI struggling in this game =)
@LemurDrengene
@LemurDrengene 6 жыл бұрын
Try search for Atari DeepMind and you'll see it ;)
@tobytomlinson814
@tobytomlinson814 6 жыл бұрын
The end where the AI failed was hilarious
@barnabypine7717
@barnabypine7717 4 жыл бұрын
The shots of all 200 look like different possibilities splitting in the multiverse.
@jsd1982
@jsd1982 6 жыл бұрын
Nice vid! I would say try training based purely on the state of the table (ball positions, number of balls remaining, colors/stripes) as input and have your AI determine the best shot vector from that state. Start small with fewer balls and then increase from there. Penalize sunk balls of the wrong color, etc. Throw in some actual pool rules for your fitness function.
@pmark2770
@pmark2770 6 жыл бұрын
Perrty cool video! Also could you make a video about how these AI-s are being made and how can we make AI-s like this? Edit: Can you maybe program an air hockey AI?
@oscarsmith-jones4108
@oscarsmith-jones4108 6 жыл бұрын
hey, you can watch carrykh if you want to learn more about evolved AI(he makes evolution simulators). kzbin.info/www/bejne/eWrXiKVnjLqHq6s neural networks are really interesting, you can make an AI with several inputs(like eyes or something) and then the numbers gained from the senses can be passed on to actions, if you randomly connect the actions to the senses you can get interesting behaviour, and in between you can have a sort of fake brain, where you multiply the inputs by random numbers. worth a read! making your own AI is really satisfying.
@dancingfishfilms
@dancingfishfilms 6 жыл бұрын
here's a playlist of really beautiful, excellently informative videos on how neural networks work... that's what's behind this :) kzbin.info/www/bejne/l5rVlHSoqtuhgc0
@pmark2770
@pmark2770 6 жыл бұрын
Thanks for the videos, I’ll check them out.
@oscarrasmussen7154
@oscarrasmussen7154 6 жыл бұрын
PERRTY?!
@o4ugDF54PLqU
@o4ugDF54PLqU 5 жыл бұрын
jellyberg Actually, I don't think this is a neural network, but a genetic mutation code, since a neural network would unlikely to output the same game each time (and therefore each generation would start differently). Looking at the code seems to support this as it doesn't look like it's using a neural network of any kind that I know of. But I'm not a professional, so maybe I'm wrong and this is using some strange neural network that I have never seen before.
@aseetdhale8138
@aseetdhale8138 6 жыл бұрын
Could we get some videos on how to start creating you own AI and also where is the best place to learn it. Or some tutorials from you on getting started on AI.
@tpat90
@tpat90 6 жыл бұрын
Just google "neural network python/java tutorial" or "how to make your own neural network". There are so many goddamn tutorials out there. And there are a bunch of 'presets' out there. Also Coding Train has some nice videos on it. (*ping*)
@FerrisMcLauren
@FerrisMcLauren 4 жыл бұрын
We love you code bullet!
@AzureSiniy
@AzureSiniy 4 жыл бұрын
It's doing a lot better than I could do for certain!
@limadepaulavlog
@limadepaulavlog 6 жыл бұрын
Tetris would be cool
@kingbaschdor5649
@kingbaschdor5649 6 жыл бұрын
Can you do 2 AI's playing Pong against each other?
@fleecemaster
@fleecemaster 6 жыл бұрын
That's been done a lot and it becomes a stalemate very quickly, the AIs basically keep their panels in line with the ball at all times, and no points are scored ever again!
@bootygrabber4000
@bootygrabber4000 6 жыл бұрын
Fleecemaster that sucks
@fleecemaster
@fleecemaster 6 жыл бұрын
Yeah, pretty much, that's why it's often more interesting to do more complex games. To be fair for those who are just learning it could be a good testing bed for your first AIs.
@rb1471
@rb1471 6 жыл бұрын
It'd be more interesting to have the panels very slow so that they have to think ahead.
@Nomadic-
@Nomadic- 6 жыл бұрын
Allow the AI to tilt their paddles for more competitive gameplay?
@medoc6647
@medoc6647 4 жыл бұрын
Wow this is old but still super amazing
@Danielstein20
@Danielstein20 3 жыл бұрын
Would love to see a remake of this in today code bullet language
@Durrhur
@Durrhur 5 жыл бұрын
Thanks for accidentally giving us a green screen
@seanl.5181
@seanl.5181 6 жыл бұрын
I saw someone else comment about tetris and I think tetris would be cool
@MurasakiBunny
@MurasakiBunny 6 жыл бұрын
Someone tried Tetris once. Very interesting results when the AI actually learned to rage quit by pausing the game so that it wouldn't get a game over.
@MurasakiBunny
@MurasakiBunny 6 жыл бұрын
watch?v=xOCurBYI_gY
@seanl.5181
@seanl.5181 6 жыл бұрын
Oh yeah, I think I saw that!
@allofthiswasanexperimentlo9641
@allofthiswasanexperimentlo9641 6 жыл бұрын
The Laughing Rabbit lmao srsly? XDDD
@Wonky2
@Wonky2 6 жыл бұрын
Here's the video: kzbin.info/www/bejne/roCmpqV4jq6Snbs
@JohnChristosMolura
@JohnChristosMolura 5 жыл бұрын
there are a few more factors that would make the stage more realistic.... 1. cushion deformation on contact which alters path... has to take speed and spin into consideration 2. Cushion rigidity (can be randomized for each sample) 3. Carpet grain direction 4. Carpet grip on balls. 5. Humidity ( affects all the above mentioned factors)
@mennovanhattum6972
@mennovanhattum6972 4 жыл бұрын
I literally laughed at the end great video keep it going
@betadog9418
@betadog9418 6 жыл бұрын
I am absolutely in love with your work, is there anywhere we can donate to support you??
@CodeBullet
@CodeBullet 6 жыл бұрын
Thank you so much I just created a patreon page www.patreon.com/CodeBullet
@KimiiiRaikkonen
@KimiiiRaikkonen 4 жыл бұрын
The bot knows only one speed to hit the ball: *MAX*
@Clepston
@Clepston 5 жыл бұрын
That last attempt killed itself out of shame for its failures lol
@thomaskleine6121
@thomaskleine6121 2 жыл бұрын
Just wanted to tell you, that you made great videos back then even though you didn't have any audio recoring stuff!
@gn7535
@gn7535 6 жыл бұрын
It's a bit obscure but I would love to see an AI learn to play CoreWars. It's a game where you code a "warrior" to destroy another "warrior" by terminating its code. The code for the warrior programs is all in assembly so it wouldn't be that impossible to do. It's a really interesting game and the idea of an AI writing code would be pretty cool.
@Vibesfs
@Vibesfs 5 жыл бұрын
Generic Narrator an ai writing code is literally how humans get themselves eliminated.
@ChronoYinger
@ChronoYinger 6 жыл бұрын
this is so cool
@Benny_Blue
@Benny_Blue 4 жыл бұрын
I like that the final product hit the black ball last.
@economicist2011
@economicist2011 4 жыл бұрын
Love this guy... a version of this with Mr. Cocky TV-head doing the audio narration would probably be one of the funniest videos.
@Tabulith
@Tabulith 6 жыл бұрын
Awesome video! Maybe you could do minesweeper? It would be great to see some strategy in my opinion
@icantpronounce
@icantpronounce 6 жыл бұрын
minesweeper would be incredibly difficult or incredibly boring
@MOOBBreezy
@MOOBBreezy 6 жыл бұрын
The basic strategies of minesweeper are already solid, anything else would just be guess work
@Oxymoron808
@Oxymoron808 6 жыл бұрын
the music a 7:00 sounds very vulfpecky, is it some random royalty free music?
@kevingreener7071
@kevingreener7071 6 жыл бұрын
I was thinking the same thing. It's like a bastardized Outro.
@Oxymoron808
@Oxymoron808 6 жыл бұрын
Kevin Greener yeah Outro x Hero Town
@zqualala
@zqualala 6 жыл бұрын
It's called Wolf Kisses by Otis McDonald ! Only could find it on youtube so far... kzbin.info/www/bejne/sHmTf3uip7ikndU
@Oxymoron808
@Oxymoron808 6 жыл бұрын
zqualala haha no way! That's literally what vulfpeck translates to
@JimmyLundberg
@JimmyLundberg 6 жыл бұрын
Thanks guys! I recognized the music (especially first two chords) so badly and couldn't put my finger on it.
@KinneKitsune
@KinneKitsune 11 ай бұрын
This definitely needs a remake. Especially how you now test your AI against real, unsuspecting players in online games.
@Basillic
@Basillic 5 жыл бұрын
I'm imagining the AI being a gladiator that has to do all kinds of challenges at the whims of Code Bullet at the arena for audience entertainment.
@Damini368
@Damini368 5 жыл бұрын
I'd love to see pool with Q learning instead.
@crazedvidmaker
@crazedvidmaker 6 жыл бұрын
This is more of a case of exploring a variable space for a single solution with high reward, not really learning how to play pool at all. Of course, with a random pool table this would have no idea what to do - which would be the goal that I would refer to as "learning to play pool". Not an uninteresting video - I just wouldn't call it "AI learns to play pool"
@angelmendez-rivera351
@angelmendez-rivera351 5 жыл бұрын
Andrew Christensen It’s a generic algorithm. I think it does count as learning in a broad sense. Just not what people usually mean they use the term “AI learning”, which is a very technical term and refer to a specific type of learning.
@angelmendez-rivera351
@angelmendez-rivera351 5 жыл бұрын
Also, he did admit that the algorithm is a bad way to solve the problem of AI playing pool. The reason I did it that way despite that is because I’m fairly certain that’s the focus of his videos and of his research anyway.
@paulburger9904
@paulburger9904 5 жыл бұрын
I kind of agree with this. The AI should take in the game state and decide on the direction to hit the ball. This is a random search for the ideal set of moves. Still cool though.
@Monaleenian
@Monaleenian 4 жыл бұрын
@@paulburger9904 It's not even a random search for the ideal set of moves. It's a search for moves than are just about good enough.
@RaviGidwani5
@RaviGidwani5 4 жыл бұрын
@Andrew Christensen credits to the uploader. I do agree with you. I think if there was a 2nd player (human or random shot) alternating with the learned agent, it will make it more interesting and a real test for learned AI agent.
@creepjax
@creepjax 3 жыл бұрын
this video needs to be remade, i would love to see a remastered version
@harutmargaryan9980
@harutmargaryan9980 6 жыл бұрын
Wow, you made it in Processing. I like it!
@oddeda
@oddeda 5 жыл бұрын
10:23 I actually think that the AI does this because it can't detect the black ball as it is a bit merging with the pot. So it sees no balls and doesn't know what to do next. Potting the white ball sound logical for an AI to try at that point.
@michaelevans4265
@michaelevans4265 5 жыл бұрын
I'm glad someone had some form of explanation
@811brian
@811brian 5 жыл бұрын
So the solution would be to change the shade of either the black ball or the pockets to be slightly lighter than the other.
@coleschemistrychannel4172
@coleschemistrychannel4172 5 жыл бұрын
Good idea, but the ai doesn’t see the color of anything on the screen. It just sees the position of the balls.
@shinroddellore9870
@shinroddellore9870 6 жыл бұрын
I kinda want to get started on AI, neural networks and all that stuff. However, I don't really know where I should start. Could you help me about this ? Awsome video, even with MovieMaker x) Keep going !
@atp429
@atp429 6 жыл бұрын
Shinrod Dellore Watch 3Blue1Brown's videos on neural networks first, then if u want to see how the coding is done, head over to The Coding Train
@Meppify
@Meppify 6 жыл бұрын
the standard MOOCs like Coursera and edX have Machine Learning and similar courses
@shinroddellore9870
@shinroddellore9870 6 жыл бұрын
ATP I already knew about 3B1B videos and my main problem was how to implement it in code. Since your comment, I've watch a lot of TheCodingTrain's videos which gave me a better understanding of how all of this works. Thanks a lot !
@depressobbq404
@depressobbq404 6 жыл бұрын
hey man. dont be mad about having to use movie maker. its not a bad thing. this content is all about the AI and ive been binging a bit of your content. and ive had no issues with your quality by the wya. these AI are cool as hell man. WAY outside my skill level as far as code. props man.
@mowburnt
@mowburnt 3 жыл бұрын
Unilever did something similar with a powder nozzle design. Originally they used the theoretical experts but the results weren't great so they make a bunch of nozzles like the starting design but with small mods (marginal gains). They then picked the best candidate from testing and repeated the process on that gen. At the end they had a design which nobody would have dreamt but which worked a treat. :-)
@NaudVanDalen
@NaudVanDalen 5 жыл бұрын
I was expecting a neural network, but I got an AI that shoots in a random direction and force and takes the best values per step. Place the balls in a different place and it doesn't work anymore. A real AI has one set of values it can use regardless of what situation it's in like the Snake AI you made and many other AIs you made. Although you did of course admit that at the beginning. I like how you bought a microphone and started voice acting because that really improved your videos.
@KineticManiac
@KineticManiac 5 жыл бұрын
Well that is true, but this is Pool, a game where random doesn't apply, so the fact that it will suck when balls are in different places isn't an issue. Of course, I can see where you're coming from. But even though this method may not be the best choice for educational purposes, I think it's actually a better choice for Pool itself. A neural network would need a huge amount of input neurons just to get the places of balls correctly, as well as a huge amount of output neurons just to shoot the ball in any direction, and at various strengths. But yeah, you do have a point, which I do agree. EDIT: Also I realized my comment may be a bit misleading, since I said that this wasn't the best choice for educational purposes. What I meant was that neural network would be a better choice, but I do think that this is educational, especially on genetic algorithms.
@NaudVanDalen
@NaudVanDalen 5 жыл бұрын
@@KineticManiac If someone else shoots a ball first, the balls will be in a different place every match. Code Bullet explained in a different video, which I watched later, that an AI does not have to be a neural network. Games have AI enemies, but they are hardcoded AI like this pool game or his Pacman game or his AI code example with the dots moving to a target, which doesn't work with randomized levels.
@KineticManiac
@KineticManiac 5 жыл бұрын
@@NaudVanDalen True, this AI will only work for single-player Pool. One thing though, this is not hard-coded AI, the type that is common in games. Such AIs still do gather information about the environment and make a dynamic decision. However their decision making process is simply a code written by the programmers, they don't learn. This AI on the other hand does not gather any information about the environment, the decision making process is static. But this static decision making is not coded by Code Bullet by hand. Instead he developed a program that develops a static decision making process via genetic algorithms. So it is actually learning, even though the decision making itself is static. Not a huge deal, but I just wanted to explain the difference.
@cheezytm478
@cheezytm478 6 жыл бұрын
Anyone else but me read the title as “AL learns how to play pool”???
@marv5078
@marv5078 4 жыл бұрын
Lmao
@cryptocoder5553
@cryptocoder5553 4 жыл бұрын
The explosion of color is cool.
@kavehiskaveh
@kavehiskaveh 3 жыл бұрын
I really enjoy these videos. Can u put a tutorial on how you framework these AL algorithms for beginners?
@Liggliluff
@Liggliluff 4 жыл бұрын
I don't think this is called AI, but rather brute force.
@MrBanarium
@MrBanarium 4 жыл бұрын
Which is exactly what machine learning is, and it’s what we call "AI" today. But you’re 100% correct, it’s brute force. It works by using a lot of energy to process a lot of data while first telling the machine what the result should look like.
@Liggliluff
@Liggliluff 4 жыл бұрын
@@MrBanarium Machine Learning can do more than just brute force. Plus AI is more things than just machine learning; games tend to have AI that are pre-programmed.
@MrBanarium
@MrBanarium 4 жыл бұрын
​@@Liggliluff Of course, AI isn't just ML, never said otherwise. The initial comment was saying that it *wasn't* AI, so I pointed out that it was ML, which is a type of AI. As for ML, it's not about "doing more" than brute force: ML *is*, in a sense, brute force. Of course, there a whole lot more to it, but it wouldn't even be possible without huge amount of computing time and energy to let the algorithm learn until it can achieve the desired result. It is, by its very design, brute-forcing its way through a dataset and toward a mathematical model solving that dataset.
@todayonthebench
@todayonthebench 4 жыл бұрын
Yes, this is a very brute force way of going at things. Since we are not really considering the current state of the table, just that doing X followed by Y and then Z gives us a desirable result. This isn't "Artificial intelligence" but rather a randomized brute force approach. That likely is slower at finding the optimal solution compared to a non randomized brute force approach. (unless we actively note down what randomized versions we have tested already, but that will chew up data storage rather quickly, not to mention that the act of generating random numbers is likely more intensive then just incrementing a value.)
@completeandunabridged.4606
@completeandunabridged.4606 6 жыл бұрын
Try dots and boxes with 2 competing AI and variable grid size. Or you could make an AI which could just destroy any human.
@sunnybeta_
@sunnybeta_ 6 жыл бұрын
thanks a lot for the idea :D
@MeioNeiz
@MeioNeiz 6 жыл бұрын
The game is broken if played perfectly and can be played perfectly by humans. But one of the players (first or second, I can't remember) will always win if no mistake is made so I think this would just be boring to watch as the result isn't as interesting as one might hope.
@LilRello607
@LilRello607 5 жыл бұрын
You make such good content
@jerryjojo8333
@jerryjojo8333 5 жыл бұрын
You deserve way more subscribers
@owlcitizen314
@owlcitizen314 6 жыл бұрын
Isn't that just called a greedy algorithm?
@GS-et3mi
@GS-et3mi 5 жыл бұрын
I think it should be called so.
@filipjacobsen2468
@filipjacobsen2468 5 жыл бұрын
Each gen is greedy. The whole process is dynamic.
@wedding_photography
@wedding_photography 5 жыл бұрын
It's called hill climbing. Nothing to do with AI or learning.
@kupeck
@kupeck 5 жыл бұрын
@@wedding_photography That wasn't a good joke
@koma1997
@koma1997 5 жыл бұрын
A greedy algorithm basically is an algorithm that has a bunch of finite steps, and some choice to make at the end of each step. At a high level, yes, this is a greedy algorithm, where it is trying to maximize fitness and each step it gets to choose what species reproduce to make the next gen. But greedy algorithms apply to a lot more, and are pretty vaguely defined in that way. A lot (and i mean a LOT) of very famous, and or very frequently used algorithms can be argued greedy.
@mohammedmokhtar
@mohammedmokhtar 6 жыл бұрын
8:41 xD lol I didn't know you used MovieMaker
@NathanaelNewton
@NathanaelNewton 6 жыл бұрын
I actually laughed aloud when i saw this..
@dannygjk
@dannygjk 6 жыл бұрын
MovieMaker wasn't used for the learning.
@davidzbarcea2303
@davidzbarcea2303 6 жыл бұрын
Dan Kelly no shit
@Josh-je2ni
@Josh-je2ni 6 жыл бұрын
How..
@cyborgpunkmonk
@cyborgpunkmonk 6 жыл бұрын
I actually liked movie maker. Simple, but works pretty good compared to most free software. Most other free programs don't even have a simple fade in/out option. XD Wish I could get it again. Still looking for a decent simple program that doesn't constantly freeze or lag on my laptop.
@woobilicious.
@woobilicious. 5 жыл бұрын
Your pool table has more friction than the local bar pool table with a pint of beer spilled in it.
@murilopirrialves343
@murilopirrialves343 5 жыл бұрын
I love the amount of stuff happening at the same time so suddenly 😂😂😂
@nutmaster652
@nutmaster652 6 жыл бұрын
it’s 2018 and this video looks/sounds like a 2007 youtube video
@JordanMetroidManiac
@JordanMetroidManiac 6 жыл бұрын
nut master it’s kind of nice, actually
@sus4644
@sus4644 5 жыл бұрын
FSim Channel so you expect that to be hate? Damn you must be one person that gets salty easily.
@thehumanflute
@thehumanflute 5 жыл бұрын
9:47 first contact on black ball is not allowed unless it is the one being potted
@austinsharpe8157
@austinsharpe8157 5 жыл бұрын
Looking at your older videos, you have improved the entertainment values 10 fold ever since you started speaking in them.
@ChadBarnier
@ChadBarnier 6 жыл бұрын
Would love to see pool pro recreate this exact game
@j-rich
@j-rich 5 жыл бұрын
200 at 1 time is visually satisfying
@dahahaka
@dahahaka 4 жыл бұрын
Interestingly he seems to prefer "slamming" the ball with high speed, i actually do the same since it is (to me) more predictable
@StarKnight54
@StarKnight54 4 жыл бұрын
5:56 cue cips into orange
@catofsnow_
@catofsnow_ 6 жыл бұрын
The AI repeatedly trying to find the best shot over and over again is satisfying
@TheTransforcer
@TheTransforcer 5 жыл бұрын
That was beautiful!
@julioau
@julioau 6 жыл бұрын
It's probably too hard but could you try to make a Stick Fight: The Game AI? Idk... Do what you think would be cool :)
@toir1465
@toir1465 5 жыл бұрын
Gen 1337: AI has captured the Internet and robots now rule the world
@connor3510
@connor3510 5 жыл бұрын
Maxim777 should be gen 420
@mage3690
@mage3690 5 жыл бұрын
Plot twist: they've captured all the pool tables in the world and are holding a minor populated island hostage for more pool tables, balls, and processing power.
@filthynice88
@filthynice88 3 жыл бұрын
Oh god i went back too far !! I need that BIG CB voice 😆
@The6Channel
@The6Channel 4 жыл бұрын
Hey, nice video! I'm very interested in the reinforcement learning as well For the video, use Vegas pro! It's really good 👌 I can give it to you if you want to
AI learns to play the WORLDS HARDEST GAME even more levels
13:25
Code Bullet
Рет қаралды 6 МЛН
Training an unbeatable AI in Trackmania
20:41
Yosh
Рет қаралды 12 МЛН
КАРМАНЧИК 2 СЕЗОН 6 СЕРИЯ
21:57
Inter Production
Рет қаралды 459 М.
ELE QUEBROU A TAÇA DE FUTEBOL
00:45
Matheus Kriwat
Рет қаралды 26 МЛН
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 102 МЛН
BallisticNG - Travelling at nearly 4,000km/h
4:24
J.W. Tech
Рет қаралды 223
Evolving Genetic Neural Network Optimizes Poly Bridge Problems
9:59
A.I. LEARNS to Play Hill Climb Racing
20:07
Code Bullet
Рет қаралды 7 МЛН
Automatic pool stick vs. strangers
21:19
Stuff Made Here
Рет қаралды 22 МЛН
The Fascinating Programming of a Chess Engine
6:45
Bartek Spitza
Рет қаралды 288 М.
AI learns to play 2048
11:11
Code Bullet
Рет қаралды 10 МЛН
I tried to make a Valorant AI using computer vision
19:23
River's Educational Channel
Рет қаралды 1,4 МЛН
Computer evolves to generate baroque music!
18:13
carykh
Рет қаралды 2,4 МЛН
2D water magic
10:21
Steve Mould
Рет қаралды 552 М.
MariFlow - Self-Driving Mario Kart w/Recurrent Neural Network
5:50
Охрана года 😎 #кино #фильмы #сериалы
0:55
ХОРОШО ЧТО ПЕРЕПРОВЕРИЛ😂😂😂 #юмор #пранк
0:44
СЕМЬЯ СТАРОВОЙТОВЫХ 💖 Starovoitov.family
Рет қаралды 2 МЛН
Прояви гостеприимство🤣#фильм #сериал #кино
1:00
Final increíble 😱
0:39
Juan De Dios Pantoja 2
Рет қаралды 7 МЛН