These are different algorithms to sort a list. They vary in how they work (some rearrange the original list: Bubble, Selection, Loop; others create a new sorted list: Insertion, Thread)
Thanks, but it's also too complex to just use in an ordinary project. Now if only we could "sense" a sprite's internal lists using that sensor block, then we could do a "sorter" sprite which could be imported...
the thread sort tries a "divide and conquer" approach borrowed from quickSort, but modifies it into two separate insertion threads, since you can't do recursion in Scratch yet. It's advantages become clearer with longer lists. Otherwise I was impressed by the Insertion's performance...
I tried an insertion sorting algorithim but I was unable to get it to work...I wish 1.3 included a sort/reverse function like in your Lists. Still, I'll be using this VERY often. This be a sample project...
The "warp" sounds really interesting. I've been mostly playing with the Arduino Board via the remote sensor extension of v1.3, and finally got it all working last week. I actually had to take out a soldering iron the other day :P
lol. i made three individual projects that look exactly like this (selection sort, cocktail sort, and bubble sort). Our interfaces are identical. As with yours, the lists aren't displayed online, so I deleted them... Selection sort was the fastest I believe (unless the data started partially-sorted).
Download the 6 sprites and 20 scripts of "Sort" and open it in Scratch
Project Notes
This project compares three sommon simple sorting algorithms (bubble, selection, insertion) against two others which I have optimized for Scratch (loops, threads).
Select the number of elements to sort and click on the star to start the race.
Comments
You need to be logged in to post comments
Add a Comment
Sehr schön! Grundlagenarbeit.
Hi ich check das nich! XD jetzt ernst mal!!
a LOT of variables
cool
Have you references for Thread Sort algorithm ?
no, I invented it myself ;-)
I guess they updated java because I can see the lists now. Also it says at the top left of the project v30 instead of v29.
Do you work at http://MIT.EDU?">MIT.EDU?
nope. i think hes german.
(view all replies)I cannot wait for them to add the onscreen watcher to the java player!
Thats weird, my 'lists' project doesnt work online also.
Don't worry, they'll get it to work soon, I bet
Excellent work, this help me to learn more about Lists in Scratch1.3
What are the differences in these methods?
These are different algorithms to sort a list. They vary in how they work (some rearrange the original list: Bubble, Selection, Loop; others create a new sorted list: Insertion, Thread)
(view all replies)my project should have this spot on the front page
i can't make it do anything
it doesn't work with the online player yet
(view all replies)Nice sort routines! I just felt like making a bubble sort project because I thought that it would be the easiest.
Beautiful
Brilliant! High-fives all around, Jens! =)
Wow. That thread sort is excellent.
Thanks, but it's also too complex to just use in an ordinary project. Now if only we could "sense" a sprite's internal lists using that sensor block, then we could do a "sorter" sprite which could be imported...
Your thread sort is pretty amazing! Very impressive.
the thread sort tries a "divide and conquer" approach borrowed from quickSort, but modifies it into two separate insertion threads, since you can't do recursion in Scratch yet. It's advantages become clearer with longer lists. Otherwise I was impressed by the Insertion's performance...
This will be very handy! I wish the java player would catch up to the new features.
I tried an insertion sorting algorithim but I was unable to get it to work...I wish 1.3 included a sort/reverse function like in your Lists. Still, I'll be using this VERY often. This be a sample project...
Aha, there still seems to be an issue with lists, ... let's wait for the java player to catch up ...
The "warp" sounds really interesting. I've been mostly playing with the Arduino Board via the remote sensor extension of v1.3, and finally got it all working last week. I actually had to take out a soldering iron the other day :P
(view all replies)lol. i made three individual projects that look exactly like this (selection sort, cocktail sort, and bubble sort). Our interfaces are identical. As with yours, the lists aren't displayed online, so I deleted them... Selection sort was the fastest I believe (unless the data started partially-sorted).
(view all replies)Darn.