During the second year of university, I created a kernel for the ARMv7 instruction set. I went above and beyond what was required on this project, achieving a clean design and features such as a blocked process queue, piping, kill, and a simple filesystem. This was my favourite coursework so far. I found it very interesting to learn about and implement the things that we take for granted as programmers.536
To get more than 50% on our coursework, you had to submit extensions. Here are some of my favourite ones.
I created a Pong clone using C and SDL.
I created a Chess game and Chess minimax implementation in C.
Infinite and Generic Game of Life, and more
- Chunk based infinite universe. Automatically expands.
- Interactive player and universe editor using SDL.
- Can set the Born/Survive ruleset code (from command line).
- Can choose the number to steps to take before opening the player or outputting to stdout (from command line).
- Has tests.
One of the areas in computer science that interests me is artificial intelligence. I’ve done some projects experimenting in this area:
ESME, a pattern matching AI similar to Eliza
ESME is a very old project which uses simple pattern matching to do things like “my name is foo bar” → “Hello foo bar”.
As one of my computer science projects, I created an implementation of the minimax algorithm. Unfortunately, due to time restraints, I was unable to implement optimisations such as composition tables and position hashing. This caused the Chess AI to be limited to only looked 5/6 moves ahead, any more caused minutes worth of processing time. This lack of depth caused it to make bad choices.123
Hello 2015! Recently I have created an implementation of the 3D projection algorithm. It is just wireframe models. It works pretty well, except it doesn’t do frustum culling. You still see things that are behind you, but upside down.
The source code of this implementation is available under the WTFPL or CC0 licenses - you can choose which one you want to use. Use WASD to move, arrow keys to rotate, space to ascend and shift to descend.80
Recently I have been looking at languages and compilation: VMs, parse trees, lexers, and interpreters. Nand to tetris is a pretty awesome guide to how the CPU executes programs - from logic gates to high level languages.
Assembler and Bytecode VM
I created an assembler and Virtual Machine to run assembly style instructions. I haven’t released it as it isn’t as complete as I want it yet.
Parse Trees and Reverse Polish Notation (RPN)
Turns a string such as “( 0 - (6) + ( 6 ^ 2 - 4 * 1 * 5 ) ^ (1 / 2) ) / ( 2 * 1)” into a binary syntax tree, and then into Reverse Polish Notation, and then executes it.
I have also experimented with a simple Lexical Analysisor, however it’s not at a state that I’d like to release.
Befunge is an esoteric programming language - a language which isn’t meant for pratical use, but rather to test programming use. The language consists of a two dimensional grid of characters. Each character is an individual instruction. I was disappointed that the authors didn’t take it seriously enough, and didn’t add input and output to it. So, I created my own! I called it ‘Rufunge’. It’s not finished yet, but can currently run most Befunge programs.
Mesecode is a language which compiles to Lua. It’s purpose it to make definitions in Minetest easier to read.
You can write:
mod default node Stone is ground, cracky=3, stone drops Cobble