Coding Challenge

Sdílet
Vložit
  • čas přidán 25. 08. 2024

Komentáře • 326

  • @jmanh128
    @jmanh128 Před 5 lety +634

    I love how coding CZcamsrs reference each other haha. Code Bullet just recommend you a few weeks ago (I've been subscribed to both for a long time).

  • @sinom
    @sinom Před 5 lety +240

    Starting the video with "so that was fake" on April 1st

  • @domninin
    @domninin Před 5 lety +218

    It's funny how Code Bullet shouted you out a week ago and now you independently do the same a week later

  • @theskyisbluetonight4203
    @theskyisbluetonight4203 Před 3 lety +4

    In case you are still wondering why up and down are flipped. it's the processing gridding system. it considers positive y in the down direction. draw a line to see that yourself.

  • @up4life108
    @up4life108 Před 5 lety +11

    Right as a start getting into the theory behind neural nets and maschine learning you give me new material. Very much appreciated!

  • @CoxTH
    @CoxTH Před 5 lety +91

    Can we just call the green side the invisible side from now on?

  • @elymajdou5668
    @elymajdou5668 Před 5 lety +15

    I love how passionate you are about what you’re doing. It is such a good energy and it motivates me to learn more and watch more of your videos. Keep it up, sir. Thank you and good luck.

  • @RicoGalassi
    @RicoGalassi Před 5 lety +6

    Absolutely love watching your enthusiasm and success in coding these programs. Wish I had as much knowledge and skill as you do! Keep on chuggin!

  • @SunHunter27
    @SunHunter27 Před 5 lety +4

    Good luck with this project :)
    some tips:
    - The center of a face does not need to be aligned along all axis for the cube to be solved. In other words: the green side of the the cubie at the center of the white face is not required to point in the green direction.
    The same goes for the center cubie you made, but for all its 3 axis.
    - There are configurations of the rubicks cube that are 'unsolvable'.

    • @jorgenfischer
      @jorgenfischer Před 5 lety

      Yes, but only if you randomly assign color to different faces.
      THe main issue i have with the way he is attacking this, is that f.eks: the color-combination of a certain corner will never change. It will always be red, green, yellow.
      I would have 8 corner pieces, 6 centers, and 12 edges. Color-code them correctly, arrange them correctly and start from there.

  • @yrussq
    @yrussq Před 4 lety +2

    I'd say this is the most obscure and complex draw routine of the cube i've ever met. Maybe i'm not getting the ingenuity of the solution because of the further ideas of how the solver should process it but for now i'd call it counterintuitive.

  • @PanGuy_
    @PanGuy_ Před 5 lety +60

    "I'll fix that up when I refactor that later"
    sounds like he'll absolutely never do that but ok

  • @jman5X5
    @jman5X5 Před 2 lety +3

    Been a long time Code Bullet fan and have found your content recently. Love your enthusiasm and the effort put into all your videos!

  • @ffggddss
    @ffggddss Před 5 lety +4

    Super! The start of another journey/adventure I just know I'm gonna love!
    NB: In the original Rubik's Cubes, ca. 1979-80, the color arrangement differed slightly from the way it is now. At some point, for some mysterious, unknown reason, the yellow & blue faces swapped places. F'rinstance, you could orient the cube with:
    UP = white, DN = blue
    FRT = yellow, BAK = green
    RT = orange, LEFT = red
    That's still the way I think of the thing.
    Fred

  • @kupermen5567
    @kupermen5567 Před 5 lety +90

    I have already watched the livestream why am I here XD

  • @sawang6805
    @sawang6805 Před 5 lety +6

    LOL i’m literally coding that for a project in school it will be a huge help ty

  • @fiveoneecho
    @fiveoneecho Před 5 lety +16

    That was an amazing intro! xD
    “Ahah!”
    “...that was fake.”

  • @zacharymcarthur9013
    @zacharymcarthur9013 Před 5 lety +8

    It might have been easier to instead of thinking of white as top yellow as bottom green as front blue back etc. to instead think of white always being opposite yellow. Blue always being opposite green. Red always being opposite orange. There is no real “top” of a Rubik’s cube. “White being top” is just a convention for new cubers to learn to solve the Rubik’s cube. When I learned green was top
    This also might make implementing the solve easier by allowing the computer to determine the most efficient top. Meaning, white only has a 1/6 chance of being the most efficient cross to solve. Might be a good project for us to implement later or something that happens if you ever decide to refactor this later.

    • @0cs025
      @0cs025 Před 5 lety

      but you also run into the problem like what happened in the video where the colors red and orange are swapped in positions even though they are still opposite to each other, though it would still look like a rubiks cube, it doesn't resemble the actual real life rubiks cube.

    • @zacharymcarthur9013
      @zacharymcarthur9013 Před 5 lety

      Joshua Ocso that wouldn’t be a problem as long as you rendered the cube correctly. I agree the first time you have to make sure it resembles a legit cube. However after that the code isn’t going to rewrite itself. It’ll stay that way then Up, down, left, right, front back are variables open for movements. Which is more in line with cubing. U/D/L/R/F/B are moves. Not colors.

  • @sorinvestemean9686
    @sorinvestemean9686 Před 5 lety +2

    As a cuber and junior programeer this is so enjoyable. Love you Shifman!

  • @AleksanderFimreite
    @AleksanderFimreite Před 5 lety +8

    hmm, i believe the terminology would be something like:
    (x, y, z) or (width, height, depth) or (columns, rows, layers)

  • @codeline4270
    @codeline4270 Před 5 lety +1

    Really interesting to see what we can do with lines of codes,never thought a rubik cube can be made through it virtually.Really amazing!

  • @zinsy23
    @zinsy23 Před 5 lety +4

    When there is something wrong, I love how quickly you tend to figure out the issue! By the way, could you do a challenge on the game arcanoids sometime? I think it would be really cool if you incorporated power-ups as well!

    • @ffggddss
      @ffggddss Před 4 lety +6

      Yes, he sometimes solves issues in real time; but sometimes, he cuts, takes an unknown time to figure out the problem then restarts the vid with remedy in hand, making it look like it was solved instantly. But this is a plus; it keeps the viewer's train of thought from getting derailed.
      And all in all, he's quite fast at all this.
      Fred

  • @jensBendig
    @jensBendig Před 4 lety +1

    I coded this too, in the 80s on a VIC20! I still love the topic.

  • @anthonytetreau522
    @anthonytetreau522 Před 5 lety +1

    I love all the sharing of other youtubers, I have been watching you for well over a year now. Find code bullet and begin watching him since his start.
    Keep the love going!

  • @gameglitcher
    @gameglitcher Před 4 lety +1

    I tried making a rubix cube with 27 pieces which would all have an initial position and pattern. Each piece will either go up/down or left/right. On each rotation, 8 pieces are moved. Corners can have 8 possible locations with a few rotations to them.. Morale of the story is I need a giant whiteboard to draw out this logic lol.

  • @Daszkal
    @Daszkal Před 3 lety +1

    I usually refer to the Z-axis as "bays" (vs rows and columns), but I have no idea if that's right or where I picked that up.

  • @malevolantangel9483
    @malevolantangel9483 Před 4 lety

    As soon as the video popped up I immediately though of code bullet!! And then you reference him lol I love his videos and it really drives me to learn more coding and AI related stuff and then love your channel for the explanation on just about every step which helps with how I learn!

  • @oofusmcdoofus
    @oofusmcdoofus Před 5 lety +2

    Daniel: Makes a program to solve rubiks cube
    Daniel: I dont know how Java works

  • @natmath2576
    @natmath2576 Před 5 lety +1

    I'v recently finished coding a program that can solve a cube in the sameway a humain does it, so this series is going to be really interestin to me

  • @XeartyBG
    @XeartyBG Před 5 lety

    I've failed to find a good rubik's cube simulator for the times when I'm missing mine. It's really enjoyable to watch you make it. I fucking love you! Keep it up!

  • @shivampoke
    @shivampoke Před 5 lety +1

    Omg

  • @private-eye
    @private-eye Před 4 lety +2

    at 11:09 i used: float offset = ( dim * len) / 3;
    This also works to center the cube...

    • @samsloot
      @samsloot Před 4 lety

      Why are you (and he) doing it like that? dim = 3, so you are just saying 3* len/3, which is equal to len. Why not just use len as offset, instead of calculating it?

    • @ffggddss
      @ffggddss Před 4 lety

      @@samsloot As I said in my reply to your other comment, dim won't always be 3; it can also be 2, 4, 5, 6, ... for cubes of other sizes.
      And Hans' formula won't work unless dim is 3, so Coding Train's formula *is* needed for the general case:
      offset = (dim - 1) * len / 2
      Fred

    • @samsloot
      @samsloot Před 4 lety +1

      @@ffggddss thank you!

    • @ffggddss
      @ffggddss Před 4 lety

      @@samsloot You're welcome.
      Of course, for cases other than dim = 3, lots of other parts of this code would have to be re-written, anyway.
      But that's Coding Train's wheelhouse (or rail yard?), so, no problem!
      Fred

  • @tiosam1426
    @tiosam1426 Před 5 lety +1

    Code Bullet is definitely a channel I would recomend with no doubt

  • @liladu_
    @liladu_ Před 4 lety +1

    petition for making this guy the president

  • @vizionthing
    @vizionthing Před 5 lety +33

    PART 2
    PART 2
    PART 2
    PART 2
    PART 2
    PART 2
    PART 2
    this is not binge watching on netflix :(

  • @everythingtips2604
    @everythingtips2604 Před 3 lety

    Best coding video !! Keep it up

  • @Toopa88
    @Toopa88 Před 5 lety +1

    0:28 it's so funny that I coincidentally did the very same thing. My best time is 54 seconds, but right now I learn to do first 2 layers differently so my average has dropped by 30 seconds or so :)

  • @g0shig0shi
    @g0shig0shi Před 5 lety +2

    fantastic teacher! hope to see you soon:)
    here from japan.

  • @Anik70053
    @Anik70053 Před 4 lety

    Processing is a great platform. ALL THANKS TO YOU for using this and also inspiring us to create great applications. I wish I had known it before.

  • @holyshit922
    @holyshit922 Před rokem

    21:00 use your math and you be able to use loops
    for example in y-fixed and color dwn we have
    sqrt(2)cos(5*pi/4)*r , -r , sqrt(2)sin(5*pi/4)*r
    sqrt(2)cos(7*pi/4)*r , -r , sqrt(2)sin(7*pi/4)*r
    sqrt(2)cos(9*pi/4)*r , -r , sqrt(2)sin(9*pi/4)*r
    sqrt(2)cos(11*pi/4)*r , -r , sqrt(2)sin(11*pi/4)*r
    ad we are able to construct the loop

  • @RobbyBobbyBoy
    @RobbyBobbyBoy Před 5 lety

    I've just started to find situations at work where neural networks could be useful but I didn't know how to implement them, so I'm excited to see where this goes!

  • @lucase6077
    @lucase6077 Před 5 lety +2

    Hey Dan, I'm currently going through your "Programming with Text" playlist but I encountered a problem on this video: "1.4: Getting Text from User: Loading a Text File". My code works fine and is shown on the console perfectly but the page won't show it (the page is just blank). Do you know why this is happening? I'm running a node HTTP server as you showed in a previous video in the same playlist. I'd really like to continue watching the next videos but I don't want to skip this lesson. Could you help me out?

  • @zarcvdeveloper1565
    @zarcvdeveloper1565 Před 5 lety +1

    hahahahah. useful for our project. thanks hahaha I learned and had so much fan hehehe, I'm Rubik's Cube Solver tooo for around 6 years

  • @vadsavin
    @vadsavin Před 5 lety +1

    Make a video about threads in processing or p5.js. I think, it would be interesting to know how to solve different problems sing threading.

  • @AHelpingHand
    @AHelpingHand Před 5 lety +1

    I've just started learning to program with a CS50 course at edX a couple weeks ago. So while I understand some of the terms, I'm having a hard time understanding the concepts. I have no clue how he knows what to do, or how to express it. And the frustrating part? I can solve a Rubik's cube with one hand in less than two minutes. lol

    • @PMA_ReginaldBoscoG
      @PMA_ReginaldBoscoG Před rokem

      It's just programming jargon; try to watch videos by Indian CS lecturers. They may help you a lot.

  • @Shami3
    @Shami3 Před 5 lety +9

    Why don't do a Video with Code Bullet? Maybe a Challenge where there is one specific Problem or Task and the one with the best/fastest solution wins :) I would Love to see that

    • @leonk6950
      @leonk6950 Před 5 lety +3

      It'd have to be super funny, having shiffman just normally talking in front of his Greenscreen and codebullets avatar jumping around him 😂😂

  • @LandinngGear
    @LandinngGear Před 4 lety

    Just coming across this and being subscribed to code bullet. Shout out

  • @steakiefrags1866
    @steakiefrags1866 Před 5 lety +1

    Wow im very excited for part 2, i would have never been able to to do thid

  • @dannyt1000
    @dannyt1000 Před 3 lety +1

    Great video! Thanks, I noticed that you just could write. "float offset = len" because dim=3, so (dim - 1) * len * 0.5 = len

  • @byon3421
    @byon3421 Před 5 lety +2

    because of this, i'm starting to love programming. oh god!

  • @geoffwagner4935
    @geoffwagner4935 Před 7 měsíci

    These new Raspberry Pi 5 are hardcore. I have my youtube at 1080 for coding train and processing open on a 4k tv. this 3d cube may be smoother than my nvidia 770. these things are amazing.

  • @person4119
    @person4119 Před 3 lety

    when solving yellow is on top but when scrambling white is on top

  • @harsh5139
    @harsh5139 Před 4 lety

    Plot twist : Code Bullet is actually the Coding Train

  • @VivaldoRoqueSpeedCuber
    @VivaldoRoqueSpeedCuber Před 5 lety +1

    Waiting for the project of the rubiks cube to be complete.
    I like this puzzle explodes my mind more with programming a beauty.
    My Record is 13s. But my average is 19s to 23s

  • @exesy5431
    @exesy5431 Před 5 lety +1

    Lovely video, I got a challenge for you: draw an atom animation! :D

  • @carloverhamme163
    @carloverhamme163 Před 5 lety

    17:58 You're just like a pirate xD "ARR"

  • @celadon2048
    @celadon2048 Před 5 lety +1

    I've been working on my own Rubik's cube app in JS, and it's cool to see your approach to it. If you want to draw inspiration from it or critique it, it's on wayofmath.com (no ads, so no revenue). I made it in three.js. It is less about simulating the cube and more about teaching how to solve it. I want to add the ability for the user to use their webcam to input their cube, and be shown how to solve their particular case. So I've been watching your color/motion detection videos to figure that out.

  • @stanleythehandsome5402

    This guy would be the most loved teacher ever

  • @conorraesimpson5897
    @conorraesimpson5897 Před 2 lety

    The green screen headband has a new brother, the green square lol

  • @geoffwagner4935
    @geoffwagner4935 Před 7 měsíci

    My regular gaming desktop is usually never off. the last 30 days it's almost never been on over the Raspberry 5.

  • @JJCUBER
    @JJCUBER Před 5 lety +13

    APRIL FOOOOLLLLS!! He isn’t gonna change the inside colors 🤫😈

  • @gabrieltenorio3517
    @gabrieltenorio3517 Před 5 lety

    veo estos vides para practicar ingles y al mismo tiempo conocer mas acerca de la logica de programación 😁

  • @mutated__donkey5840
    @mutated__donkey5840 Před 5 lety

    I heckin love this

  • @JarppaGuru
    @JarppaGuru Před 2 lety

    23:24 if(pos.x==len){fill...vertex...} if(pos.x==-len){fill...vertex...}

  • @S197Bryan
    @S197Bryan Před 5 lety +1

    I love this, especially that you're using Java cause I'm actually learning Java now and this is helpful

    • @jakubsebek
      @jakubsebek Před 5 lety +1

      There are some differences between Java and Processing tho

    • @S197Bryan
      @S197Bryan Před 5 lety +2

      @@jakubsebek Yeah I noticed that. But the syntax is still very close which is great cause I am able to understand everything he is doing. I want to get into processing but I'll do it when I learn more java.

  • @byon3421
    @byon3421 Před 5 lety

    thanks for making programming looks fun!!

  • @aarond309
    @aarond309 Před 4 lety

    Lol I independently found code bullet, then later as I got more interested in programming, found you... I didn’t see his video until now, and I’m not seeing your video until now... crazy how things work out isn’t it?

  • @HeroWarsSeymour
    @HeroWarsSeymour Před 2 lety

    Very nice, I have to learn Java for university and I decided to look for something more interesting that we have to do at university and I found your video.

  • @TheAstroguypasa
    @TheAstroguypasa Před 5 lety

    You are a comedian. I always enjoy your videos and learn a lot in the process. :-)

  • @sql64
    @sql64 Před 5 lety +4

    781-0 Like Ratio, this just sows how good of a youtuber you are. :)
    keep doing what youre doing

    • @TheCodingTrain
      @TheCodingTrain  Před 5 lety +1

      I've got a dislike now thank goodness!

    • @raghavkamath
      @raghavkamath Před 5 lety +1

      The Coding Train Well sir don't worry about those unnecessary dislikes, use them positively to work harder next time :-)

  • @kravenoff42
    @kravenoff42 Před 5 lety +1

    Would it be maybe Rows, Columns, and Tables?

  • @Acdic
    @Acdic Před 5 lety +1

    wish you millions and millions

  • @x-lightsfs5681
    @x-lightsfs5681 Před 5 lety +1

    I want to try to make a controlable version. In your part2, what controls will you use?

  • @grainfrizz
    @grainfrizz Před 5 lety +1

    Dan I was hoping you'd put the Coding Train logo/icon on the middle piece of the white face. I tried to Super Chat it but there was a problem with Google taking my credit card. Anyway, love the content as always.

    • @TheCodingTrain
      @TheCodingTrain  Před 5 lety +3

      Oh! Fun idea, maybe I'll do that in the next part.

  • @jorrr9096
    @jorrr9096 Před rokem

    20:26 me coding in everyday life 😂

  • @jagjeetchhabra1386
    @jagjeetchhabra1386 Před 5 lety +1

    Yay!!

  • @tusharhalder64
    @tusharhalder64 Před 4 lety

    The coding train:lets take G as 1
    Newton:Am I a joke to you?

  • @pianothrone7965
    @pianothrone7965 Před 4 lety +4

    Don’t mind me just leaving a timestamp to where I am at 6:16

  • @AbhishekJain-zu1uf
    @AbhishekJain-zu1uf Před 5 lety +1

    Can't we just represent each colour by an integer 1-6 and let our Rubik's cube object be represented by a collection of 6 3x3 matrices in a specific order. I guess this will make it easier to feed it through a neural network and also reduce the code size.

    • @christiant.g.994
      @christiant.g.994 Před 5 lety

      Definitely is! I did that for a 2x2-cube simulation once.

    • @TheCodingTrain
      @TheCodingTrain  Před 5 lety

      Yes, this is a great idea and I'd like to refactor it this coming Wednesday? Can you say more about how you envision the six 3x3 matrices as different than my 3x3x3 array?

    • @AbhishekJain-zu1uf
      @AbhishekJain-zu1uf Před 5 lety

      ​@@TheCodingTrain Let's say that we plan to make the matrix in the following order:
      {Blue, Red, Green, Orange, White, Yellow}
      now we can replace those colours by 3x3 matrices with different integers representing each colour giving us a matrix of shape 6x3x3 ready to be fed through a neural net. Now we can use Convnet either by feeding the same 6x3x3 array or by reshaping it into a 6x9 array.

  • @TheSuperMisterious98
    @TheSuperMisterious98 Před 5 lety

    i'm so glad that you thought me that the single square are called cubies

  • @pollockfamily7963
    @pollockfamily7963 Před 3 lety

    Cool, now make a four by four

  • @XxJackDjTomxX
    @XxJackDjTomxX Před 5 lety +1

    Hey, i just watched your Coding Challenge about the QuadTree... i was wondering if it really makes sense to store points in a Quadtree which was already subdivided. Your goal is to only consider points which are in a certain area, so you lookup all the points of the quads which are within this boundary/area, but if you store points in the quadtrees which was already subdivided, for example the one which covers the whole width and height of your canvas, you also lookup points there which don't belong to this area. So shouldn't you remove the points from the quadtree which will is about to be subdivided and pass those points to the childrens, so they store those points. I'm sorry for my bad english, but i hope you know what i mean

    • @MaxPicAxe
      @MaxPicAxe Před 5 lety

      I think he noticed this mistake after uploading this video, if I remember there were a lot of comments about it. But why comment here xD

  • @fishylr5058
    @fishylr5058 Před 4 lety

    hello love this vid thanks for starting me to do coding

  • @manbirjudge8415
    @manbirjudge8415 Před 3 lety

    I came on this video after taking the idea from the Code Bullet channel. And who knows that he also creates its AIs in processing

  • @cod-newbie9166
    @cod-newbie9166 Před 5 lety

    Will it be wise to use your intelligence series to start machine learning or do I need prerequisites

  • @mirrorimage7077
    @mirrorimage7077 Před 5 lety +1

    "It's actually just an integer."
    *gasp*

  • @neelronanki1764
    @neelronanki1764 Před 4 lety

    Half an hour...well okay
    I do it in 10 seconds but you have a Rubiks brand so I don't blame you(great program btw)

  • @thomasoc.2051
    @thomasoc.2051 Před 5 lety

    Yeah i love CODE BULLET!!

  • @user-fam
    @user-fam Před 5 lety

    That's Great! Very positive!

  • @dylanbarrick7398
    @dylanbarrick7398 Před 5 lety +1

    After a while, it felt like "r" wasn't even a letter but just some weird symbol

  • @fireboss05
    @fireboss05 Před 4 lety

    You wanted to say rows colons and slices maybe ? XD

  • @comeonfight5662
    @comeonfight5662 Před 5 lety +2

    When you make a constructor in Java, you don't need a different variable name than your classe's attribute. Instead, you can reference the classe's attribute variable using "this". So in this particular example you can use this.len = len; instead of changing the parameter name to len_.
    I need to point out that the work you are doing is great and inspiring. You are the reason I started learning Genetic Algorithms and Neural Networks.

  • @1Eagler
    @1Eagler Před 4 lety

    Have y done fence animation?

  • @christiant.g.994
    @christiant.g.994 Před 5 lety

    Just a quick question: is this a solver as well, and if so, how do you plan to program a solver if you barely know how to solve it yourself? Nothing personal, but the methods commonly used for machine solving are quite complex, and I think you'd need a fairly deep understanding of how the cube works to program that from scratch.

    • @TheCodingTrain
      @TheCodingTrain  Před 5 lety

      Excellent question! There is a very likely possibility I will fail. I'm hoping to try to apply machine learning methods .. so rather than follow a known algorithm Im going to try to teach the computer to find a solution using a combination of genetic algorithms and neural networks.

    • @christiant.g.994
      @christiant.g.994 Před 5 lety

      @@TheCodingTrain Don't really know much about implementing neural networks in coding, so hopefully I will have a lot to learn. Would be really awesome if you manage to build a solver like this :D

  • @ruler255
    @ruler255 Před 5 lety

    I want this to be a series on netflix.

  • @hankmoody666
    @hankmoody666 Před 5 lety

    21:10 "can't believe how much time this is taking" - *Uses 20 minutes to code the entire thing*. I would probably use several days. But i'm a sub-28 cuber with a pb of 19 though :)

    • @josephswietlik7013
      @josephswietlik7013 Před 5 lety

      @Hank Moody I feel the same way.

    • @CaelVK
      @CaelVK Před 5 lety

      This is an edited livestream, he did it in a few hours actually (Still quite amazing imo). You can find the full livestream in the channel

  • @JarppaGuru
    @JarppaGuru Před 2 lety

    9:14 not smart would say offset is len becouse it rotate center of first box

  • @SpunkyRenforth
    @SpunkyRenforth Před 4 lety

    I have a question that I havent seen posted below. Ive figured out how to bring the code together into a pde file to use in my web page but when it comes to a library like peasycam I run into problems. Ive tried to find maybe a cdn for peasycam or other processing libraries with no success. Is there a way to import these processing libraries into a html page?

  • @gazehound
    @gazehound Před 5 lety

    code bullet and shiffman! wholesome

  • @rw4317
    @rw4317 Před 4 lety

    his bell 😂

  • @Ragnark1
    @Ragnark1 Před 2 lety +1

    Code a cube is an interesting project to be sure.
    Check out my attempt from 2018: czcams.com/video/FE-JY0No7SE/video.html