Why don't you just use the published source code? Scratch is not really locked down, so if you find a bug you'll be able to break into your Scratch image and modify it. However, this won't be fun because the sources you'll see will be incomplete (without comments and full variable names). So, since Scratch now is officially open source I'd go with the full code version :-)
natürlich nicht ;-) ist aber ein Fehler im Java-Player, wenn Du das project in Scratch laufen lässt, funktioniert es richtig (das ist übrigens - leider - bei vielen Projekten mit Listen der Fall)
Very cool! Thanks for your comment, by the way, about Repeat After Me... I have been MIA for a few months in the startup of school. I'll friend you on Facebook, promise.
Have you considered Radix Sort? It's supposed to be very efficient for numbers since it only has to do n*log(m) passes, where m is the maximum of the number of digits in the numbers. Unless the numbers are quite long or the list is quite short, you should see an improvement over n*log(n) sorting that you get with Insertion Sort
Thanks! I'm just now pretty occupied with other stuff than another sorting project, why don't you give radix sort a try, sounds like there could be some improvement there over my insertion sort variants.
Wow, much faster than the other one, and the algorithm is simpler too! Amazing! I am surprised to find, however, that in presentation mode, it actually runs slower than in edit mode, and edit mode runs slower than online. I guess online wins! Great project, loved & faved!
It's an interesting algorithm I came up with while riding my bycicle to work the other day, gotta find out if somebody already published/named it before, lol!
Nice. That's getting to the speed that it could actually be useful in realtime.
Download this project!
Download the 3 sprites and 9 scripts of "ScratchSort" and open it in Scratch
Project Notes
This project is another attempt at finding a sorting algorithm that is fast enough to be useful in Scratch.
I'm suggesting a variant of the Insertion Sort which makes use of the fact that the output list is already sorted as it is built, to find the insertable element's position much quicker.
this project compares this "new" ScratchSort algorithm to my previous sorting champion "ThreadSort".
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
pretty awesome! :)
put it on turbo speed: it would do it in seconds(which it already does)!
Excuse me, paddle2see told me that you know how to hack scratch. Can you please tell me how?
Why don't you just use the published source code? Scratch is not really locked down, so if you find a bug you'll be able to break into your Scratch image and modify it. However, this won't be fun because the sources you'll see will be incomplete (without comments and full variable names). So, since Scratch now is officially open source I'd go with the full code version :-)
(view all replies)komisch, bei ScratchSort ist die liste hinterher gar nicht sortiert. ist das absicht?
natürlich nicht ;-) ist aber ein Fehler im Java-Player, wenn Du das project in Scratch laufen lässt, funktioniert es richtig (das ist übrigens - leider - bei vielen Projekten mit Listen der Fall)
Whoa! This is much faster than mine. (link to project)
ohh
Very cool! Thanks for your comment, by the way, about Repeat After Me... I have been MIA for a few months in the startup of school. I'll friend you on Facebook, promise. Have you considered Radix Sort? It's supposed to be very efficient for numbers since it only has to do n*log(m) passes, where m is the maximum of the number of digits in the numbers. Unless the numbers are quite long or the list is quite short, you should see an improvement over n*log(n) sorting that you get with Insertion Sort
Thanks! I'm just now pretty occupied with other stuff than another sorting project, why don't you give radix sort a try, sounds like there could be some improvement there over my insertion sort variants.
sorry about the forums problem
(link to project) what do you think is this faster i added 2 more to my other version and it goes fast!
Wow, much faster than the other one, and the algorithm is simpler too! Amazing! I am surprised to find, however, that in presentation mode, it actually runs slower than in edit mode, and edit mode runs slower than online. I guess online wins! Great project, loved & faved!
I am surprised, too, that presentation mode runs a *lot* slower with list watchers than development mode, because usually it's the other way round.
Very nice! That's pretty fast!
It's an interesting algorithm I came up with while riding my bycicle to work the other day, gotta find out if somebody already published/named it before, lol!
Nice. That's getting to the speed that it could actually be useful in realtime.