Backtracking Explained - Solving N-Queens and Knight's Tour using Python

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • Github: github.com/challengingLuck/yo...
    Click here or I will steal your cookies: bit.ly/2Z1uzKM
    If you want to send me a tip. You absolutely don't have to!
    Etherium: 0xae6b07d67301d4f5aed36254b19f05cc593732cb
    Music: www.bensound.com

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

  • @mr_tpk
    @mr_tpk Год назад +2

    Thank you dude. Your video is short and to the point. 🎉❤

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

    Such a compat video man, really liked it!!

  • @RossieVina
    @RossieVina 5 дней назад

    good day, what are the other backtracking algorithm that i may use to solve the local maxima of the steepest ascent hill climb? instead of using the depth-first search, can you suggest another backtracking?

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

    Thanks for this video - very informative. Why do you return True and not False if the counter is above 64? Should this not end the loop as the maximum number of moves has been reached?

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

      In the 8x8 case 64 is the maximum number of moves. Should have changed it to N to generalize it.

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

    Me: Mom can we get Code Bullet?
    Mom: We have Code Bullet at home
    Code Bullet at Home:

  • @user-bo3xo8dy5h
    @user-bo3xo8dy5h 4 месяца назад

    I do understand the thinking of the algorithm and the code is amazing. But I am quite confused that why the board metric could change during the function 'solve'. As it is a parameter for the function which the return is a bool variable True or False. Why would the argument 'board' be changed during the running of function? I am curious.

  • @thepaleify
    @thepaleify 2 года назад +2

    greetings,
    in the knight tour example, how did we choose the 3,2 as the starting point? i mean shouldn't we iterate through the starting points as well?
    thanks in advance

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

    Do you have a background in math or comp sci. Love the vid.

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

    thank you for this video

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

    Great video, appreciate UWU

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

    nice one, but the "n" in your solve function is not needed..it doesn't appear anywhere!

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

      That’s true. In the knights tour it would take long to solve an 8x8. Didn’t even want to try the 16x16. That’s why I changed my mind mid way and didn’t even include n.

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

    how would you implement this for sudoku

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

    Great videos

  • @carltang___6346
    @carltang___6346 10 месяцев назад

    does this find a path for every starting point

  • @alired9189
    @alired9189 Месяц назад

    Why do you choose this music for this video?
    Are you teaching how to use a sword?

  • @peteryakubu3434
    @peteryakubu3434 7 месяцев назад

    do you remember how long your knight's tour algorithm took

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

      A few seconds I believe. The code is linked here. You can just try running it.

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

    I will post my algorithm based in backtracking + restrictions to solve sudokus in python: github.com/dogia/sudoku_solver