My Projects
Reinforcement Learning
- Python
- Qt
- NumPy
- Numba
For my degree’s final year project, I created a program that simulated reinforcement learning. In this environment, the agents learn to navigate a grid-based world and choose actions to maximise their reward signal. The program implements Value Iteration and Q-Learning. The Q-Learning Agent is implemented with three different exploration strategies:
- Epsilon-Greedy
- Upper Confidence Bound
- Model Free Best Policy Identification
The program is equipped with various views and controls. These features enable analysis of the agents and their performance, which was necessary for writing the report.
FOLD3R
- Java
- JavaFX
- ART
I created my domain-specific programming language as part of the software language engineering module. Inspired by an origami bird, I wanted to develop a programming language for manipulating sheet material such as paper. I thought code could be a precise and efficient method for describing these folds, especially repetitive ones.
The primary operation of my language is creating folds. Folds are defined between these control points, which can be placed at any point along any edge. I had hoped to develop the syntax much further to support first-class functions and closures, but due to time constraints and the complexity of developing the backend, I could not implement this. The backend required that I handle the surfaces manually, creating my own triangulation and transformation systems.
Here isfan.fold3r
as an example program:
angle <- 40.0;
count <- 10;
topLeft, bottomLeft, bottomRight, topRight <- createA4();
leftMiddle <- mix(topLeft,bottomLeft,0.5);
i <- 0;
cur <- topRight;
progress <- 0.0;
while(i < count){
lastProgress <- progress;
progress <- (cast(i, double)+0.5) / cast(count, double);
factor <- (progress-lastProgress)/(1.0-lastProgress);
cur <- mix(cur,bottomRight,factor);
if(i % 2 = 0){
vally(leftMiddle, cur, angle);
}else{
mountain(leftMiddle, cur, angle);
}
i <- i + 1;
}
AutoSnake 2
- TS
- HTML5 Canvas
This project was a new and improved program for automatically playing snake. Unlike the last version, this program uses hamiltonian cycles to ensure that the snake never traps itself. Like the previous version it uses search to adapt its path to efficiently reach the goals.
Towers of Hanoi
- JS
- HTML5 Canvas
In this project, I wrote a program to demonstrate and solve the Towers of Hanoi problem. The program uses a recursive solution to the 3-peg Tower of Hanoi problem. JS Promises are used in the recursive function to slow down and animate its execution for visualisation.
The rules of the game:
- The whole tower must be moved from one peg to another
- Only one block can be moved at a time
- A block cannot be placed on top of a smaller block
Minesweeper AI
- TS
- SolidJS
I was inspired by a Video by Code Bullet on his AI that predicts the arrangement of mines within the minesweeper game via brute-forcing combinations of mines and recording what spaces are safe. I have tried to improve upon this approach by avoiding brute-forcing and instead tracking and decomposing groups of cells until the probability of a mine in that range is either certainly a mine or not.
The AI has no inside knowledge of the actual arrangements of the mines; it knows as much as you can see. It can use any knowledge that it can derive from the available information. You can make decisions manually by selecting a cell or pressing the stop button to let the AI make a move for you. You can mix and match manual and AI decisions to get support or to test how the AI will react.
Restaurant Management System
- Java
- SpringBoot
- PostgreSQL
- SocksJS
As a team project, a few students and I following a specification and the scrum process developed a restaurant management system. This restaurant management system allowed for multiple restaurants and tracked tables, orders and staff. It supported real time updates and much more.
Credit to Ben Hamer for this video.
Calculator
- Java
- Maven
- SVN
- JUnit
As part of my software engineering module, I have created a calculator capable of interpreting infix and reverse polish (postfix) notation formulas and computing their result. This calculator was made with the MVC architecture and had a graphical and command-line interfaces. The calculator also supports the use of arbitrary variables.
Cards Against Humanity
- Node
- Express
- WebSockets
During the pandemic my friends and I would play a few games online then we thought it would be cool to add our own cards to cards against humanity like withskribbl.iobut I found no easy way to do this so as a way of filling the time I created an online multiplayer cards against humanity game and added some of our own cards. It worked really well and I’m happy with it.
3D File Viewer
- Java
- Swing
- AWT
- Maven
I realized I had a good understanding of how 3D engines worked so I thought I would have a go at creating my own. This program is a simple 3D rasteriser with smooth shading and directional lighting. The program can load arbitrary 3D model files in the.obj
file format. This is really just for fun as it doesn’t use any hardware acceleration or even make full use of vectorisation on the CPU.
Boids
- Python
- SimpleGui
- Numpy
- Numba
As part of university coursework, I implemented aboidalgorithm in python. The boid algorithm is made up of three rules that simulate the flocking behaviour of animals like birds and fish. This was part of a larger fishing game that I was a part of creating. I also greeted the wave effect that was harder than it looked the library we are using didn’t support masking so the waves are actually drawn on top of the background image in reveres order calculating the interactions of the waves so they don’t overlap.
This boid algorithm was a component of a larger fishing game project that we made a group project.
Raycasting Engine
- Python
- SimpleGui
To familiarise myself with a vector math and graphics library that a module required us to learn. I made a number of experiments, This program is one of them, it is 3D raycasting engine based on the approach used by Wolfenstein and DOOM.
RHUL Bus Timetable
- JS
- HTML
- MaterializeCSS
This is a tool that I created to simplify the campus bus timetable that was just given as an unintuitive spreadsheet that required to search through to find what you are looking for. I show the upcoming busses from a location in chronological view allowing the user to see departure and arrival times. It even allows you to look back at different time or days for planning.
AutoSnake
- VB.net
Inspired by a video made by Code Bullet on his own AI built to beat the game of snake I thought I could use a search-based solution to achieve similar results. Unfortunately, my solution is shortsighted, it focuses more on reaching its goal rather than surviving to reach the next so can get stuck.
Particle Physics Simulation
- VB.net
This program implemented a simple particle simulation resolving collisions and momentum. It does not optimise collisions detection with any spatial partitioning techniques so was limited in its particle capacity.
Asteroids
- VB.net
I created my own version of the game Asteroids in Visual basic, it has a simple game loop with a score, health and pause menu. The program supports a variable frame rate, with collision detection and momentum-based physics. The asteroids are procedurally generated. This is old so please forgive me for writing my name over it in massive lettering.
Mandelbrot Set Visualizer
- VB.net
This was a unoptimised naive implementation of the escape time algorithm for the mandelbrot set. The program had simple keyboard controls for panning and zooming. While the video is monochrome I had experimented with a couple other colourisation options.