Pathfinding: BFS, DFS, Dijkstra, A*
Four algorithms explore the same grid. Draw walls, add costly terrain and compare the visited cells and the cost of the path.
English interface, partly translated: navigation, lab, projects, series, about and contact are; the home page sections, the site search and the content itself (articles, tutorials, research) are still in French.
Decompose an image into LL, HL, LH and HH sub-bands over several levels, drop the small coefficients and measure what the reconstruction loses.
The discrete wavelet transform (DWT) rewrites an image as a reduced version plus the details needed to recover it. With the Haar wavelet, the simplest one, each pair of neighbouring pixels becomes:
Applied to rows then columns, the operation splits the image into four sub-bands:
| Sub-band | Rows | Columns | Content |
|---|---|---|---|
| LL | average | average | approximation: the image, half the size |
| HL | detail | average | horizontal variations: vertical edges |
| LH | average | detail | vertical variations: horizontal edges |
| HH | detail | detail | diagonal variations |
Repeating on LL gives the next level: this is multiresolution analysis. The factor makes the transform orthonormal: energy (sum of squares) is preserved, and the inverse transform reconstructs the image exactly.
In an image, flat areas dominate: almost all detail coefficients are close to zero, and most of the energy concentrates in LL. Small details can therefore be set to zero without visibly changing the image. Lower the kept-coefficients slider and follow the PSNR:
Above 40 dB, the difference is invisible; around 30 dB, blocks appear along edges — the signature of the Haar wavelet, which smoother wavelets (Daubechies, the CDF 9/7 of JPEG 2000) attenuate.
The same decomposition is used to denoise (noise spreads over small detail coefficients, which thresholding removes), to detect contours at several scales and to build texture descriptors. In computer vision, the LL/LH/HL/HH sub-bands also serve as inputs or lossless downsampling layers in some neural networks.
Four algorithms explore the same grid. Draw walls, add costly terrain and compare the visited cells and the cost of the path.
Pick a function, a starting point and a learning rate, then watch the point walk downhill: convergence, oscillations, divergence, local minima.
Three optimizers start from the same point on a two-variable surface. Compare their trajectories over the level curves: zigzag, momentum, adaptive step.