Sorry it's late guys, but here is the code if you're interested github.com/TylerMommsen/fruit-ninja-bot
@justjuniorjaw2 ай бұрын
Image Recognition? Dog. Pig. Dog. Pig. Dog. Pig. Loaf of Bread. SYSTEM ERROR!
@goat_yllw2 ай бұрын
@@justjuniorjaww mitchels vs the machines reference
@rainbowman47232 ай бұрын
do you think it would be possible to make this for mobile?
@CustomGameing2 ай бұрын
@@rainbowman4723nha i thik mobile software need different codes(I think)
@AceOrSАй бұрын
@@rainbowman4723yes
@DavidKassa2 ай бұрын
I’m kinda disappointed that the AI didn’t absolutely obliterate the pomegranates
@fizzlanderr2 ай бұрын
yeah seeing it get like 100+ slices would have been cooler
@Mikustan392 ай бұрын
Same here. Might just not be good enough unfortunately.
@zincalloycopper22 ай бұрын
Sword draw, first form: death by a thousand cuts
@KJ.4202 ай бұрын
It would've been even cooler if it also went for combos as well, but it's just an algorithm that looks for given images and doesn't really know the game strategies, so maybe I'm expecting too much from it.
@dadoul99052 ай бұрын
get a better cpu and you'll get better pomegranates
@CuriosityIgnited2 ай бұрын
Just spent 10 minutes convincing myself that watching an AI play Fruit Ninja is the productive break I needed. Can confirm: still procrastinating.
@hamzamotara43042 ай бұрын
Psst. Stop procrastinating. Go do it.
@miguelcardoso50842 ай бұрын
Not procrastinating, just doing side-quests
@Vo_tex2 ай бұрын
i am doing the same thing
@whifle14452 ай бұрын
Doing the same
@wesleyneff55102 ай бұрын
Same
@GwnTim12 ай бұрын
I love how the AI was 95% certain that the bomb was a bomb, and as soon as it hit the bomb it plummited to 80% like the AI said "nuh-uh, that wasn't a bomb THAT WAS NOT A BOMB!"
@morphe9042 ай бұрын
I‘m guessing that the bomb as it was exploding, was looking less and less like the bombs the AI was trained to recognize
@mingamerking2 ай бұрын
I think allowing it to recognize how to combo fruits would make this even better, Ike have it wait before slicing and if multiple fruits are on the screen it does one big slice
@gameplaysuffering16202 ай бұрын
yeah but that would add like 2 to 5 years to dev time
@justascreamingcat29642 ай бұрын
@@gameplaysuffering162099% of that time being procrastination
@justenoughrandomness89892 ай бұрын
yeah
@dillzilla44542 ай бұрын
i got one even better, make a simple bot slice where there is motion with the bombs being a no-go zone determined by image recognition. this means it is only looking for one item, allowing it to be quick and confident in its determination, allows it to pretty easily do combos, and makes it much more responsive when slicing the fruits
@Ace-isket13 күн бұрын
@@dillzilla4454it’ll trap itself on the movement of the slice it makes though
@anonym51602 ай бұрын
No fruits are being harmed in the making of this video.
@ika322 ай бұрын
more like no bombs
@2haep2 ай бұрын
he probably ate one during it
@hamzamotara43042 ай бұрын
No, fruits were harmed in the making of this video.
@mr_pigman10132 ай бұрын
Liar liar pants on fire
@Randomname-yb7hs2 ай бұрын
Except for the ones that were
@theradomguy55812 ай бұрын
Big props for making an Ai on the orginal game! Happy to see that rather then a recreation of it
@elliott61582 ай бұрын
I feel like the recreation is just as cool
@elliott61582 ай бұрын
it shows off more fundamental ML concepts rather than "I imported an image recognition library :B"
@slouch1862 ай бұрын
@@elliott6158agreed. i much prefer ML stuff when the AI has access to the data behind the game rather than just recognizing screenshots
@ryforg2 ай бұрын
1:43 that’s why captchas have you identify common things found on streets. You are training their self driving car ai.
@nastykerb3419 күн бұрын
Rhen why are the images fuzzy, would that result in a shotty AI?
@ryforg19 күн бұрын
@ they started with easier images but are slowly getting harder to closer represent the real world environments the ai would actually see. If you can understand the blurry images it teaches ai to understand blurry images.
@reanimationxp12 күн бұрын
@@nastykerb34 first of all this isn't true. the captcha images have already been recognized otherwise the captcha wouldn't work. however let's say it were true, training on fuzzy images would likely mean when it has more clarity in real life, it's just that much more accurate. however, items are often far away or in poor lighting conditions, so there's a good chance it could be for the purpose of better training on objects that are just far away.
@johannesbohm64582 күн бұрын
@@reanimationxp I just saw an interview with one of the devs behind Captcha the other day and the images shown in the Captchas are actually not pre-recognized. They are shown to a bunch of people at the same time and the majority decides if something is a certain thing or not. Otherwise this would require a lot of work and would heavily limit the amount of available pictures, thereby reducing security...
@HitSpaceGD2 ай бұрын
If the AI sliced the menu fruit (🍉 = play again), it could keep training for hours.
@jmvr2 ай бұрын
Well, it's not training when it's running, so all you're doing is making it play forever, without it being trained on anything. Maybe a modification to it to make the current AI model train a new one while it plays would be cool, but wouldn't be necessary, because this isn't meant to be a perfect AI
@gaymerjerry2 ай бұрын
this ai is just the photo recognition if you want it to learn to play the game better youd need a neural network thats fed the image recognition ai data as an input
@modzyy2 ай бұрын
@@jmvrit takes more pictures while its running which can be used for training later on, this is common sense.
@jmvr2 ай бұрын
@@modzyy key word: _can_ be. It's not currently made to train a new AI. All it does is take a screenshot, analyze it, and do some input. Then the screenshot may as well be discarded, because it does not use the image further. As well, AIs are trained at a specific point in the process, but aren't trained further. For example, ChatGPT will not get better when people use it, and neither will most AI models. Typically when an AI trains itself, it gets worse. By definition, the day it doesn't is the day of the AI singularity, where it can improve itself into infinity
@modzyy2 ай бұрын
@@jmvr yap yap yap
@weetikveelpik-wq5bx2 ай бұрын
0:39 amazing, well said
@tuloxe2 ай бұрын
totaly on your side 😂
@evereq89702 ай бұрын
Language..
@evereq89702 ай бұрын
@@tuloxelanguage..
@Sensei-Ollie2 ай бұрын
@@evereq8970what?
@weetikveelpik-wq5bx2 ай бұрын
Fym language?@@evereq8970
@GemedetAdept2 ай бұрын
If you think about it, YOLO (c. end of the world, 2012) and YOLO (object recognition) are really the same thing: You'll find out *very* quickly that You Only Live Once if You Only Look Once while crossing the road!
@DanielLCarrier2 ай бұрын
Unless anime was right and you find out that you live at least twice.
@windy54052 ай бұрын
@@DanielLCarrieronly work if it’s a truck with its headlight open
@locrianphantom35472 ай бұрын
@@windy5405Or a tractor going 2 mph.
@lunademorgan2 ай бұрын
@locrianphantom3547 no not Kazuma.
@iresineherb72 ай бұрын
Man that 2012 was awkward
@gregoryk43652 ай бұрын
So painful seeing him do all this when he could've just had something search the specific pixel color of the fruit/bombs to slice them instead of training a whole ai to recognize fruit
@blizyon30fps862 ай бұрын
Exactly
@sakshambaranwal1322 ай бұрын
I am guessing that if he did that then the ai would proceed to again cut the fruits which have already been sliced
@Mostsanewriomain2 ай бұрын
@@sakshambaranwal132I can totally imagine the AI doing that
@Solrex_the_Sun_King2 ай бұрын
Now teach an AI to play feed the deep.
@clivah14992 ай бұрын
some time ago, they needed pigeons to do this.
@HitSpaceGD2 ай бұрын
I think England still does
@ThisIsAHandle-xz5yo2 ай бұрын
They needed pigeons to play fruit ninja for them?
@HitSpaceGD2 ай бұрын
@@ThisIsAHandle-xz5yo I guess
@lukasschriefer7992 ай бұрын
Bro, I agree
@samstromberg55932 ай бұрын
This channel is the most perfect example I have ever encountered of a Blue Ocean Besides maybe the Wright Brothers
@server6422 ай бұрын
Trajectory prediction would be wicked to see! Especially in the case of avoiding a slice if a bomb will intercept. And couple that with what I’ve seen others say: getting combos by slicing multiple fruit in one motion. If it can predict the best time to get combos based on the trajectories, I’d love to see how high a score it can really get 😈
@kabii2 ай бұрын
i would love to see an updated version of the ai, doing fruit combos because atm it slices each fruit individually it would be so satisfying if it would do the best slicing combos possible
@solodemon8465Ай бұрын
8:00 Mangoes have as much vitamin C as oranges
@arthurkaramazov89322 ай бұрын
Amazing video, thanks! Can't believe you have only ~7k subscribers. 🔥
@sunofabeach94242 ай бұрын
python is simple to created an image recognition AI with, but it is so slow that by the time it has finished processing the image the results are already outdated. this pretty much sums up this whole situation where the most performance dependent tasks are solved with one of the slowest languages out there
@ahdog8Ай бұрын
Generally, doing image recognition in Python involves making calls to some library that is actually written in C (or a similar, actually fast language). As a result, relatively little time is spent in Python-land which mitigates the slowness of the language. I don't know what the code used in the video looks like. There could be a bunch of complicated Python code that slows it down. Or maybe it's not Python's fault at all.
@sunofabeach9424Ай бұрын
@@ahdog8 I know that Python libraries utilize C, however, the overhead that Python introduces is still too much even for complied C code
@mohammedalhammadi3547Ай бұрын
3:18 You know bro's been taken by the Terminator when he called the AI "His"
@GameJam2302 ай бұрын
I’m not sure how feasible it would have been to decompile the game and get the models for the fruit and bombs, but if those are obtainable then would it not have been easier to train the AI using screenshots of those models rotated programmatically? Then, instead of searching the entire screen space for fruit, you only need to look in areas with a significant amount of pixels changed between consecutive frames, as these locations have either a fruit or bomb in them. However, if it’s a fruit, then you don’t actually care WHICH fruit it is, you cut it regardless. You ONLY need to care about whether or not it’s a bomb, and so when screen pixels change in an area, check the surrounding region for a bomb. If a bomb is not found, cut, otherwise avoid. It should be noted too that this approach would likely have issues with areas where bombs and fruit overlap, but that can be dealt with. This approach could ALSO be done without the decompiled models at all, instead only providing the model with gameplay screenshots of bombs and fruit overlapping bombs. By providing the AI with these images, it alerts it NOT to cut them, but if it DOESN’T see matches for that data, it DOES cut whenever it sees changed pixels. The main efficiency of this comes from not needing to run image recognition for each individual fruit, and also not running image recognition checks over the whole screen constantly, but instead only in surrounding regions where changed pixels are when those changes occur.
@Punch_Card2 ай бұрын
wake up babe Tyler just uploaded a new video
@musictomyshears2 ай бұрын
It would be interesting to try a roguelike - pixel dungeon/shattered pixel dungeon is FOSS, and I haven't seen anyone do anything like it. You'd have a variety of skills the AI would have to learn: fight mechanics, resource management, item mechanics and selection, synergies etc. You'd probably choose just one class, and since it's FOSS, if it's too complex you could easily tone it down by reducing items, making it set seed, making item generation deterministic, just doing one floor etc (but it'd be a hell of a video to do the whole game haha but maybe there's a reason no one's done it before).
@number1-willstetsonsimp2 ай бұрын
that sounds actually sick
@DANIDANI310Ай бұрын
In the same way you can teach AI to recognize an enemy soldier and an ally and make it shoot in less than a second. AI is becoming scary .
@blubaylon27 күн бұрын
Well yeah, that's how classification algorithms work lol
@Jallahruud2 ай бұрын
Your channel is gonna blow up dude this is really high quality and entertaining content. Keep it up!
@Nobody-tw8wf2 күн бұрын
Dude you are a genius🙏🙏🙏 Love the effort you put in each video ❤❤❤
@XX-ot4pb28 күн бұрын
Hi, I love your channel! I would say it is the best channel for game AIs, I love your videos. I am wondering what tool you use to train the YOLOS; thanks!
@Label_sabke_niklengeАй бұрын
Loved your hardwork ❤❤😂
@kogames31912 ай бұрын
absolutley amazing video and also very educational, nice man
@mayzar864628 күн бұрын
Cool it’s another KZbinr that is underrated and has good content (:
@Me-00632 ай бұрын
Great video! I would suggest adding combos
@mac28578 күн бұрын
2:12 You don't actually, you can just use a clustering algorithm that can group all the similar objects together which you can then label
@Krissoh2 ай бұрын
You could make a system of hierarchies, where the AI cuts the least important fruits first and then the most important ones, this way you could avoid cases where it cuts the pomegranate fruit, losing the other fruits.
@mathew60412 ай бұрын
1:58 lies, i have done this, but did absolutely nothing with it :)
@jamieehoover31322 ай бұрын
omgg you’re only 9k subs ?! you deserve way more
@martinkoblitz12852 ай бұрын
it would have been so much cooler if the ai would have learned to slice more then 1 fruit at a time but still a really cool vid man keep up the good work! : )
@HSonyoutube2 ай бұрын
Here's another challenge for you. Try hitting combos. Basically you've got to track the motion of all fruits by taking continuous screenshots. By that you can make predictions on when a bunch on fruits might be closest to one another. And make a hit. And hit individual fruits only when those are at the end of downward motion
@HùngNguyễn-z8z7vАй бұрын
May be another way of approaching this problem is using the AI to detech the colors instead of the fruit themselves? Because the background color is distinctive.
@KoonKlausGamerАй бұрын
2:15 respect this job
@AxoTheAxolotl70722 күн бұрын
I accidently scrolled too far7:50
@Johnny313232 ай бұрын
A pixel search algorithm would've been faster, via color indexing. All fruits have one solid color, so having a simple hex variation of lets say (green) for an apple 🍏 would be way faster and probably even better to find all the fruits. Same goes for the bomb since it is a solid black color, so the AI never would try to attack it within a solid square hit box on screen.
@HappyMajor2 ай бұрын
that wouldnt work with bombs you need to use the red outline for them to get their actual hitbox the rest is fine as is tho if u wanna go fancy u can go with outline detection or just as u said a simple HSV range for each fruit #edit another problem would be the already sliced fruits since they have the same color
@lekkobot2 ай бұрын
I feel like that might cause issues with the ai going after splatter.
@HitSpaceGD2 ай бұрын
@@lekkobotWhen the reply has more likes than the original comment:
@-CENSORED0-2 ай бұрын
@@HitSpaceGDthat’s called a ratio young one
@HitSpaceGD2 ай бұрын
@@-CENSORED0- thanks for enlightening me 👍
@aleksanderwalenciej2 ай бұрын
You could’ve tried first idea of image recognition but with checking only for range of colors. And the fruits would have a specific range of it. When you would make it small for each fruit it could’ve worked
@ContentWrld12 ай бұрын
should’ve made it insane at the part where it combos
@Poonda-ju8xe2 ай бұрын
I love Yolo Ai. Amazing for digital surveillance and AI cheating in games like Counter Strike. What an amazingly versatile piece of software.
@nostew1604Ай бұрын
throw the gameplay into after effect -> use motion tracking -> render sequence of image -> label into seperate folder and auto rename much more easy way to do the labeling task
@plsdont751519 күн бұрын
I would’ve just “cut” the center of the area that popped up that didn’t match the backgrounds
@castleofwonders12 ай бұрын
You're doing a great job in content creation.... 🎉
@En3vity02 ай бұрын
3:24 the voices- they won’t stop…
@Nobody_NPTАй бұрын
FISH
@whatsaname2usern2 ай бұрын
grandma's gonna be happy with this one
@T110-E52 ай бұрын
Way too underrated channel ❤
@MusicLabMadScientist2 ай бұрын
Here before this channel BLOWS UP!
@Pavlov-shackАй бұрын
It was pitch black in my room watching this a inch away from my face it felt like a real flash bang
@josephholman24012 ай бұрын
If you wanted to improve the ai, you only need 3 frames and some calculus to predict the exact trajectory of the fruit meaning you'd be able to slice every fruit on the 4th frame that it's on screen
@whatevenisazero2 ай бұрын
We got fruit ninja aim bot before GTA VI
@pawansapkota39702 ай бұрын
Yes using the predicitons from the previous models and reannotating is the best option for the faster finetunning of the model.
@am_rzq681917 күн бұрын
Make it beat the world record next.
@tonic-music2 ай бұрын
Now you need a genetic algorithm model
@IsaacLmao1112 ай бұрын
This guy is godly
@achilles7498Ай бұрын
Ai's worst enemy, pomegranates.
@poohritkun50682 ай бұрын
Now this is a real AI. Finally!!
@KmbmzАй бұрын
Bro you chose the most complex way, all what it needed was an image recognition only for the bomb and for other moving objects And an if statement If object != bomb Slice
@blubaylon27 күн бұрын
How would the AI be able to tell that fruits are on the screen?
@DEVY694202 ай бұрын
now i want you to make an ai that can solve captcha
@shaynegoldstein13292 ай бұрын
i think just using color to find everything that isnt a bomb would be faster. the red and black on the bomb look unique.
@joselopes90612 ай бұрын
Idk if it is only me, but here: 5:40 you could have put only the AI Vision or 20 seconds one 20 seconds another. The both at the same time are weird.
@SasamuelTheCool2 ай бұрын
Vision issue
@Not_A_Lazy_Dev2 ай бұрын
@@SasamuelTheCool maybe brainrot isn't that bad, maybe the attention span of a goldfish isnt that bad ... MAYBE FAMILY GUY, SUBWAY SURFERS, MINECRAFT PARKOUR AND ROCKET LEAGUE CLIPS ALONG WITH THE ACTUAL VID AT THE SAME TIME ISN'T THAT BA-
@BlankyB4Ай бұрын
Who gonna tell bro 😭🙏
@call_me_ondreo2 ай бұрын
You can easily increase your model speed if you use lower screenshot resolution (not a game resolution), then turn image black and white, then use color contrast to make objects looks clear. And also, check to click on fruit little bit away from bomb.
@TheLazyCowboy127 күн бұрын
Now feed the recognized images (x,y,w,h,type,confidence) to a neural network and see how well it can learn to play. Maybe it would even learn combos!
@unclesamsonite-y3k2 ай бұрын
bros ai: if its green or blue or yellow then its a fruit but if its BLACK THEN ITS A BOMB
@akio.69Ай бұрын
Me with yellow and green bomb.😈
@mr.czesky2 ай бұрын
TOP content bro
@arkilagr55102 ай бұрын
Quick question, how did you get both visions side by side? I just wanna know for future use
@iPxter2 ай бұрын
What program did you use for the labelling of the objects at 2:16?
@TylerMommsen2 ай бұрын
Roboflow
@wesleypang215816 күн бұрын
what is the program you use for the labeling?
@DinosaurusTerbaik2 ай бұрын
This guy worth more subscribers guys.
@R2Bl3nd2 ай бұрын
You could've scaled down the screenshots to a much smaller size before feeding that to the AI.
@oldscooljoe61942 ай бұрын
Why arent you remaking the game
@ninjaride13122 ай бұрын
Making it not hit the bomb should had been easy enough
@mloopy4612 ай бұрын
I feel like fruit ninja is on everything nowadays 💀
@crimsonpheonix46092 ай бұрын
The ai isnt even getting combo slices either
@gg-gn3re2 ай бұрын
0:55 you use spiral detection from center and dynamic bitmap or just color tolerances. It'd take several thousand times less processing power and work about the same. Things like simba have made this very easy for decades
@peterchristensen88432 ай бұрын
Color ID won't work well since the fruits splatter after being sliced, meaning your AI would continue slicing fruit juices long after the fruits were sliced.
@gg-gn3re2 ай бұрын
@@peterchristensen8843 that isn't ai
@djatmikko95792 күн бұрын
Thank you
@Croissan_2 ай бұрын
i like this youtuber
@Usual_turtle2 ай бұрын
4:38 This is not a 77.78% difference. A 77.78% difference would be about 819118 pixels, not 2073600 pixels. It's actually closer to 43.75% difference.
@cyn72612 ай бұрын
it's a 77.78% difference from 1080p to 1440p and 43.75% vice versa but he should've said there's about a 1.6 million pixel difference between them
@Mazeop692 ай бұрын
0:39 That was a little to personal 💀
@cloudyskies-exe8 күн бұрын
Couldnt you have done some color detection? The fruits are all unique colors you could've taken a 500x500 image for example of where the color is and gotten the fruit labeling data that way? Just a thought idk.
@R4in462 ай бұрын
He's him
@GonFrecsses-kl8bx2 ай бұрын
I like that he dosent respect the viewers when they say any bad comments and he doesn't ignore them
@Kon6I98 күн бұрын
You could make the AI not chop the fruits when theres bombs overlapping.
@scorpionhdkid89722 ай бұрын
The AI has not seen Arcade mode. Oh boy..
@thegamerkitten21902 ай бұрын
is this guy just code bullet but not swearing
@smartgamingpotatopotatoz42172 ай бұрын
Domain expansion: The fruit Ninja
@noah27182 ай бұрын
This video is the exact amount of time it takes me to eat a Totino's pepperoni party pizza.
@redhood-n2vАй бұрын
Man I am so dumb I thought the normal version was the run where he reached 488
@thunderd79042 ай бұрын
The fruits and bombs are seemingly predetermined and the same every time, so could you just use reinforcement learning until your AI could get to a score of like 100,000? Also could scanning the screen for non black or non brown pixels work?
@hank41342 ай бұрын
I mean the vid is fine but without any bad/dumb/dark jokes of CodeBullet it just won't cut it
@Herecules2 ай бұрын
Now use it on a anti-aircraft cannon
@henriks50082 ай бұрын
You should program an AI to label the fruits and bombs ;)
@dudical1112 ай бұрын
I would love to see what happens when you train the ai on as low a resolution as you can go on the golden fruit level. I wanna see it obliterate them, dude.
@mr-nafari73552 ай бұрын
lets gooooo a new video
@darkrathwheito98182 ай бұрын
My all time best was 11932 with the best ammount of pomegranate hits being 89, seeing an AI getting 600 with not perfect "technique" makes me cry imagining that in 1 year of development it could become so good that reaching 6 digits would be easy T_T
@xx__miqu__xx38122 ай бұрын
its happening, rise of the machines and fall of the humankind. skynet starts here
@blubaylon27 күн бұрын
These image recognition models have been around for a while lol