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

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 451

  • @blazeinhotwings
    @blazeinhotwings 3 года назад +1078

    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 3 года назад +131

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +190

      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  3 года назад +77

      Thank you!

    • @FireDotExe
      @FireDotExe 3 года назад +29

      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  3 года назад +60

      @@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
    @Noobificado 3 года назад +774

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +180

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

    • @gsas3012
      @gsas3012 3 года назад +5

      😞😞😞😞

    • @cowch3916
      @cowch3916 3 года назад +4

      Top 10 saddest anime moments 😢

    • @amogus7
      @amogus7 Год назад

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

  • @impurpl2
    @impurpl2 3 года назад +478

    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  3 года назад +32

      Great minds. Thanks for watching and commenting.

    • @YoungPutter
      @YoungPutter 3 года назад +9

      Why have you played zigzag for years?

    • @lukeyxo
      @lukeyxo 3 года назад

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

  • @ultralaggerREV1
    @ultralaggerREV1 3 года назад +449

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +50

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

    • @hintofanimage
      @hintofanimage 3 года назад +3

      Yea it like stores ads for a bit

    • @Squishy_yhsiuqS
      @Squishy_yhsiuqS 3 года назад +12

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

    • @gorb9944
      @gorb9944 3 года назад +1

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

    • @thedevildarksoul9727
      @thedevildarksoul9727 3 года назад +1

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

  • @gabrielandraderosa8622
    @gabrielandraderosa8622 3 года назад +107

    Thanks youtube recomendations, underated channel

    • @ClarityCoders
      @ClarityCoders  3 года назад +9

      Honestly comment means a lot thanks so much.

  • @TurtleMaster326
    @TurtleMaster326 3 года назад +31

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +3

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

  • @Pitiflu909
    @Pitiflu909 3 года назад +67

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +8

      Darn AI.

    • @jagaya3662
      @jagaya3662 3 года назад

      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.

  • @chris_aka_CP
    @chris_aka_CP 3 года назад +2

    Thanks RUclips 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  3 года назад +1

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

  • @warmpianist
    @warmpianist 3 года назад +113

    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  3 года назад +61

      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 3 года назад +7

      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 3 года назад +1

      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
    @JamesTDG 3 года назад +33

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +4

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

  • @allak1n
    @allak1n 3 года назад +4

    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  3 года назад +2

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

  • @Pheonix1328
    @Pheonix1328 3 года назад +110

    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  3 года назад +25

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

    • @unpaidintern6652
      @unpaidintern6652 2 года назад

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

  • @adam4478
    @adam4478 3 года назад +41

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +11

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

    • @Kenshinse312
      @Kenshinse312 3 года назад +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 ).

  • @noobmasterr69
    @noobmasterr69 3 года назад +4

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

      Thank my man! Really appreciate the sub.

  • @Gaellka
    @Gaellka 3 года назад +22

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +6

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

    • @Gaellka
      @Gaellka 3 года назад +1

      @@ClarityCoders no problem ^^

    • @Caterblock
      @Caterblock 3 года назад

      Listening to Rick rn

  • @BlobsoR0ck
    @BlobsoR0ck 3 года назад +1

    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  3 года назад

      Thanks! I really appreciate the comment and view.

  • @paulp1204
    @paulp1204 3 года назад +100

    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 года назад +104

      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 3 года назад +28

      AI does not require any form of learning.

    • @SurrealBackrooms
      @SurrealBackrooms 3 года назад +18

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

    • @Maric18
      @Maric18 3 года назад +7

      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 3 года назад +4

      @@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.

  • @ozzy1987mr
    @ozzy1987mr 2 года назад +1

    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

    • @Mily-ASMR-Love
      @Mily-ASMR-Love 10 месяцев назад

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

  • @ldoubleprime1654
    @ldoubleprime1654 3 года назад +11

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

  • @basilicon.
    @basilicon. 3 года назад +18

    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-_ 3 года назад +5

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +8

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

    • @bmbqt
      @bmbqt 3 года назад

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

  • @tenzinsherap4049
    @tenzinsherap4049 3 года назад +2

    Really thankful for the youtube reccomendation for showing me this video

    • @ClarityCoders
      @ClarityCoders  3 года назад

      hey thanks for watching I appreciate it.

  • @ronaldoSf
    @ronaldoSf 3 года назад +5

    This app is so useful to find these values

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

  • @tazgirl_
    @tazgirl_ 3 года назад

    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  3 года назад

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

  • @gubiithefish
    @gubiithefish 3 года назад +3

    This is amazing man;-) Subbed!

  • @matthewstewart5113
    @matthewstewart5113 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

      Awesome I will! Thanks for watching and commenting.

  • @RandomBubble
    @RandomBubble 3 года назад +3

    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

  • @godman1117
    @godman1117 3 года назад

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

  • @ductr2hn
    @ductr2hn 3 года назад +3

    this bring back my memory about dancing line

    • @explosivemonkey4596
      @explosivemonkey4596 3 года назад

      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 3 года назад

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

    • @explosivemonkey4596
      @explosivemonkey4596 3 года назад

      @@ductr2hn I pray for your loss.

    • @TilDrill
      @TilDrill 3 года назад

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

  • @annesophie4037
    @annesophie4037 3 года назад

    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.

  • @rasmustagu
    @rasmustagu 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

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

  • @Resursator
    @Resursator 3 года назад +4

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

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

  • @Mlafster
    @Mlafster 3 года назад +5

    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  3 года назад +2

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

    • @Mlafster
      @Mlafster 3 года назад +1

      @@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.

  • @Crashthatch
    @Crashthatch 3 года назад +22

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +20

      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 3 года назад +1

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

    • @carldressler3262
      @carldressler3262 3 года назад +1

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

  • @1996Pinocchio
    @1996Pinocchio 3 года назад

    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

  • @GageMason
    @GageMason 3 года назад

    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 3 года назад

      flappy bird?

  • @devangsharma336
    @devangsharma336 3 года назад +8

    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  3 года назад +4

      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
      })

  • @kema2240
    @kema2240 3 года назад +3

    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  3 года назад +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.

  • @Bubs.
    @Bubs. 3 года назад

    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

  • @WeatherStone
    @WeatherStone 3 года назад +2

    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?

  •  3 года назад +3

    Thank you for sharing, I like it. :D

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

  • @cg7407
    @cg7407 3 года назад +4

    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 3 года назад

      You could try and show us 😉

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

  • @djentslayer
    @djentslayer 3 года назад

    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  3 года назад

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

  • @vinusanker8767
    @vinusanker8767 3 года назад

    Discord is fun to hang out and ask doubts people

  • @vinusanker8767
    @vinusanker8767 3 года назад +2

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

  • @tiger-mt4ju
    @tiger-mt4ju 3 года назад

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

  • @cosmilitebar6772
    @cosmilitebar6772 2 года назад

    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.

  • @lincolnh2348
    @lincolnh2348 3 года назад

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

  • @jkl9984
    @jkl9984 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

  • @JohnMazz
    @JohnMazz 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

    • @JohnMazz
      @JohnMazz 3 года назад

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

  • @kasiorap
    @kasiorap 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

  • @458stanley
    @458stanley 3 года назад +1

    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  3 года назад +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. 😉

  • @Bencehhh123
    @Bencehhh123 3 года назад +2

    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  3 года назад +3

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

  • @fabianbleile9467
    @fabianbleile9467 3 года назад

    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  3 года назад +1

      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.

  • @SamiTheAnxiousBean
    @SamiTheAnxiousBean 3 года назад +1

    this is really Interasting
    Great job

    • @ClarityCoders
      @ClarityCoders  3 года назад

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

    • @SamiTheAnxiousBean
      @SamiTheAnxiousBean 3 года назад

      @@ClarityCoders im exited for that

  • @FayeBae69
    @FayeBae69 3 года назад +1

    This is going to destroy most if not all FPS games out there. Being able to detect enemies via screen capture and then automatically inputting the correct keys to shoot targets is going to be deadly accurate and a completly undetectable way to cheat.

    • @ClarityCoders
      @ClarityCoders  3 года назад

      It's not there yet but it's getting easier for non programmers to do as well. It will be something that is an issue in gaming in 2 - 5 years. Not that it isn't already but it will be so wide spread.

    • @ShivamJha00
      @ShivamJha00 3 года назад

      LoL no. A good anticheat can detect whether you're cheating or not based of your aim. A human aim is bit shaky makes errors, a robotic aim is very precise and can be pretty easily detected

    • @ClarityCoders
      @ClarityCoders  3 года назад

      @@ShivamJha00 You would have to mimic pro-level accuracy. Basically intentionally making it shaky and a bit random.

  • @LiamVDB1
    @LiamVDB1 3 года назад +2

    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 3 года назад +2

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

      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 3 года назад +1

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

  • @ZombieChicken-X
    @ZombieChicken-X 3 года назад

    This looks like a fun project Imma try it

  • @programuoki-lt1465
    @programuoki-lt1465 3 года назад +1

    All Games is oriented to TAP TAP TAP or keyboard and mouse click click. Basically easiest way to make bots. Need normal games where you need to think...

    • @ClarityCoders
      @ClarityCoders  3 года назад

      I get what your saying but actually Zig Zag was one of the hardest way harder than Fall Guys. You need to have such a quick script and react to the changing colors of the environment. Thanks for watching/commenting I really appreciate it.

  • @YukiAttano
    @YukiAttano 3 года назад

    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  3 года назад +1

      Those were the days. Cheat engine baby.

  • @Chloe-ju7jp
    @Chloe-ju7jp 3 года назад +1

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +2

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

  • @incine8908
    @incine8908 3 года назад +1

    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 2 года назад

      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

  • @zskull162
    @zskull162 3 года назад +1

    There a game similar to zigzag called “Dancing line” and it has a ton of levels with lots of different music, and it’s a lot better than zigzag

    • @ClarityCoders
      @ClarityCoders  3 года назад

      Could maybe do a follow up on it. Thanks for commenting and watching.

  • @gauravrewaliya3269
    @gauravrewaliya3269 3 года назад +1

    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.

  • @alohaboomboom8913
    @alohaboomboom8913 2 года назад

    This is what i wanted to learn thanks

  • @tttam96
    @tttam96 2 года назад

    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

  • @MisterYoda15
    @MisterYoda15 3 года назад +4

    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 3 года назад +1

      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 3 года назад +1

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

    • @godw1ll99
      @godw1ll99 3 года назад

      @@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 3 года назад +1

      @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 3 года назад

      @@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.

  • @paulyguitary7651
    @paulyguitary7651 3 года назад

    I like how Open Source rhymes with Free Course

  • @thetute59
    @thetute59 3 года назад +2

    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  3 года назад

      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.

  • @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?

  • @Skellitor301_VA
    @Skellitor301_VA 3 года назад

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

  • @athanasiosp.
    @athanasiosp. 3 года назад

    I remember that game. I played it at my free time when I did not have enough time for something bigger like on the pc. I actually reached the 1000 point mark and played until I got all balls and stopped haha.

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

      You are a stud. I literally never improved I must not have the attention span or reflexes in my old age.

    • @athanasiosp.
      @athanasiosp. 3 года назад

      @@ClarityCoders Its super repetitive in a bad way, like wait until the turn and just tap once or you lose and when multiple turns appear you can easily lose track of how many times you have to tap. I just like everything that can be challenging and try it until I win it or at least know how to play it well. The code was more interesting as always compared to me just mastering this game hahaha.

  • @enderinvader
    @enderinvader 3 года назад +1

    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  3 года назад

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

    • @enderinvader
      @enderinvader 3 года назад

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

  • @lineage254
    @lineage254 3 года назад

    Awesome video and about the comments debate, this is an AI, a basic one ,but an AI nonetheless Machine Learning or Deep Learning are just "smarter" types of AI, you can think of them as ppl with higher IQ that can learn complicated task or things on their own with out guidance, so you dont have to "teach" (Code) the AI what to do, they are smart enough to learn on their own.

  • @akerman_
    @akerman_ 3 года назад +1

    Cool vid dude

  • @zaclanderos1624
    @zaclanderos1624 3 года назад

    If you want a bigger challenge, you can try Cosmo Run ;)

    • @zaclanderos1624
      @zaclanderos1624 3 года назад

      Amaizing job btw

    • @ClarityCoders
      @ClarityCoders  3 года назад

      I'll put it on my list of games! Thanks for watching / commenting.

  • @_ritikulous_
    @_ritikulous_ 3 года назад +3

    My score in zig zag is around 1800 +

    • @ClarityCoders
      @ClarityCoders  3 года назад +2

      dang it! now I'm going to have to hit this project again haha

    • @_ritikulous_
      @_ritikulous_ 3 года назад

      @@ClarityCoders hahaha!... Love your work man

    • @ClarityCoders
      @ClarityCoders  3 года назад

      appreciate the view thank you.

  • @dazziedez
    @dazziedez 3 года назад

    I'm sure your AI had so much fun

    • @ImCxoi
      @ImCxoi 3 года назад

      *visual confusion*

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

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

  • @deiviselenis9106
    @deiviselenis9106 3 года назад

    Great video!

    • @ClarityCoders
      @ClarityCoders  3 года назад

      Thank you for watching I really appreciate it.

  • @iuxanu
    @iuxanu 3 года назад

    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

  • @honeynutios
    @honeynutios 3 года назад

    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

  • @Lebensgott
    @Lebensgott 3 года назад

    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)

  • @rikisu.
    @rikisu. 3 года назад +1

    This video was great by itself but what I'm appalled by is that you still reply to comments... The amount of patience and dedication! Damn

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

      I'm amazed people watch my videos let alone comment on them. I truly appreciate every one of them even the ones making fun of my unibrow😂. Thanks for the comment and the view!

  • @ClemensAlive
    @ClemensAlive 3 года назад +3

    cool program. but where's the ai?

    • @ClarityCoders
      @ClarityCoders  3 года назад +5

      No machine learning in this one just rules based AI. Machine learning is a subset of AI. Thanks for watching and commenting means a lot.

    • @oPers0n
      @oPers0n 3 года назад +1

      you just don't know the definition of an AI

    • @ClarityCoders
      @ClarityCoders  3 года назад +2

      @@oPers0n If only I had some person to teach me. Thanks for watching and commenting.

    • @PastyMancer
      @PastyMancer 3 года назад +3

      @@oPers0n If you Google it, what comes up is "Artificial intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions." I'd say this would be an AI.

    • @oPers0n
      @oPers0n 3 года назад +2

      @@PastyMancer but I agree with you, my comment was for OP

  • @Brandonzv
    @Brandonzv 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

      OpenCV

    • @Brandonzv
      @Brandonzv 3 года назад

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

  • @linus855
    @linus855 2 года назад

    this is very a very amazing video

  • @AntiDroidZ
    @AntiDroidZ 3 года назад

    Great video 😎

  • @agentx7138
    @agentx7138 3 года назад +1

    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 3 года назад

      the answer is yes

    • @PastyMancer
      @PastyMancer 3 года назад

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

  • @Roxst4r17
    @Roxst4r17 3 года назад

    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  3 года назад

      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 3 года назад

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

  • @Rex_Vulcan
    @Rex_Vulcan 3 года назад

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

  • @MsTatakai
    @MsTatakai 3 года назад

    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 ...

  • @legend0.
    @legend0. 3 года назад

    this video was really cool

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

      Mean a lot! Thanks for commenting Legend!

  • @Djbushido1
    @Djbushido1 4 месяца назад

    I really need a beginners tutorial on how to automate android games, teaching us how to do it, not just showing us what you did

  • @xylxylxylxyl
    @xylxylxylxyl 3 года назад

    Nice video 👍
    Neat project

    • @ClarityCoders
      @ClarityCoders  3 года назад

      Thanks! I appreciate the view and comment.

  • @quandaledingle4299
    @quandaledingle4299 3 года назад

    Turn of wifi & Turn on Airplane mode
    ads are gone intirely

  • @toprakdikici9459
    @toprakdikici9459 3 года назад +4

    cool project

    • @ClarityCoders
      @ClarityCoders  3 года назад +1

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

  • @gicudoi2771
    @gicudoi2771 3 года назад +1

    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 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад

      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.

  • @koko_noob8078
    @koko_noob8078 9 месяцев назад

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

  • @ЗакировМарат-в5щ
    @ЗакировМарат-в5щ 3 года назад

    Determine these parameters is pain, but unfortunately RL approach is seems to impossible because game itself is too slow to generate sufficient number of train examples for purely CNN model.

    • @ClarityCoders
      @ClarityCoders  3 года назад

      Yeah unless you recreate the game and play frame by frame. That's why Code bullet builds a lot of his games from scratch.

  • @Camphreneas
    @Camphreneas 3 года назад

    Huh…Dancing Line before it was a line…or a rhythm game.

    • @ClarityCoders
      @ClarityCoders  3 года назад

      I've had this request before I think.

  • @rogercruz1547
    @rogercruz1547 3 года назад

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

    • @ClarityCoders
      @ClarityCoders  3 года назад

      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 3 года назад

      @@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...