11 Better Sorting Algorithms in Minecraft

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ค. 2024
  • Sorting visualizer in Minecraft.
    GitHub:
    github.com/TheCymaera/minecra...
    Inspired by:
    "15 Sorting Algorithms in 6 Minutes" by Timo Bingmann
    • 15 Sorting Algorithms ...
    GitHub:
    github.com/TheCymaera/minecra...
    Web app:
    heledron.com/misc/sorting-alg...
    All my links:
    heledron.com/links/
    Sources:
    "Quicksort" on Wikipedia.
    en.wikipedia.org/wiki/Quicksort
    "Merge Sort" on Wikipedia. (Bottom Up and Top Down)
    en.wikipedia.org/wiki/Merge_sort
    "Bucket Sort" on Wikipedia.
    en.wikipedia.org/wiki/Bucket_...
    "Selection Sort" on Wikipedia.
    en.wikipedia.org/wiki/Selecti...
    "Heapsort" on Wikipedia.
    en.wikipedia.org/wiki/Heapsort
    "Bubble Sort" on Wikipedia.
    en.wikipedia.org/wiki/Bubble_...
    "Insertion Sort" on Wikipedia.
    en.wikipedia.org/wiki/Inserti...
    "Shellsort” on Wikipedia.
    en.wikipedia.org/wiki/Shellsort
    "Bogosort" on Wikipedia.
    en.wikipedia.org/wiki/Bogosort
    "Fisher-Yates shuffle" on Wikipedia.
    en.wikipedia.org/wiki/Fisher%...
    0:00 - Quick Sort
    0:23 - Bottom Up Merge Sort
    0:51 - Top Down Merge Sort
    1:19 - Bucket Sort (n=3)
    1:43 - Selection Sort
    2:35 - Heap Sort
    3:09 - Bubble Sort
    4:29 - Insertion Sort
    5:25 - Shell Sort
    5:52 - Bogo Sort
    6:29 - Bozo Sort
    6:45 - Quick Sort at 5 ticks per event
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 54

  • @balls4755
    @balls4755 ปีที่แล้ว +470

    There’s a universe where boho sort is always fastest and no one knows why

    • @heledron
      @heledron  11 หลายเดือนก่อน +297

      There's a universe where they use it in critical infrastructure and everything fails one day.

    • @SpaceNebula69
      @SpaceNebula69 5 หลายเดือนก่อน +48

      @@heledronthere’s a universe where i can understand what the heck a mile is

    • @WoahRoNisCool
      @WoahRoNisCool หลายเดือนก่อน +19

      @@SpaceNebula69theres a universe where i actually get good grades

    • @SpaceNebula69
      @SpaceNebula69 หลายเดือนก่อน +9

      @@WoahRoNisCool there’s a universe where i can understand my parents

    • @WoahRoNisCool
      @WoahRoNisCool หลายเดือนก่อน +7

      @@SpaceNebula69 there a a universe where this chain wont exist

  • @Damian-cilr1
    @Damian-cilr1 ปีที่แล้ว +157

    i love how slow quick sort actually kinda sounded like a song

  • @liamfinlay2039
    @liamfinlay2039 หลายเดือนก่อน +95

    Because my intelligence is average. I don't understand what's going on exactly. But i likes it.

    • @connor7272
      @connor7272 หลายเดือนก่อน +6

      So if you want to understand, what is basically happening is you have say a line of increasingly higher stacks of blocks, and you scramble them in any particular order. You then write a code that will start at wherever you want the shortest stack and end where you want largest stack. (Let’s just say left is small right is big for simplicity sake)This reader will detect two things. If the stack is higher than the one on the right, and smaller than the one on the left. If the stack is smaller than the one of the left, it will re-write the stacks so the shorter one is now on the left. If the stack is bigger than the one on the right, it will move the stack to the right .
      Now that’s just a regular sorter system but you can make small variations in order to either sort in a different way or sort faster or whatever.
      This is actually very similar to how item sorters work in your regular Minecraft. Blocks have different ids and are sorted by id numbers.
      Long story short it will individually sort each stack one at a time until eventually it’s completely sorted
      It’s not that complicated once you understand it
      Sorry in advance for wasting your time with this drawn out explanation

  • @heledron
    @heledron  ปีที่แล้ว +166

    Hey hey! Here's an improved version of my last sorting algorithms video. By popular demand, I added bucket/radix sort and bogosort. I also fixed the shuffling algorithm and added visualization for read-instructions and auxiliary storage.
    Sorry for the few months of inactivity, I was waiting for bogosort to finish.

  • @watercolours4526
    @watercolours4526 7 หลายเดือนก่อน +54

    quick sort: select the pivot number, move it to the end of the array, then divide the array into two other arrays with one having numbers larger than the pivot and the other one having numbers less than the pivot, repeat until done
    merge sort: divide the array into two arrays, then divide again, and again, and repeat until the smallest array has only one number, then sort numbers in the subarrays, repeat until done
    bucket sort: create multiple subarrays depending on which values are in the original array (e.g. 0-9, 10-19, 20-29), then move the values to its corresponding subarrays, then place back already sorted values into the array
    selection sort: find the smallest number in the array, move it to the start of the array, repeat until done
    heap sort: make a "family tree" of numbers, if a parent is smaller than the child then swap, repeat until done, then swap the first and last values in the array and delete the last one from the tree, repeat until done
    bubble sort: find the largest number in the array, move it to the end of the array, repeat until done
    insertion sort: set a marker for the sorted section after the first value, then insert the next number in the unsorted section to the sorted section where it should be, repeat until done
    shell sort: compare two numbers apart from each other, swap if the first one is larger, repeat until done
    bogo sort: randomise the order, repeat until done
    bozo sort: swap 2 random numbers, repeat until done

  • @frankie11998
    @frankie11998 7 หลายเดือนก่อน +27

    we makin it out of the stronghold with this one 🔥🔥🔥🔥

  • @pallace
    @pallace ปีที่แล้ว +54

    To think that this game started as a children's voxel game and to think how it evolved, to sorting algorithms , makes you wonder about the future.... lovely video!

    • @TylerTMG
      @TylerTMG 6 หลายเดือนก่อน +1

      why am i thinking about jenny mod....

    • @TylerTMG
      @TylerTMG 6 หลายเดือนก่อน +1

      -does anyone know how to get it-

    • @xanderplayz3446
      @xanderplayz3446 5 หลายเดือนก่อน +2

      @@TylerTMGoh please no

    • @TylerTMG
      @TylerTMG 5 หลายเดือนก่อน

      @@xanderplayz3446(:

  • @Ell0_sTadium66
    @Ell0_sTadium66 ปีที่แล้ว +20

    we need lsd radix.

  • @BlockMasterT
    @BlockMasterT 10 หลายเดือนก่อน +15

    I thought it was taking a break from sorting to make a terrain with clouds during the bucket sort 💀

  • @Doodoofart725
    @Doodoofart725 หลายเดือนก่อน +1

    The slow quick sort at the end sounds like a chase sequence from a movie.

  • @grahamcartwright3632
    @grahamcartwright3632 ปีที่แล้ว +3

    funny that you added bucket sort considering this was written in bukkit

  • @emanuel_medoo
    @emanuel_medoo ปีที่แล้ว +16

    Hey man! I have a school project about algorithms and I have to make a video about it, could you maybe explain how you put it all together and make it work in minecraft? Thanks.

    • @heledron
      @heledron  ปีที่แล้ว +5

      You should join the Discord group. It's easier for me to help you if I know more about your assignment and I can share code snippets there. There's also a GitHub repo in the description.
      Here's an overview:
      This is a Bukkit plugin written in Kotlin.
      I create an array list that keeps track of changes that have been made to it.
      I run each algorithm on the array to get a list of changes; these are all well known sorting algorithms.
      I then schedule each change to be displayed by placing blocks at a certain time.

  • @HeroMovies-fl4mm
    @HeroMovies-fl4mm หลายเดือนก่อน +2

    Could you also add time and space complexity for these?

  • @fryingpanman6919
    @fryingpanman6919 ปีที่แล้ว +1

    So satisfying keep it up

  • @_neophyte
    @_neophyte 6 หลายเดือนก่อน

    You should add bogosort at the enf to make the video a lot longer

  • @antondemchenko6283
    @antondemchenko6283 ปีที่แล้ว +7

    Now we need radix 10 😂

  • @EvilsSouls
    @EvilsSouls ปีที่แล้ว +19

    The bogo sort is so painful

    • @1224chrisng
      @1224chrisng ปีที่แล้ว +4

      Bogo and Bozo sort were at least on the kid's table, I literally had to skip through Bubble Sort cause it just couldn't play fair

    • @EvilsSouls
      @EvilsSouls ปีที่แล้ว +1

      @@1224chrisng I think Selection Sort had it the worst though.

  • @Austin01Powers
    @Austin01Powers หลายเดือนก่อน

    Very interesting

  • @steve_cat5504
    @steve_cat5504 7 วันที่ผ่านมา

    Selection sort sounds like the soundtrack to a horror game. Others too

  • @Bard_Gaming
    @Bard_Gaming หลายเดือนก่อน

    Fire outro song

  • @xkainblackraven2883
    @xkainblackraven2883 หลายเดือนก่อน

    and stalin sort?

  • @vikram396
    @vikram396 หลายเดือนก่อน

    1:29 all I’m hearing is flight of the bumble bee 😂

  • @SealProgrammer
    @SealProgrammer 7 หลายเดือนก่อน +2

    Stalin sort?

  • @shyvv.
    @shyvv. 26 วันที่ผ่านมา

    Am I the only one who heard The Perfect Girl by Mareux for a split second at 7:03?

  • @backstealer9288
    @backstealer9288 หลายเดือนก่อน +2

    No miracle sort... what a shame

    • @cara-setun
      @cara-setun หลายเดือนก่อน +2

      It’s there, it just happened to look like quicksort

  • @JC-kk4ph
    @JC-kk4ph ปีที่แล้ว +7

    Cool! I'll pretend I understand how all of this works!

  • @usser-505
    @usser-505 28 วันที่ผ่านมา

    Didn't understand a thing even tho programmed these algorithms 😂

  • @kvanzi
    @kvanzi 10 หลายเดือนก่อน +3

    bogo and bozo sort 💀

  • @MrAblenker
    @MrAblenker หลายเดือนก่อน

    what the hell i did watch here?