AI Destroys a Mobile Game in Real-Time with OpenCV (Object Detection)

Ғылым және технология

Let's create AI that beats a simple game of ZigZag. Can't get that Ultra Rare Trophy? During this video, I show you how to create a powerful AI that can top high scores in the game ZigZag. We will use OpenCV to empower our bot with AI vision and make decisions based off the game inputs!
github.com/ClarityCoders/ZigZag
Want to chat with me and other programmers join our discord!
/ discord

Пікірлер: 452

  • @blazeinhotwings
    @blazeinhotwings2 жыл бұрын

    The amount of people confused by the definition of ai in the comments and “calling him out” really makes me feel bad for the video creator

  • @maxiimized

    @maxiimized

    2 жыл бұрын

    It's annoying when people don't read up on something at least a little before making stupid comments

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I really appreciate this comment. Honestly though if it gets more people into it I can take a little heat. No brain no pain haha... Thanks for watching and commenting.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thank you!

  • @FireDotExe

    @FireDotExe

    2 жыл бұрын

    I actually thought this was just a well made program too, i knew that an Ai is something that needs training such as machine learning and involving generations, so i went to the comment to find an explanation since i'm just a begginner in the programming world, so could you tell me what makes this an Ai?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    @@FireDotExe Of course. Although note I"m not claiming to be a leading expert in the field so take this with a grain of salt. AI is simply the simulation of human intelligence in machines. So in this program... playing the game using simulated mouse inputs! We did this using computer vision and rules. Machine learning on the other hand you are using more of a black-box approach. So you're not telling the computer how to do the job it's learning how to do it by itself.

  • @Noobificado
    @Noobificado2 жыл бұрын

    10:57 69421 gems We were this close to perfection 👌

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I have never been more disappointed with myself. I did however have to move on and code again.

  • @gsas3012

    @gsas3012

    2 жыл бұрын

    😞😞😞😞

  • @cowch3916

    @cowch3916

    2 жыл бұрын

    Top 10 saddest anime moments 😢

  • @amogus7

    @amogus7

    Жыл бұрын

    train the ai to get 69420 points and pause in all games

  • @ultralaggerREV1
    @ultralaggerREV12 жыл бұрын

    Him: “turn off internet to prevent ads!” The fu$&ing game a few seconds later: **play this tank game**

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Changed my mind don't turn off internet keep watching my videos. Thanks for view and comment 😉.

  • @hintofanimage1004

    @hintofanimage1004

    2 жыл бұрын

    Yea it like stores ads for a bit

  • @Squishy_yhsiuqS

    @Squishy_yhsiuqS

    2 жыл бұрын

    Apps like this download 2-3 videos to play if your Internet is off

  • @gorb9944

    @gorb9944

    2 жыл бұрын

    Also some say that you need to the internet in order to play but its only for the ads

  • @thedevildarksoul9727

    @thedevildarksoul9727

    2 жыл бұрын

    Guy you may be, but them cheeks gonna feel what it means to get balls to the walls.

  • @impurpl2
    @impurpl22 жыл бұрын

    no way. i've been playing this game for years and have wondered how an ai would do in it. thanks for the great vid!

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Great minds. Thanks for watching and commenting.

  • @YoungPutter

    @YoungPutter

    2 жыл бұрын

    Why have you played zigzag for years?

  • @lukeyxo

    @lukeyxo

    2 жыл бұрын

    yes i too always play games and wonder how ai would do in it !!!!!!!!!!!!!!!!!!!!!!!!

  • @gabrielandraderosa8622
    @gabrielandraderosa86222 жыл бұрын

    Thanks youtube recomendations, underated channel

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Honestly comment means a lot thanks so much.

  • @Pitiflu909
    @Pitiflu9092 жыл бұрын

    11:02 it recognizes the "C" on score as a circle but not the "O" xD

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Darn AI.

  • @jagaya3662

    @jagaya3662

    2 жыл бұрын

    The first R in "RETRY" also had a circle, the second one however only a line. I think you'd include a minimum distance two objects must have to be considered different objects. You can also see early on how it didn't detect an edge up to the point where it touched the ball but actually had a gap there.

  • @TurtleMaster326
    @TurtleMaster3262 жыл бұрын

    This is an underrated channel, it’s nice to see small channels that also produce quality content

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks that really means a lot to me! Thank you for watching and commenting.

  • @warmpianist
    @warmpianist2 жыл бұрын

    Still wondering, the slope of the lines at the boundaries should be just around 0.5 and -0.5 right? I think you can use edge detection and filter all lines everything that has different slope than that.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    This is a VERY smart comment. A few people have mentioned the idea and it crossed my mind very late in making this video. I decided I didn't want to invest the time to try it but I think it would work.

  • @kbabe3915

    @kbabe3915

    2 жыл бұрын

    I think that on top of this you could detect the intersection point between the left and right lines (if you just made the lines go off to infinity before drawing), and with a static distance from that intersection point determine the ending point of the line. This would in theory fix the opencv "interference" behavior and draw more consistent lines. It'd also make the damn thing perform perfectly

  • @feha92

    @feha92

    2 жыл бұрын

    Yeah, I was surprised when he used a hough-transform, as something similar to Sobel with different kernels (or straight up, what was its name, canny?) should have sufficed quite well (and not resulted in infinite lines). Would be edges and not lines, but it seemed like he used the lines for edge-detection anyway (just painted "hazards" [with binary directions] for the algorithm to trigger direction changes with).

  • @JamesTDG
    @JamesTDG2 жыл бұрын

    It's a pretty good concept, would be interesting to see more visual-based AIs...

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I'm on it. Thanks for watching and commenting.

  • @Pheonix1328
    @Pheonix13282 жыл бұрын

    I play a game called "Cat Jump" and I wonder if this is how people get those insanely high scores... I'm still in the top 1% with my own skills so I'm not too mad if they are cheating xP

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I do feel bad for those people part of the reason why I picked stupid not so popular games.

  • @unpaidintern6652

    @unpaidintern6652

    Жыл бұрын

    @@ClarityCoders I'd say the people who are able to bot those games applied their own skill to the game.

  • @adam4478
    @adam44782 жыл бұрын

    it might be interessting to only keep the lines with a specific angle since each wall are parallel

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Honestly this crossed my mind very late in this project. I think it's a good idea! Thanks for watching / commenting.

  • @Kenshinse312

    @Kenshinse312

    2 жыл бұрын

    Probably the easiest way is to simply remove all vertical lines, all lines that are connected to the underside of the vertical lines. After cleaning the lines, you can also remove the gaps in the edges, I think this will also help. As the next steps, you can also check that there is a full path from the current point to the end of the screen. And clean everything between the two edges ( artifacts from gems for example ).

  • @allak1n
    @allak1n2 жыл бұрын

    Subbed - I'm a dev (work on boring business stuff) but always been curious about vision AI. I think your videos are well explained. Keep it up, I want to see you grow, you deserve it.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Comment really means a lot to me. Thanks for taking the time to watch and leave me a message.

  • @chris_aka_CP
    @chris_aka_CP2 жыл бұрын

    Thanks KZread recom, i really liked the vid and the fact that i see so many answered comments, Shows that you care for community. Subbed

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I honestly really appreciate every view and sub. Thanks for commenting and subscribing.

  • @noobmasterr69
    @noobmasterr692 жыл бұрын

    Great video..for someone getting started with OpenCV this was very entertaining to watch. Subbed!

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thank my man! Really appreciate the sub.

  • @Gaellka
    @Gaellka2 жыл бұрын

    Congrats man. the god of KZread algorithm has chosen you.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thank you KZread overlords. Thanks for watching and commenting my man!

  • @Gaellka

    @Gaellka

    2 жыл бұрын

    @@ClarityCoders no problem ^^

  • @Caterblock

    @Caterblock

    2 жыл бұрын

    Listening to Rick rn

  • @BlobsoR0ck
    @BlobsoR0ck2 жыл бұрын

    Disappointing that i got recommended this video after 6 months, very interesting to see this AI. Although im not a programmer I've always been interested in programming, modeling, and coding a game. Very cool video.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks! I really appreciate the comment and view.

  • @gubiithefish
    @gubiithefish2 жыл бұрын

    This is amazing man;-) Subbed!

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks for sub Emil means a lot.

  • @basilicon.
    @basilicon.2 жыл бұрын

    Can you make an AI that plays Geometry Dash and learns how to get farther after each death? I think it might be really interesting to see the computer's solution to each level.

  • @2-_

    @2-_

    2 жыл бұрын

    something like sethbling's marIO would work for that i think

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Yup probably need to go deep learning but it could be done. I'll put it on my list.

  • @bmanb2099

    @bmanb2099

    2 жыл бұрын

    Instead of wait maybe a month to see it happen why do you try making it in about a year! Much faster

  • @godman1117
    @godman11172 жыл бұрын

    Didnnt even know about the open cv module, might have start learning that, looks pretty useful

  • @kema2240
    @kema22402 жыл бұрын

    This is amazing! One quick question: Can you please share the position & size (in pixels) of your ldplayer? I'd like to adjust my ldplayer accordingly so that I don't have to tune parameters such as those for sct.grab(). Thanks!

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Dang I wish I had thought of that before posting it was on my old laptop. Next time I will post that as well.

  • @tenzinsherap4049
    @tenzinsherap40492 жыл бұрын

    Really thankful for the youtube reccomendation for showing me this video

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    hey thanks for watching I appreciate it.

  • @ronaldoSf
    @ronaldoSf2 жыл бұрын

    This app is so useful to find these values

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I love playing around with it. Thanks for the comment.

  • @Mlafster
    @Mlafster2 жыл бұрын

    Hi, I'm a bit late to the party but I believe there is a version of this game where going left/right is dictated (followed) by changes in music, do you think making an AI/script that plays the game (or any rhythm based game) in a similar fashion is possible? And do you think it would be harder or easier? Audio is easier to process than video for sure but it has its challenges. Just a thought :P

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I'd love to try that game! haha we could use the sound as input right?

  • @Mlafster

    @Mlafster

    2 жыл бұрын

    @@ClarityCoders Yeah of course! Search "Dancing Line" on Google play. This got me thinking about the connection between the visual representation of music and the AI's ability to "see" things.

  • @fabianbleile9467
    @fabianbleile94672 жыл бұрын

    nice video - well done! :) i am new to the topic and wondered if it would be sufficient to check for the direction of the lines plus a min length to get the relevant lines. this should eliminate the diamond lines instead of masking them out. what do u think?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    That's a really good idea someone else mentioned it as well. Towards the end of the project I thought about finding all lines and only keep ones at the angle of the track. It was late and I was over it at that point so I never tried.

  • @WeatherStone
    @WeatherStone2 жыл бұрын

    hey, i made a game called Ready, Set, Roll, for android, its also about a ball, but you need to collect coins and crystals to finish a level, can you beat it with AI?

  • @ldoubleprime1654
    @ldoubleprime16542 жыл бұрын

    As a young dood i am rly interested in coding and tech im glad yt recommended me this yt channel ^w^

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks dood. Keep coding!

  • @volttheprotogen1893

    @volttheprotogen1893

    2 жыл бұрын

    uwu

  • @ldoubleprime1654

    @ldoubleprime1654

    2 жыл бұрын

    @@volttheprotogen1893 uwu

  • @Cod3rMax
    @Cod3rMax Жыл бұрын

    I did implement the same concept on c# i detected the ball and the edges but how can i detect if the ball is close to the edge?

  • @1996Pinocchio
    @1996Pinocchio2 жыл бұрын

    Using opencv to find the ball is nice, but you could also search for black pixels on a set height (presumably on half height). That would be way faster I suppose

  • @matthewstewart5113
    @matthewstewart51132 жыл бұрын

    I Do not understand it, but I can see the future value in it. Keep going. Great video-Thank you

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Awesome I will! Thanks for watching and commenting.

  • 3 жыл бұрын

    Thank you for sharing, I like it. :D

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    I'm glad you like it. Should be plenty more coming soon.

  • @annesophie4037
    @annesophie40372 жыл бұрын

    I'm not really good with the terms or really anything mentioned in the video but it's really interesting to see what an AI can do.

  • @tttam96
    @tttam96 Жыл бұрын

    It's just a thought I'm curious of why you didn't say to avoid the white and stay on the colored path would it be a lot harder to tell it to do that instead of doing it what you just did. For instance as I'm trying to say is you program it to avoid the white void equals death type of thing so it would be focused on staying but you did it in a reverse way

  • @Lebensgott
    @Lebensgott2 жыл бұрын

    cant you improve it with some prediction of the lines? i mean they are always the same angle and lenght (the longer are the one lenght times two or times three)

  • @MsTatakai
    @MsTatakai2 жыл бұрын

    i don't know if it your code is using GPU or not but if you change the saturation on gpu drivers wouldnt affect the code? if i ramp down the saturation down the screen turns black and white... wouldn't that help instead of detecting edges and drew lines instead? black, white and gray is easier to program... maybe not i don't know ...

  • @incine8908
    @incine89082 жыл бұрын

    Hey man, love ur vids. I was wondering if it would be possible to create an AI that can actually read captcha codes (dw its not for anything bad, just a curious mind). Ive seen a couple bots do it and wondered if its possible so went to try and see what they used but didnt really get that far. So could u make a vid showing us how to beat a captcha game with an AI that can read distorted letters from an image? much thanks man, great work on ur vids.

  • @unpaidintern6652

    @unpaidintern6652

    Жыл бұрын

    Probably boat loads of tweaking and huge training sets. But it is definetly possible and the programs became better at doing these text based captchas than humans so we switched to Googles weird meta data and image recogintion ones. And im 100% convinded that Google uses those "select all X" pictues as a pretense to build image recognition sets. They can do it just fine without us having to cllick anything

  • @alohaboomboom8913
    @alohaboomboom8913 Жыл бұрын

    This is what i wanted to learn thanks

  • @Skellitor301_VA
    @Skellitor301_VA2 жыл бұрын

    what's the song at the part that's showing off the bot getting over 1k?

  • @jkl9984
    @jkl99842 жыл бұрын

    That's a very nice video. Was interesting to watch.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks JKL that really means a lot. I appreciate you taking the time to comment.

  • @ozzy1987mr
    @ozzy1987mr Жыл бұрын

    muy buen video explicando detalles importantes... lastimosamente mi ingles es malo pero el traductor algo ayuda... tengo poco tiempo incursionando en este mundo de la IA y tus videos ayudan mucho

  • @lunaroja369gimenez6

    @lunaroja369gimenez6

    4 ай бұрын

    Hola, hablas español? Me dirías si pudiste hacer funcionar este proyecto? Tengo que hacerlo para un juego casi igual

  • @Crashthatch
    @Crashthatch3 жыл бұрын

    How long did it take you to build/test this? Hours? Weeks?

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    Probably 8 hours spread over a few weeks? Basically it was really simple to create the rules and automate it to play repeatedly but dialing in parameters is tough. So I would change some things then let it run for 100 games then change some things.

  • @Diego-Garcia

    @Diego-Garcia

    2 жыл бұрын

    @@ClarityCoders The next step: use a genetic algorithm to look at the best parameters hahahahah

  • @carldressler3262

    @carldressler3262

    2 жыл бұрын

    @@Diego-Garcia Then we would enter machine learning territory!

  • @Resursator
    @Resursator2 жыл бұрын

    Video: turn off the internet to prevent ads!! Me: okay Video: stops

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Whew thought I lost you there glad you got it back! haha

  • @rasmustagu
    @rasmustagu2 жыл бұрын

    Absolutely awesome, coding is something way over my head and I love seeing stuff like this!

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks! Never to late to get involved start small and work your way up!

  • @ZombieChicken-X
    @ZombieChicken-X2 жыл бұрын

    This looks like a fun project Imma try it

  • @Bencehhh123
    @Bencehhh1232 жыл бұрын

    Does anyone know what is the music name which is playing in 10:06 at this video? I really need the name of this song.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Fast and Run - Nico Staf. Thanks for watching and commenting!

  • @Bubs.
    @Bubs.2 жыл бұрын

    my record on there is like 2000- i used to always play that game while listening to audiobooks. probably have logged a ton of hours

  • @Rex_Vulcan
    @Rex_Vulcan2 жыл бұрын

    What is the name of the music in the background at the beginning?

  • @458stanley
    @458stanley2 жыл бұрын

    Loved the video, although I am a bit curious if this could lead to any legal issues. You can probably pay for the diamonds, so is this like a cheat to get around a pay wall that could lead to a lawsuit?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    You might break terms of service and get banned but nothing about it is illegal. Note I'm not a lawyer and this is not legal advice. 😉

  • @tazgirl_
    @tazgirl_2 жыл бұрын

    Seeing people who don’t understand programming argue with you over what an AI is feels bad man, feels like asking any question on stack overflow. Nice video

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks! That's a spot on analogy haha.... Overall though I appreciate the comments and views even the ones complaining about my haircut 😂😂.

  • @cosmilitebar6772
    @cosmilitebar67722 жыл бұрын

    You could try to make an piano tiles ai. That is really simple but still funny to look at. I managed to get around 30 tiles/s with mine.

  • @ductr2hn
    @ductr2hn2 жыл бұрын

    this bring back my memory about dancing line

  • @explosivemonkey4596

    @explosivemonkey4596

    2 жыл бұрын

    That game’s still going I think, god it had such bangers, the design of each stage only got better as you went along! That Easter egg in the maze was heartwarming too

  • @ductr2hn

    @ductr2hn

    2 жыл бұрын

    @@explosivemonkey4596 ok but still can't play it because i using android

  • @explosivemonkey4596

    @explosivemonkey4596

    2 жыл бұрын

    @@ductr2hn I pray for your loss.

  • @TilDrill

    @TilDrill

    2 жыл бұрын

    @@explosivemonkey4596 they flooded it woth ads at some point it got unplayable for me

  • @vinusanker8767
    @vinusanker87673 жыл бұрын

    Discord is fun to hang out and ask doubts people

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    Thanks for watching and commenting!

  • @vinusanker8767

    @vinusanker8767

    3 жыл бұрын

    @@ClarityCoders sure, y not?

  • @devangsharma336
    @devangsharma3363 жыл бұрын

    Hello sir I try this code to run in my computer with same emulator and game but it is showing following error: Traceback (most recent call last): File "D:\photo\ZigZag-master\HighScore.py", line 147, in x = x + 1 NameError: name 'x' is not defined

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    If it doesn't find an x value for the circle this area will pop up. Basically it didn't find the ball on the screen. Make sure your screen grab is covering your emulator area it won't be the same as mine. scr = sct.grab({ 'left': 0, 'top': 390, 'width': 440, 'height': 50 })

  • @tiger-mt4ju
    @tiger-mt4ju2 жыл бұрын

    I'm very glad that you had enough thought to buy all of the balls. Thank you.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I'm all about the balls.

  • @lincolnh2348
    @lincolnh23482 жыл бұрын

    Flappy bird would be a cool one to automate. I don’t think it’s on the App Store anymore though

  • @SamiTheAnxiousBean
    @SamiTheAnxiousBean2 жыл бұрын

    this is really Interasting Great job

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks that means a lot. I got more cool stuff coming out soon!

  • @SamiTheAnxiousBean

    @SamiTheAnxiousBean

    2 жыл бұрын

    @@ClarityCoders im exited for that

  • @mrwait2425
    @mrwait2425 Жыл бұрын

    hi can you make a tutorial that an object trace a line that curves

  • @enderinvader
    @enderinvader2 жыл бұрын

    I'm trying this right now with a game, but I can't seem to get the mouse to click even though it moves to the correct location

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Can you click on anything? Try something other than the game maybe.

  • @enderinvader

    @enderinvader

    2 жыл бұрын

    @@ClarityCoders I actually figured out there is a setting in the emulator that wasn’t letting pyautogui click

  • @paulp1204
    @paulp12043 жыл бұрын

    That's really impressive. I am not sure this is actually a form of AI though, more a well automated script, essentially.

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    By definition it's artifical intelligence though it's not machine learning. I would agree with your point though it's not learning anything.

  • @somdudewillson

    @somdudewillson

    2 жыл бұрын

    AI does not require any form of learning.

  • @SurrealBackrooms

    @SurrealBackrooms

    2 жыл бұрын

    1. AI 2. Machine Learning (a type of AI) 3. Deep Learning (a type of machine learning and AI)

  • @Maric18

    @Maric18

    2 жыл бұрын

    anything that makes decisions to solve a problem is intelligence, and if it is created by humans we call it artificial your phone has several ai systems, even route planning is AI the edges of the definition of ai is fuzzy, but for example the game itself is not ai, although if there are enemies that try to hurt you, or even if the track generator uses tiles you die on more often later in the level and less often earlier, that is ai

  • @Laszer271

    @Laszer271

    2 жыл бұрын

    @@Maric18 as you said the term AI is fuzzy and what we perceive as AI also changes with time. It's similar to technology. Some time ago a pair of scissors could be considered a technology but today we have a much different idea of what technology is.

  • @GageMason
    @GageMason2 жыл бұрын

    There was a game where you jump a bird side to side avoiding spikes that I used to love. I'd love to see it done by ai.

  • @tmnnn

    @tmnnn

    2 жыл бұрын

    flappy bird?

  • @gicudoi2771
    @gicudoi27712 жыл бұрын

    What are the limitations of ai other than processing speed if you optimise the ai to play a 2d fighting game could the ai do it if it had the processing speed

  • @entegi

    @entegi

    2 жыл бұрын

    An AI that is written in C could do it, but Python is too slow to process that much data in rt

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Great question. Even with processing full image data in some games I was able to achieve better than human reaction times. Although as someone mentioned there are faster language choices out there if speed is an issue.

  • @Brandonzv
    @Brandonzv2 жыл бұрын

    What program are you using that is showing each step of the line detection live?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    OpenCV

  • @Brandonzv

    @Brandonzv

    2 жыл бұрын

    @@ClarityCoders Thanks! I was thinking it OpenCV was only a library or something.

  • @daddyofalltrades
    @daddyofalltrades2 жыл бұрын

    Sweet 🔥

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks!

  • @deiviselenis9106
    @deiviselenis91062 жыл бұрын

    Great video!

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thank you for watching I really appreciate it.

  • @akerman_
    @akerman_3 жыл бұрын

    Cool vid dude

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    Thank you!

  • @agentx7138
    @agentx71382 жыл бұрын

    I play the game Scrap II a merging game with multiple upgrade menus that I have wondered if it would be possible to automate.

  • @XaviIntheHouse

    @XaviIntheHouse

    2 жыл бұрын

    the answer is yes

  • @PastyMancer

    @PastyMancer

    2 жыл бұрын

    Scrap II is pogging so hard. 10/10 besties!

  • @silvix3137
    @silvix31372 жыл бұрын

    or you could just do the big where you press on play again and the edge of the screen and you can literally go outside the map and just spam for points

  • @koko_noob8078
    @koko_noob80784 ай бұрын

    Make a video on how to capture the game screen. please

  • @JohnMazz
    @JohnMazz2 жыл бұрын

    I've always wanted to automate some mobile games, cool vid thanks!

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    It's a fun challenge for sure. Thanks for watching and commenting.

  • @JohnMazz

    @JohnMazz

    2 жыл бұрын

    @@ClarityCoders I always comment on videos I want to see more of. Got to train that algorithm!

  • @AntiDroidZ
    @AntiDroidZ2 жыл бұрын

    Great video 😎

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks Zack means a lot.

  • @honeynutios
    @honeynutios2 жыл бұрын

    Ooo can u do an idle fishing game where you drag ur cursor around the screen to catch fish? Id love to see an ai just immediately catch everytging as soon as it pops up

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Probably what's the game called?

  • @rasmussiira9151
    @rasmussiira91512 жыл бұрын

    What is the song in the start

  • @ayushxsharma
    @ayushxsharma Жыл бұрын

    Pls tell how can I run this code and play it

  • @djentslayer
    @djentslayer2 жыл бұрын

    4:00 Haha, you said "balls". All dumb humor aside, this is a really interesting video! I hope this channel gets bigger, you definitely don't have the number of subscribers you deserve, my dude :)

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks KZread has been fun for me doing stupid projects. I'll stick around if a few people keep watching! Thanks for comment/view.

  • @paulyguitary7651
    @paulyguitary76512 жыл бұрын

    I like how Open Source rhymes with Free Course

  • @RandomBubble
    @RandomBubble2 жыл бұрын

    My personal score was 1700 in June 2021. I played it after a few years and instantly got that score. I guess I can’t be better than an AI being lol

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    You're certainly better than me.

  • @Roxst4r17
    @Roxst4r172 жыл бұрын

    Would it simplify things if you searched for hue lines in a specified angle using a simple slope formula to store the initial slope values of the sides of the track? The angle of the path doesn’t seem to change. Furthermore could you specify that it only look for hue lines in the specified angle previously stored. You could further perfect it by storing the width of the hue line just as the angles change on the track. This point would be (what I assume) is the width of the track. Using that value divided by 2 to set your pixel distance out from hue lines and search for hue lines a set distance out past that. I’m not really a programmer and don’t have knowledge of this program specifically just asking based off what I assume is possible. I think this could reduce computational load as well.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Yeah I've had this comment a few times and you guys are correct. I think that would be the easiest way to improve the project.

  • @Roxst4r17

    @Roxst4r17

    2 жыл бұрын

    @@ClarityCoders honestly though thank you for responding I had been wondering. Great videos too! Edit: now subscribed

  • @NECarp
    @NECarp2 жыл бұрын

    Could you try Dunk Shot by Ketchapp really fun game that uses trajectory

  • @masondaniels8675
    @masondaniels86752 жыл бұрын

    Nice video 👍 Neat project

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks! I appreciate the view and comment.

  • @MisterYoda15
    @MisterYoda152 жыл бұрын

    I really want to automate p2w 3D phone games, to perform basic actions such as "gathering resources", "auto attack/defend/whatever" because of the mind-numbing actions you have to perform and the fact that it's literally P2W. It's hard to socialise with people ingame with that sort of system. Would it be possible with detecting the pixels for instance resource piles (if they are always the same value and shape), vehicles for mining (for instance number of sent trucks, ships, whatever), name tags(PVE, maybe PVP if it's online, depending on color which does not change)?

  • @godw1ll99

    @godw1ll99

    2 жыл бұрын

    or you could just play a game that doesnt require an ai to play it for you? you want to "play" a game without actually playing it because the game sucks that bad...

  • @KingofEvil

    @KingofEvil

    2 жыл бұрын

    @@godw1ll99 why even click on this video if you have that mentality? lol

  • @godw1ll99

    @godw1ll99

    2 жыл бұрын

    @@KingofEvil this video is achieving an entirely different goal for a completely different purpose. Its almost 0% comparable to my comment. In this video there was never any desire to play the game the intention was strictly to make an ai. The commenter here has the desire to play a game but doesnt actually wnt to play it. One example is to work to create an ai the other is to use an ai to cheat in a game for him out of laziness. I could try to clarify further but im already being pedantic.

  • @KingofEvil

    @KingofEvil

    2 жыл бұрын

    @godw1ll99 where exactly do you see the comment saying he wants to play the game? All he said was that he wanted to automate certain actions in popular games which are in the „p2w“ genre which might just be a experiment to see how a ai compares to a p2w player for all you know. I do not see a reason for you to lecture someone when you do not even know their intentions correctly. Absolutely pathetic.

  • @godw1ll99

    @godw1ll99

    2 жыл бұрын

    @@KingofEvil my comment was addressing what he said specifically meanwhile you fabricate hypotheticals in order to argue with me and you call me pathetic? he made clear as day what he was wanting to achieve with the first half of his comment. he wants to automate the core functions of a game leaving nothing left but the false satisfaction of having achieved something in the game which makes the entire endeavor meaningless. its no different than people that bot a game like rune scape. the insanity of having the desire to achieve something in a game but not wanting to actually play the game is whats pathetic. "to perform basic actions such as "gathering resources", 'auto attack/defend/whatever' because of the mind-numbing actions you have to perform and the fact that it's literally P2W. It's hard to socialise with people ingame with that sort of system." is the most blatant example that he fully intends on "playing" the game with a side of "automation" to do the grinding for him.

  • @res.1123
    @res.11232 жыл бұрын

    how to train in wave mode on geometry dash

  • @anonymoususer3561
    @anonymoususer35612 жыл бұрын

    What's the song?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I think it was Fast and Run by Nico Staf. Thanks for watching!

  • @gauravrewaliya3269
    @gauravrewaliya32692 жыл бұрын

    please provide a detailed tutorial... you have a lots of knowledge... 🔥🔥🔥🔥🌟🌟🌟🌟🌟

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Thanks! I've been wanting to do a line by line one for a project like this I'll put it in the works.

  • @mrfoucs7574
    @mrfoucs75742 жыл бұрын

    whats the soundtrack at the end of video?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Fast and Run - Nico Staf

  • @vinusanker8767
    @vinusanker87673 жыл бұрын

    Hey, jake, it's me vinu from discord, hope u r well

  • @linus855
    @linus8552 жыл бұрын

    this is very a very amazing video

  • @LiamVDB1
    @LiamVDB12 жыл бұрын

    I don’t think this is really AI tho I might just be dumb but the computer didn’t learn anything on itself he just coded all of the things in himself please correct me if I’m wrong

  • @ChirpFPV

    @ChirpFPV

    2 жыл бұрын

    i think ai and computer learning are different, the ai still made desicions on itself, it just didnt learn new things

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    It's not machine learning but by most definitions it's AI. Yours might be different though and that's fine. AI is giving a machine the ability to perform a task like a human in this case inputting into a human gaming interface. I do have some videos on reinforcement learning as well which is more the AI your thinking (machine learning). Thanks for watching and commenting I appreciate it.

  • @LiamVDB1

    @LiamVDB1

    2 жыл бұрын

    @@ClarityCoders thank you for the info I didn’t know this

  • @thetute59
    @thetute592 жыл бұрын

    Wouldnt it ve possible to have such a record deleted from the leaderboard? Or call the 'account' something obvious 'like AI machinetest NOT human'. Just so a basicly cheated record doesnt persist or is at least given hints to its origin

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Very good point and question. I actually typically reach out to develops and let them know so they can remove it. I'm also usually using fairly extinct games that probably no one will notice.

  • @Chloe-ju7jp
    @Chloe-ju7jp2 жыл бұрын

    How come the mask doesnt remove everything when the color of the world is pink too?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I adjusted the brightness so it didn't effect that world. Thanks for the view/comment!

  • @cg7407
    @cg74072 жыл бұрын

    i think the game called "Rolling Sky" (which is a game commonly played in schools) would be interesting although i dont think it would be very easy since almost every level has different textures especially the event levels and there are many objects that can interact with each other. (You could probably brute force it since the levels are always the same but that would be boring)

  • @angelben24

    @angelben24

    2 жыл бұрын

    You could try and show us 😉

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    I'll check it out and put it on my list!

  • @YukiAttano
    @YukiAttano2 жыл бұрын

    Imagine the old days, where you simply search with a thrid party software for the score value, increase it to something incredible high and die after the first sec. But you got all the ingame money, the highest possible score and be done with the game. in 5 min.

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Those were the days. Cheat engine baby.

  • @rogercruz1547
    @rogercruz15472 жыл бұрын

    Any chance to show us how to do it with an MMORPG without having to read values from RAM?

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Give me one you have in mind and what it would be useful to do. More popular games would be better for me.

  • @rogercruz1547

    @rogercruz1547

    2 жыл бұрын

    @@ClarityCoders I was going to suggest an old one like Tibia or RuneScape. All the modern ones are 3D and visually polluted like Genshin Impact...

  • @deezerload
    @deezerload2 жыл бұрын

    I'm sure your AI had so much fun

  • @ImCxoi

    @ImCxoi

    2 жыл бұрын

    *visual confusion*

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    It did! It slept so well that night all tired from it's big day.

  • @bigm2480
    @bigm2480 Жыл бұрын

    What are you using to code with ?

  • @ClarityCoders

    @ClarityCoders

    Жыл бұрын

    Python - Visual Studio Code is my IDE of choice.

  • @nasuzu4569
    @nasuzu45692 жыл бұрын

    9:57 music name pls?

  • @toprakdikici9459
    @toprakdikici94593 жыл бұрын

    cool project

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    Thanks! Really glad you enjoyed it. Lots more coming soon.

  • @legend0.
    @legend0.2 жыл бұрын

    this video was really cool

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Mean a lot! Thanks for commenting Legend!

  • @ayushxsharma
    @ayushxsharma Жыл бұрын

    Bro how do I run this code

  • @americoperez810
    @americoperez8102 жыл бұрын

    Can you do this for "Like a Dino"

  • @mqhasrul5326
    @mqhasrul53262 жыл бұрын

    Pls show how to use on android phone

  • @kasiorap
    @kasiorap2 жыл бұрын

    let me grab my "here before this channel gets 1m subs" chair

  • @ClarityCoders

    @ClarityCoders

    2 жыл бұрын

    Hope you're right 😉. If not glad people are enjoying it! Thanks for watching and commenting.

Келесі