My Projects

Reinforcement Learning

April 2024
  • 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.

Reinforcement Learning Video Thumbnail

FOLD3R

March 2022
  • 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.

Some example folds created by FOLD3R programs

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.fold3ras 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

July 2021
  • 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

July 2021
  • 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
Start

Minesweeper AI

March 2021
  • 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

March 2021
  • 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.

Restaurant Management System Video Thumbnail

Calculator

December 2020
  • 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.

Calculator Video Thumbnail

Cards Against Humanity

July 2020
  • 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.

Cards Against Humanity Video Thumbnail

3D File Viewer

May 2020
  • 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.objfile 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.

3d Rasterizer Video Thumbnail

Boids

April 2020
  • 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.

Fish Game Video Thumbnail

Raycasting Engine

February 2020
  • 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.

Raycasting Program Video Thumbnail

RHUL Bus Timetable

September 2019
  • 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.

Screenshot of the bus timetable site

AutoSnake

May 2019
  • 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.

AutoSnake Video Thumbnail

Particle Physics Simulation

April 2019
  • 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.

Particle Physics Video Thumbnail

Asteroids

December 2018
  • 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.

Asteroid Game Video Thumbnail

Mandelbrot Set Visualizer

November 2018
  • 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.

Mandelbrot Video Thumbnail