Skip to content

Ledmington/personal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Ledmington's personal repository

This repository is an archive for my personal little projects. Too little to get each one a dedicated repo. These programs are mostly implementation of strange data structures or algorithms to beat some real-world games. I usually implement these in a day or two, just for fun. For this reason, they may have some serious bugs. If you happen to find one, please let me know.

I hope you'll find something useful :)

Games

  • 36_cards is a little Python script that calculates the probability of winning a card solitaire game called "36 cards".
  • escaping_the_black_hole is a C++ algorithm which simulates random matches for a board game I invented (which is called "Escaping the Black Hole") in order to find the best deck composition.
  • merge is a minimal "merge" game like Little Alchemy.
  • orologio is a little Python script that calculates the probability of winning a card solitaire game called "Orologio" (the clock).
  • paroliere is a C implementation of a brute-force algorithm that finds all possible italian words in a game of "Paroliere" (it's very similar to Ruzzle).
  • secret_code is a C implementation of an algorithm that wins the game "Secret Code" against you (the game is similar to Mastermind).
  • word_guesser is a simple C game that guesses your word through binary search.

Algorithms and Data Structures

  • buckets is a comparison between different algorithms solving a problem which I think is NP-hard but I cannot find in the literature
  • codegen is a personal java implementation of a simulated annealing algorithm trying to find the optimal code which solves a given problem
  • compression is an attempt to invent a simple compression algorithm based on repeated subsequences of bits: it contains both the original Java implementation and a new C99 implementation
  • conjugate_gradient is a personal Rust implementation of the Conjugate Gradient method and an attempt to make it more stable by using the Kahan sum in the dot product
  • cuthill_mckee is a personal Rust implementation and visualization of the Cuthill-McKee algorithm
  • diet is a personal java implementation of the simplex algorithm applied to solve the "diet problem"
  • disk_bench is a comparison of different disk scheduling algorithms in Rust
  • kmeans is a little Rust implementation of the K-Means algorithm with plot generation.
  • kruskal_clustering is a Rust implementation of a simple clustering algorithm based on Kruskal's algorithm for the minimum vertex cover.
  • lev is a personal C++ implementation of various algorithms to compute the Levenshtein distance and one simple command-line application to find the most similar lines in a file
  • linear_regression is a personal Rust implementation of a linear regressor with a plot of the dataset
  • mergesort is a performance comparison between 5 different C implementations of the Merge-Sort algorithm.
  • min is an experimental non-deterministic minimization algorithm.
  • necklace is a little Python script that compares some algorithms which solve the necklace problem.
  • pca is a personal Rust implementation of a simple algorithm to compute the principal component analysis on an hypercube, project it onto 2d space and then plot it
  • poly is a java implementation of Newton's method to find roots of a polynomial in the complex plane
  • quad_tree is a performance comparison between serial and parallel implementations of the naive algorithm and a quad-tree when counting the collisions between some 2D circles.
  • queue contains my personal implementation of Circular Queue with Fixed Size (CQFS, for short) with tests and a little benchmark.
  • trie is a C implementation of the "Trie" data structure.
  • xor contains the 128, 256 and 512-bit implementations of the simple XOR hash algorithm.

Others

  • aliquot is a little java program to compute the Aliquot sequence.
  • bandwidth is a personal C/C++ implementation of a memory bandwidth benchmark to be compared to the de-facto standard: STREAM.
  • chem_speller is a python implementation of the algorithm to spell words only with atomic symbols which doesn't cheat unlike the original.
  • crawler is a little Python script that randomly explores all web pages, starting from one link and looking for new URLs inside the HTML code received.
  • gitstats is a little Rust program which generates a plot with the number of files and lines of code over time in a git repository.
  • magicsquare is a parallel C+OpenMP program that searches non-trivial magic squares.
  • matmul is a little benchmark to compare the speed of a naive matrix multiplication between: C++, vectorized C++ (with google highway), Java and vectorized Java (with the Vector API)
  • mincorr is a little C program that finds the array with minimum correlation with a given array.
  • mulper is a little java program to find the smallest numbers with the highest multiplicative persistence.
  • multiply_strings is a little experiment with the concept of "multiplying strings".

About

An archive of my personal little projects.

Topics

Resources

Stars

Watchers

Forks