08-09-2025, 11:53 AM
I have been tinkering with AI (mainly Copilot) to reproduce those fascinating visual sorting programs. The AI is not 100% accurate when it comes to Naalaa, but in most cases, the syntax is somewhat easy enough for me to convert.... I have managed to replicate 6 popular sorting algorithms... Bubble, Insertion, Selection, Merge, Heap, Cocktail and the infamous Bogo sort.
One interesting thing I found was, inserting a 'wait' value of zero seconds has an effect on the speed of the sort. For example: Bubble sorting 200 samples with a 'wait 0' in the sort loop, takes about 41 seconds... remove the wait statement and the time is reduced to almost 8 seconds... apart from the Bogo sort, all other algorithms performed similarly.
Two points to remember... These visual sorting algorithms are a little mind-numbing and are purely here as "see if I can" experiment... the second: Bogo sort, in my opinion, is one of the most useless sort routines on the planet... try not to go beyond 5 elements to sort... All of the other algorithms use 200 elements... Moo Ha Ha Ha Ha.
sorting.zip (Size: 5.74 KB / Downloads: 10)
Remove the 'wait' statements and record the timings... Curious to know the results....
ps: Try to stay awake... lol
One interesting thing I found was, inserting a 'wait' value of zero seconds has an effect on the speed of the sort. For example: Bubble sorting 200 samples with a 'wait 0' in the sort loop, takes about 41 seconds... remove the wait statement and the time is reduced to almost 8 seconds... apart from the Bogo sort, all other algorithms performed similarly.
Two points to remember... These visual sorting algorithms are a little mind-numbing and are purely here as "see if I can" experiment... the second: Bogo sort, in my opinion, is one of the most useless sort routines on the planet... try not to go beyond 5 elements to sort... All of the other algorithms use 200 elements... Moo Ha Ha Ha Ha.
sorting.zip (Size: 5.74 KB / Downloads: 10)
Remove the 'wait' statements and record the timings... Curious to know the results....
ps: Try to stay awake... lol
Logic is the beginning of wisdom.


Never heard of coctail or bogo sort before though 