"The Four Queens Ballet" really sounds like it could have been some classic ballet from the renaissance lol
@tomi25926 жыл бұрын
Beautiful! Amazing! For me it's the best of your newly uploaded videos, I just can't stop watching.
@durvsh5 жыл бұрын
3 dancing queens were sacrificed during the making of this video.
@melancholyRed5 жыл бұрын
4 dancing queens, actually.
@abc-uz6bg5 жыл бұрын
Finest video I've seen. Thanks
@FirstLast-fg5vh5 жыл бұрын
Recursion. Gezz One of the simplest concepts, and code, but g-damn so hard to do. I cooked my puter at 64 Queens. I mean it smoked. After 6 hours of 90% processer load.
@dinohunter71765 жыл бұрын
Superb, multumesc!
@franciscorojas80253 жыл бұрын
this is sooo bad ass.
@shivangibalodia66015 жыл бұрын
Hey you are doing an amazing job. Good luck to you. Looking forward to more such videos. :)
@prathameshparulekar92475 жыл бұрын
You all are awesome
@caigner5 жыл бұрын
Hypnotic music!
@Amitsa2995 жыл бұрын
good music and dance.
@vpshastry5 жыл бұрын
I feel wierdly amused!! :D
@sth1286 жыл бұрын
Maybe do a video on dancing links (Algorithm X - Donald Knuth) algorithm? It practically begs for it with that title... Though you might run out of dancers due to space complexity XD
@cibisuren23345 жыл бұрын
wow!
@prathameshparulekar92475 жыл бұрын
Amazing!
@jennyjingxu15655 жыл бұрын
awesome! want more!
@dimitrisdimitriou69695 жыл бұрын
This is amazing
@letao124 жыл бұрын
Nerdy boy with thick glasses walks into dance class. Girls: "Hi!" Boy: "I... um... do you want... I mean... I'm looking for... dancers for... uh... a class project" Girls: "Oh yeah? Which class?" Boy: "computer... science?"
@letao124 жыл бұрын
Girls: "Sounds fun, what do you need us to do?" Boy: "OK, so there's going to be this checkerboard, and you dance to the first square, and you dance to the next row, then you look at each other and you push her to the next square, then you look at each other again and you push her again, then look at each other again and wave, then you go to the third row and you look at her and she pushes you to the next square, then look at her again and wave, but then you look at her and she pushes you, so you go to the next square and look at her again and now she pushes you, then you go to the next square and she pushes you off the board, so then you stay off the board and she goes to the next square, and now you go to the third row, and you look at her..." Girls: "So, like solving the 4 queens problem using a backtracking algorithm?" Boy: "...... yes"
@robertlozyniak36616 жыл бұрын
The dancers must have a good amount of memorizing to do to keep the timing, etc., right in their heads, as there do not appear to be visual cues as to when they are to "wake up".
@nydydn5 жыл бұрын
They don't need to memorize the timing. That's what the music is for, to keep the rhythm.
@beeble20033 жыл бұрын
@@nydydn They need to memorize the timing in the senses of remembering what part of the music they wake up at. Actually, though, I don't think they need that. When they're kneeling with their heads bowed, thyey can look behind them.
@tmjcbs5 жыл бұрын
It's a good thing they didn't use Sudoku, another candidate for the backtracking algorithm...
@viniciuskf17413 жыл бұрын
Bah show de bola
@The_Foreman5 жыл бұрын
Just a quick Question that'll never get answered. After the first fully queen checks her first 2 squares (half the board) I think any other possibilities would be mirrors of all previous answers. If it were to backtrack down to her, you can half the time by breaking if she goes over the halfway point.
@yaroslavpanych20675 жыл бұрын
Well yes, in this particular task there is 1 other solution, and it is mirrored to the first. But only in this. Depending on task, it is possible to run algo until 1st solution and quit, but usually it is coded to generate each and every possible solution (or reach state where no solution is possible). Especially when the best solution is required to be found. You must understand, there are 2 cases when algo can stop: 1) found solution(s), don't need anymore - as shown here 2) found all solutions, i.e. backtracked to state 'before-start', in our case, 1st queen explored all 4 cells, and backtracking can step back anymore. You cannot make conclusion during any other stage. If you know about certain properties of solutions, you can 'optimize' it, but it is task specific optimization, which cannot be applied to other tasks.
@The_Foreman5 жыл бұрын
@@yaroslavpanych2067 I didn't mean that the only other solution would be the mirror, only that no matter the size of the board the first queen would only have to go halfway across before all possible answers would be found. At which point you can stop running the simulations. If we are changing the shape, or adding dimensions, no matter the situation rules would have to change. I was simply making note of an interesting aspect of the current board at play.
@frechjo5 жыл бұрын
@@The_Foreman If you restrict the first queen to the fist half of the row, you eliminate all mirror solutions on one axis (from the two axis of symmetry and 4 rotations). But the point of the video is to show how a backtracking search algo works in general. It's a general technique applicable to many different kind of problems, not just this specific one, so any form of heuristic or optimization you could introduce to solve the n-queens problem would detract from the intention. If your intention is to just to solve an fixed sized n-queen problem, there'll be many variations that could be more efficient than a general backtracking method. For big n's, for instance, you could use constraint propagation.
@paulschuler14595 жыл бұрын
I was surprised you did not have the three dancers on the right get up again and move around over the top to the left. Eventually, the same result would have been achieved.
@nydydn5 жыл бұрын
when backtracking is explained, a teacher would say that a candidate is abandoned after no suitable solution is found for that candidate. Of course, in a computer the candidate is just a bunch of bits (and not even that), and all the bits are still in your RAM, but this ballet follows strictly the explanation that is apparently most understandable by humans.
@superniokas5 жыл бұрын
party pooper
@KrzysiuNet3 жыл бұрын
"Needs more flanger" - The Bruce Dickinson. (but honestly, if they would ease a bit on flanger, it could be a pretty nice version of C&M)
@Mojzesz667 жыл бұрын
How can I find the soundtrack?
@osztianpalmarozalia49477 жыл бұрын
Prokofiev - Dance of the Knights
@wun_zee35995 жыл бұрын
@@osztianpalmarozalia4947 I find that funny concidering the name of the puzzle.
@boy_with_thorn Жыл бұрын
I still dont understand how to find all possible combinations using this
@tonydekker7792 Жыл бұрын
Record the solutions you find, but just keep backtracking.
@boy_with_thorn Жыл бұрын
@@tonydekker7792 ohh, got it, thanks!
@jakestuck03094 жыл бұрын
I wonder how knapsack would look as a dance.
@simonebertolucci51525 жыл бұрын
This dance is popular but inefficient, as it takes 2^n steps. A less naïve approach could complete the dance in polynomial time.
@mertaliyigit32885 жыл бұрын
The problem is NP-complete
@simonebertolucci51525 жыл бұрын
@@mertaliyigit3288 I was convinced of that, too! But apparently, that is a common misconception. dl.acm.org/citation.cfm?id=101343
@oooBASTIooo5 жыл бұрын
@@simonebertolucci5152 That is a probabilistic algorithm.. As it clearly states in the abstract.
@xerxes80754 жыл бұрын
Dimmu Borgir?
@SmashhoofTheOriginal3 жыл бұрын
Me at 2am
@LukasThiersch5 жыл бұрын
It's a bit slow... Is this Vista?
@comofuncionaelmundo38956 жыл бұрын
Ahora entiendo porque el problema de las mil reinas es NP Hard
@Eu_Sunt_Dracul5 жыл бұрын
Bliss
@4-7-5anhbao53 жыл бұрын
Đã xem
@ayamirisukahyejunghyuneuneun4 жыл бұрын
can upload sort algthm agn p,les
@farche26 жыл бұрын
That's more like brute force enumeration than backtracking.
@nydydn5 жыл бұрын
"Backtracking" is a very well known name for the algorithm they're describing. Feel free to name it however you feel appropriate, but by convention backtracking is what they dance.
@beeble20033 жыл бұрын
No, it's backtracking. Brute-force enumeration would put queens at positions 1,1,1,1 and check for validity, then at 1,1,1,2. Backtracking never even considers those states, as it rejects anything beginning 1,1 without looking further.
@garychap83843 жыл бұрын
More fun at 2x speed ... ... but anyone that codes an n-queens solver like this, should probably switch career : / And if they also use call recursion, then they should be banned from using compilers for life XD
@beeble20033 жыл бұрын
No reason not to use recursion. It's natural, and the recursion depth is very limited.
@bruvvereccles58476 жыл бұрын
Pity you ruined the music with that clicky accompaniment.