Projects
Left Image
Computer Science Projects

Computer Science Projects

Here are some of the projects and things I had done as a Computer Science student! This is not even close to a complete list but hold either my favorite or most difficult project from each class I had. It goes in chronological order so you can see my development over time! This is excluding my Senior Thesis class since it has its own page, but that was done right before Operating Systems.

× Preview Image
The Cycle (ASCII) (Second Semester)

This project was my COVID baby. After we all got kicked off campus in March of 2020, we were given our final project assignment in my introductory computer science course. I was stuck in the house all day and poured so much time into this project. I was getting into A Dark Room again (if you haven't played it I cannot recommend it enough. It's on mobile too!) and decided I wanted to do something similar for my project. The premise of the game, if you're unfamiliar, is that the player explores a top-down ASCII world gathering resources and growing their strength to explore more while unraveling an underlying storyline. I tried to incorporate a lot of that into mine. If you'd like to give it a try, you can download the files here!

Since at this point, I had about four months of coding experience and it all in Python, my options were limited. I started by designing a map for the player to explore and then using print() statements to load in the world at each step. It looks janky, but it worked enough! Getting interactions between the player and the world wasn't difficult since everything is stored in a 2D array, I could just check player position against the map and all player input was text-based. The most-confusing part was battles between the player and enemies. I wanted to have it more like A Dark Room with options and buttons for the player to press but I remember that interfering with player movement and I couldn't figure it out, so I ended up just having an auto-battler.

The Cycle Map
No More Lobsters! (Third Semester)

The next semester, I was in a data management course that utilized python to visualize and manipulate data in different ways using libraries like Pandas, Mesa, and NumPy. If you've ever had the pleasure of looking for online local data libraries to use, its not easy to find interesting ones. That being said, I got some cool data. My partner on the project and I came across lobster migration data. The data stated that mean lobster location is moving north (about 4.3 miles a year) due to increase in ocean waters, which is causing problems for fishermen in Maine as they get closer to Canadian waters and lose jurisdiction. We used Monte-Carlo simulations, choropleths, and agent-based modeling to predict when lobsters may move too far away to be realistically fished. This was a great project to me because it was the first time I had to incorporate a lot of techniques that I had been learning all semester. Here are some of the files, but more should be up soon! There have been some updates in the codebase I used, so it isn't working at the moment. I'll update it once I find the time.

Below is a chloropleth showing the average catch location of lobsters from 1972-2019. This shows their relative movement North as ocean temperatures rise. Additionally the Agent-based model video and graph shows the lobsters migration North and the struggle of Large fishing boats and Small fishing boats to continuously have to go further to get their normal catches.

Text-Based Minesweeper GUI Minesweeper
Minesweeper (Third Semester)

In my data structures course, we were learning Java and our first project was coming up. We were still online due to COVID so I had a lot of time to spend towards this. We needed to do something with a 2D array I believe, and for some reason Minesweeper was what I wanted to make. So the first step in making a minesweeper game, as it turns out, is knowing how to play minesweeper. First I learned how to play minesweeper (This was a mistake, I have a debilitating addiction to it that survives to this day). Then I got started on creating the board. This was a ton of fun as I had accidentally started using recursion without even realizing it. When a player selects a cell, if there are no bombs around it then it also opens up every cell around it. Additionally, every cell that is opened that also does not have a neighboring bomb does the same, and the method I made did the same. This is super obvious but at the time it blew my shit away how a core concept of the game can be coded so easily. Beyond that, the game is pretty simple and to be honest, not good. I plan on making a web-version as well at some point and some things to improve upon is instead of creating the map when the game starts, I need to create it on players first selection to make sure that they don't get a bomb on their first click, much like the Google version. The GUI version was a bit better since it kept track of how many flags should be placed, had a time, and players could just click instead of type in coordinates! Feel free to download the files here!

Text-Based Minesweeper GUI Minesweeper GUI fail Minesweeper

Robotics (Fourth Semester)

