Bogosort Sheds the Rhythm Changes Until it Sorts the List

Поділитися
Вставка
  • Опубліковано 27 січ 2024
  • Bogosort continues its journey through the jazz repertoire, this time shedding over the Rhythm Changes until it successfully sorts the list.
    The Bogosort algorithm is as follows:
    1. Randomly shuffle the list.
    2. Check if the list is sorted.
    3. If not, go back to 1.
    For a list of n elements, there is a 1/n! chance that Bogosort successfully sorts the list on any given pass, since there are n! (n factorial) possible permutations of the list. So with six elements, the probability of the list being sorted on any given pass is 1/6! = 1/720 ≈ 0.00139.
    In this instance, the algorithm took 545 passes to sort the list.
    The six elements of the list are mapped to notes of a specific scale, depending on which chord is being played in the progression. The scales used include the major pentatonic, Phrygian dominant, natural minor, harmonic minor, altered scale, Mixolydian, and more.
    The shuffling algorithm used is the Fisher-Yates Shuffle, from lowest index to highest. The note played is the value of the element at the current index in the outer for-loop of the shuffle algorithm.
    ________
    Interested in learning more about algorithms and how to program? Here are some useful and/or classic textbooks that I recommend (these are affiliate links, if you buy one, I get a small commission):
    ▶ “Algorithms” (4th Edition) by Robert Sedgewick & Kevin Wayne: amzn.to/3uo25xR
    ▶ “Effective Java” (3rd Edition) by Joshua Bloch: amzn.to/3HOnYJL
    ▶ “Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming” by Eric Matthes: amzn.to/481jQ43
    ▶ “Design Patterns: Elements of Reusable Object-Oriented Software” by Erich Gamma, Richard Helm, Ralph Johnson, & John Vlissides: amzn.to/49fpr7R
    ▶ “Discrete Algorithmic Mathematics” by Stephen B. Maurer & Anthony Ralston: amzn.to/4bmsOvG
    #jazz #algorithm #altered #music #musictheory #solo #meme #rhythmchanges #igotrhythm #gershwin #improvisation #bogosort #sortingalgorithm #sorting #visualization #computerscience #programming #code #satisfying #asmr #scrollingscore #transcription #hypnotic #studymusic #focusmusic

КОМЕНТАРІ • 24

  • @AlgoMotion
    @AlgoMotion  4 місяці тому +38

    **Moments of Interest**
    "So close!" One adjacent element swap away from sorting the list (Kendall-Tau distance of 1):
    1:52 (attempt 166)
    2:53 (attempt 257)
    3:02 (attempt 271)
    3:26 (attempt 307)
    5:18 (attempt 475)
    At 0:11 (and possibly in other places), the list appears to be sorted momentarily. This is because the bogosort algorithm only checks for "sortedness" at the end of a complete shuffle of *all* the elements. Here the list happened to be in sorted order during an *intermediary* swap operation, which goes unnoticed by bogosort.
    The closely related "bozosort" algorithm checks if the list is sorted after *every* swap operation.

    • @670839245
      @670839245 4 місяці тому +4

      What if you made bozo play some music? That'd make two adjacent attempts sound more similar...? idk if it's good or bad.

    • @EntergeticalakaBot
      @EntergeticalakaBot 4 місяці тому

      ​@@670839245 Imagine 2 bogosorts playing together until one completes

  • @rainypeople
    @rainypeople 4 місяці тому +27

    I like how it has to stop and recheck that it’s been has been solved. Almost like it can’t believe it and is in shock

  • @flazefeeds381
    @flazefeeds381 4 місяці тому +25

    Shed bogo, shed. Yeah man.

  • @Space_Reptile
    @Space_Reptile 4 місяці тому +22

    i love how this makes for perfect ambient music to just loop in the background
    its random (by nature) but sounds good so you cant really make out its a loop or where it loops

  • @mikebliss3153
    @mikebliss3153 4 місяці тому +27

    I love how these parameters just make more jazz out of jazz.

  • @Mai-Gninwod
    @Mai-Gninwod 4 місяці тому +19

    I love how you can still pick out fragmentary melodies and even some full ass phrases, like why wouldnt you, ya know?

  • @meowsicle7463
    @meowsicle7463 4 місяці тому +15

    Great chord progression choice, really added a lot to the random noise of the sorting

  • @tissuepaper9962
    @tissuepaper9962 4 місяці тому +10

    I like the addition of the bass in this one. I think it might be interesting to use a list with some repeated elements, like instead of just having 1-6, have a list that's ten notes long with values 1-7 and duplicate 1s, 3s, and 5s. I know it would take *significantly* longer to sort but this shit goes really hard as ambient focus music so long videos aren't a problem IMO.

  • @RandomPerson-id5rb
    @RandomPerson-id5rb 4 місяці тому +18

    This was relatively average of bogo sort right? It had a 53.14% of terminating at then or before?

    • @AlgoMotion
      @AlgoMotion  4 місяці тому +15

      That's right! The probability of it finishing at or before the 545th attempt is 1 - ((6! -1) / (6!)) ^ 545

    • @ERRORRubiksZeraBrand
      @ERRORRubiksZeraBrand 4 місяці тому

      @@AlgoMotion what the

  • @gavingro
    @gavingro 4 місяці тому +1

    once thing this shreds inner urge we're all out of a gig

  • @smartaleckduck4135
    @smartaleckduck4135 4 місяці тому +2

    It’d be pretty cool to see a bit of rhythmic variation? Maybe two of the six values are related to rests?

  • @1creeperbomb
    @1creeperbomb 4 місяці тому +5

    Lol please make it so the shuffle uses an RNG seed when picking numbers.
    It would be great to recreate different versions easily or make it a bogosort musicbox lmao

  • @MarvelousMaxter
    @MarvelousMaxter 2 місяці тому

    Sick linez

  • @andrewchapman2039
    @andrewchapman2039 4 місяці тому +4

    What standard is jazz is this?
    High. It's a high standard of jazz.

    • @yat_ii
      @yat_ii 4 місяці тому

      Serial music is basically just a glorified version of this

  • @bacondoesthings123
    @bacondoesthings123 4 місяці тому +2

    do the coltrane changes next!!

  • @kuru9157
    @kuru9157 4 місяці тому

    How does the algorhithm decide in which octave to play the note in?

  • @pup64hcp
    @pup64hcp 4 місяці тому +1

    Is the code for this public? I'd love to be able to try this out with other progressions

    • @AlgoMotion
      @AlgoMotion  4 місяці тому

      not at the moment, but possibly at some point in the future!

  • @EntergeticalakaBot
    @EntergeticalakaBot 4 місяці тому +1

    Just saying this is your 69th video