Take the shortest route, the one that nature planned Marcus Aurelius, Meditations Genetic algorithms are really interesting in my opinion. Not the most efficient, but rather beautiful in the way they work. I especially like them because of the similarities that they share with life. Genetic algorithms are special kind of algorithms that work by modelling how natural selection works in the real world. I shouldn’t need to explain how evolution works, but for the sake of it, here I go. We have several individuals in a population, given their environment, some of the individual are better suited and reproduce, …
Tag: python
Diffraction patterns in astronomical imaging
The first image from the James Webb Space Telescope (JWST) was uncover a few days ago [1]. This is truely an incredible image, showing the galactic cluster SMACS 0723, which is slowly becoming the de-facto target for newly deployed space telescopes as it was imaged by Hubble, Planck and Chandra before JWST. This image in particular took the JWST 12.5 hours of exposure to be able to see these objects as they are so dim in the sky. The best way to see how much of an achievement this is, is to compare it to the previous picture, taken by …
A new surprising sorting algorithm
Just a small post today. I stumbled upon a paper [1] on ArXiv recently on a surprising sorting algorithm that was discovered pretty recently (in October 2021). Here is a quick implementation I wrote in Python: It’s not the most efficient algorithm obviously, as it will always do n2 comparisons. It is an O(n2) algorithm in the best case and worst case scenario. There are much more advanced algorithms out there that go down to O(n log n) in average, so much faster and more efficient. This algorithm is more like a curiosity, based on how simply the sorting is …