Skip to content

Ledmington/personal

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".
  • 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 a tentative java implementation of a simple compression algorithm
  • diet is a personal java implementation of the simplex algorithm applied to solve the "diet problem"
  • mergesort is a performance comparison between 5 different C implementations of the Merge-Sort algorithm.
  • necklace is a little Python script that compares some algorithms which solve the necklace problem.
  • 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.
  • 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.
  • 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.