Robotics was the most annoying class I ever took. First day, Dr. Ferrer told us that instead of doing live demonstrations of our robot completing that weeks task, we just had to record a video of it doing such because they will never work when you want them to. He was right. It was so much fun translating code into physical movement with an arduino board and bread box but I cannot tell you how many times I would write the code for a project, test it, have it work perfect, then pull out my camera to record and it just decide to not work again for hours. Not only that, but my robot looked awful since we had to use an Android device to power it and run the app for image processing, and all I had was a tablet so half the robot was just counterweight made out of loose batteries and rubber bands. I did love the translation of images into useable data and the simplistic AI to implement into the robots.

For my final project I wanted to do something a bit new since we had worked with sonar and video but nothing with audio. I was able to find small microphones that was compatible with Arduino. They weren't anything crazy good but could measure decibel levels. The plan was to have the robot intake audio commands and then search around for a corresponding color and move to it. For the first few seconds of running it would gauge ambient sound levels as a baseline and then listen for noises outside of a normal threshold. Once it received instruction (in the form of multiple claps), it would spin and use a knn classifier to look for a specific color and then move towards it. The great news is that both of these worked perfectly. The bad news is that they didn't work together. So much time (both all nighters and office hours) led to no real conclusion and lots of confusion and unfortunately I never got them to work together. Below are some videos from that class that include the sound commands, topological avoidance, and one that just cracks me up every time I watch it.

Game Development (Fourth Semester)

This class was such a blast! We learned Unity development and explored not only how to make games but the theory and reasoning behind them. Over the course of the semester we made six games, the last one being an educational game from an on campus client. Mine ended up being Chem-Sim, which is talked about more in the Disco Tray Studios section of the website. My favorite games that I helped develop in this course were SnailMail and Pop! These, of course, are full of bugs and issues since they were the second and third game any of us had ever made and we only had a week to get them done. Still, they are adorable and actually kind of fun to play! I highly recommend you give them a shot! SnailMail is short and simple, but it included a lot of new fun things like TileMaps, particles, and collisions. Pop! was an awesome game to develop, although it is super buggy. You play as a popcorn kernel escaping a move theater popcorn machine and need to find four screwdrivers to escape. The goal of this game was a platformer with parallax backgrounds, animations, and NPCs with dialogue.

Text-Based Minesweeper GUI Minesweeper GUI fail Minesweeper

Algorithms! (Fifth Semester)

I don't have a ton of great coding examples from my coding class, but one of my favorite (but at first most hated) topic was dynamic programming. One of our assignments was to work on loose justification, the thing that makes all of your lines on the right side mostly line up so it isn't super jagged. This is a basic version of that written in Python, in which it only cares about empty space being given and aligns the words appropriately. Some versions (like in LateX) will give you a perfect alignment due to minor changes like specific letter font changes and spacing between letters.

                                    
main_dictionary = {}
opt_words = {}
breaks = {}
main_dictionary[0] = 0
dp = {}


def length(line):
    sums = 0
    for i in line:
        sums += len(i) + 1
    return sums


def just_helper(max_length, txt):
    if len(txt) == 0:
        return 0
    line = [txt[-1]]
    sums = {}
    temp = {}
    while length(line) - 1 <= max_length:
        current = (max_length - length(line) + 1) ** 2
        if (len(txt), len(line)) not in dp:
            dp[(len(txt), len(line))] = just_helper(max_length, txt[:len(txt) - len(line)])
        sums[len(line)] = current + dp[(len(txt), len(line))]
        temp[sums[len(line)]] = line.copy()
        if len(line) < len(txt):
            line.append(txt[-(len(line) + 1)])
        else:
            break

    main_dictionary[len(txt)] = min(sums.values())
    opt_words[len(txt)] = temp[main_dictionary[len(txt)]]
    return main_dictionary[len(txt)]


