Projects

LensLingo - AI Image Captioner

Made in Python

Two teamates and I created a neural network that generates captions for images, useful for accesibility features and image searching.

Using a dataset of 8,092 images we selected from Kaggle, we researched and tested many different model architectures to build the best model for our dataset. We used a CNN to extract features from the images and a Bidirectional LSTM to generate captions. Once our model was build, we used Weights and Biases to fine-tune our hyperparameters. Our final model acheived a BLEU-1 score (a measure of how well our model's captions match the human-generated captions) of 0.5687, with a 0.6-0.7 being the best score that can resonably be acheived.

Limited to a small dataset by the processing power of our laptops, we were quite satisfied with the results we achieved. Building this model was a tremendous learning experience and made me excited to build more neural networks.

AI Teeko Player

Made in Python

I created an AI Teeko player in Python using a minimax algorithm, which wins 70% of the time against random players.

I devised a heurisitc that took into account the number of pieces on the board for each player, the number of pieces in a row for each player, and the locations of the pieces. I valued pieces that were closer to the center of the board, since there are more opportunities for a win with a peice in the center of the board.

I calcuated a heuristic value based on these pieces of information and fed it into my minimax algorithm to determine the AI's next move.

Reinforment Learning Agent for Frozen Lake Environment from Open AI Gym

Made in Python

I created an agent to play in the Frozen Lake environment, operating with an epsilon-greedy Q-learning policy.

The agent improves through trial and error, as it slowly learns the best path to get to the prize without falling in the water. An epsilon-greedy policy means the agent will primarily choose to go in the direction with the highest estimated reward, while sometimes exploring new pathways. This ensures the agent retains knowledge of it's previous moves while still trying to find the optimal path.

The agent acheived an average episode-reward over 100 episodes of 0.75.

Carseat Sales Predictor Model

Made in R

I analyzed car seat sales from the ISLR Carseats dataset and used multiple methods to identify and verify important predictors of sale quantities. Methods included LASSO (least absolute shrinkage and selection operator), stepwise regression, and ridge regression.

Using these predictors, I created an accurate model with a mean squared error of only 7.56.

Pictured is a table of the predictors with their respective coefficients from the LASSO model. In this model, all the quantitative predictors except for population were signifcant, so all were used.

7-Tile Puzzle Solver

Made in Python

I wrote a program that can solve the 7-tile puzzle problem, where the player is given 7 randomly assorted tiles and needs to arrange them in order from 1-7.

Given a set of 9 numbers (with two being 0s to indicate empty spaces), the program will find the shortest number of moves to solve the puzzle, and return the moves to the user.

The program uses the A* search aglorithm with a priority queue to find the set with the least amount of moves to solve the puzzle. For a heurisitc, I took the sum of the Manhattan distances of each tile from its current position to the position it has to be in.

Heap Simulator

Made in C

I coded a heap simulator that dynamically allocates blocks which include the header, payload, and footer of the block. The heap follows a best-fit policy, use free block splitting and free block coalescing to use heap space as efficiently as possible.

The blocks sizes are allocated in multiple of 8 bytes, with at minimum 4 bytes for a header and 4 bytes for a footer.

When a block of memory is to be allocated, the program checks to see if there is an open free block. The program checks all free blocks and chooses the one closest in size to the requested allocation. Any remaining unused bytes in the newly allocated block will be split off into a new free block. If the free blocks are not large enough, the program will coalesce adjacent free blocks together to make room for the new allocated block.

Cache Simulator

Made in C

I coded a cache simulator that can have a variable amount of sets, lines per set, and block sizes.

Given these parameters and an input of blocks into the cache, the simulator will count the number of cache hits, misses, and evictions during the simulation.

In this screenshot, s = # of sets, E = # of lines per set, and b = # of bytes per block