def justify(max_length, file):
    whole_text = ""
    f = open(file, 'r')
    f = f.read().split()
    just_helper(max_length, f)
    txt = []
    for i in range(len(f)):
        dp[0, i] = 0
    if len(f) in main_dictionary:
        count = len(f)
        while count > 0:
            line = ""
            for i in reversed(opt_words[count]):
                line += i + " "
            txt.append(line)
            count -= len(opt_words[count])

    for i in reversed(txt):
        whole_text += (i[:len(i) - 1]) + "\n"

    whole_text += "\n"
    whole_text += "Cost: " + str(main_dictionary[len(f)])
    new_file = open(f"neruda.{max_length}.Ian.out", 'w')
    new_file.write(whole_text)


dict = {}
sums = []
                                    
                                

Artificial Intelligence! (Sixth Semester)

I took Artificial Intelligence the semester after algorithms. There were a lot of fun projects in there, and nothing that super stood out so heres a lot! It was a really fun and interesting class that took a lot of concepts from algorithms and made them very apparent. We explored many different facets of AI in this course, both different types and the morality behind it. The entirety of all projects are available on my Github here. Most everything is written in Java and utilizes a GUI. We explored simple AI's such as a BFS maze solver, AlphaBeta checkers player, and a Q-learning robot; as well as more complex systems like neural networks, decision trees/forests, and Markov chains for language, sentiment, and handwriting learners. It was an awesome course and opened up my perspective on how AI is utilized, implemented, and most importantly saved from itself both in space/time complexity and it just trying to do all the wrong things.

Text-Based Minesweeper GUI Minesweeper GUI fail Minesweeper
Operating Systems (Eighth Semester)

This class was both the easiest and hardest class in my life. It was truly an unforgettable experience. The class was split into three main sections, and it started out simple enough with the command line and TCP sockets. The culmination of those two sections was that we created our own virtual command prompts and servers that we flooded with locusts to test the stability of (with some fun additional features like caching and IP remembrance). The last section dealing with the Kernel was something else entirely.

It had three main projects, and the first was both fun and easy! Connor and I got to work on it together (sadly the only project we ever worked on together our entire time at Hendrix) and we made a 2 player version of Tron with Snake features (like eating fruit to grow length). Instead of normal Rust, we had to use bare-metal Rust, which basically means without an operating system or the standard library. Besides not having access to mutable arrays and handling interrupts, it wasn't too different.

Everything changed when the File System attacked. The whole concept was creating a virtual RAM Disk to read and write from. Easy right? No. We had to create the blocks in the disk, appropriate correct informative data into them, and update them with test data with inodes. It was so confusing thinking in terms of unconnected blocks and switching between thinking in bits and bytes. I truly don't know how we ever got it done. Then, for the last project, we got to great SWIM (Simple Windowing Machine). I have mixed feelings about this one because although it took as long as the File System to make (like 30-50 hours idk I lost count) I actually had a lot of fun working on it (unlike the File System). The pictures below show it, and although there were many issues and small problems we also got it done. It was a bit easier as most of it was VGA buffer designing, File System bug fixes (yes, it haunted us beyond), and creating Heap/Garbage Collector, and a Process manager. The windowing was a little confusing at times because I set it up differently than what Dr. Ferrer planned for (which made it easier in the beginning, and way more confusing in the later stages) by having each window be a struct. The File System incorporation was awful because I didn't actually make the FS completely correct even though it passed all the tests, so I had to tweak some of the parameters of the SWIM to match the values given in the FS project. Then incorporating it actually needed permission to access some of Dr. Ferrers repositories which took so long to get set up (this was actually hilarious because at this point the project was already a week and a half late, but I was the first person to get to this point). The garbage collector was actually really easy (relatively) since it only took me a day. Then the process manager introduced a lot of bugs but luckily we only had to make a round-robin manager and nothing with a priority queue. After everything was done it was just a shit ton of testing and fixing of bugs (which was how we found out that Rust wouldn't support the requirements needed for four windows, so only the first three actually work) and we finally got it done! It was hell but a creating a VERY small operating system was a great sendoff and final project. It is also probably the best culmination of everything we had done in the course, although it didn't have any of the server stuff it had a lot of multi-threading and process handling. Anyway, give it a try if you'd like. Anyway here's a video. Thank you for reading all of this and learning more about what I've done!

chem Image