Personal Projects

Current

These are projects that are currently at the top of my bucket list, and that will probably receive updates in the near future.

Chess Engine

I wrote a chess engine in C a few years back, utilizing alpha-beta search and combined with a basic evaluation function on a mailbox-style chess board. While currently the chess engine works, it's not very fast, so I want to make some enhancements.

Plans

  • Add additional heuristics to search algorithm
    • Killer Heuristic
    • History Heuristic
    • Static Exchange Evaluation
  • Implement zobrist hashing and transposition tables
  • Convert mailbox approach to use bitboards or 0x88
  • Refactor oversized functions
  • Convert codebase to use ANSI/ISO90 C
  • Change management of global state to be less clunky
  • Enhance evaluation function (and investigate using NNUE)
  • Implement UCI Parser
  • Implement non-core rules
    • 50 move rule
    • Stalemate by repetition
    • 75 move rule
    • En passant
    • Non-Queen promotion

Progress

  • Move generation algorithm complete
  • Evaluation function complete
  • Core alpha-beta search complete
  • Basic UCI interactivity complete

Text Predictor

This is a program that loads a user's chat history into a dynamic list and autoregressively generates new text based on the history. Currently for simplicity a naive Markov Chain is implemented.

Plans

  • Implement HMM and parts of speech tagging
  • Enable context splitting
  • Implement secondary markov chains for analyzing context
  • Explore use of small RNNs
  • Implement proper <|endoftext|>s tagging

Progress

  • Prefix-Sum based optimization for memory efficiency implemented
  • Text prediction framework complete
  • Rudimentary user interface complete

Storywriting Engine

A program that aims to be a procedurally generated analogue of text-based games like Zork, taking inspiration from games like Dwarf Fortress. The ultimate goal is to be able to subjectively coherent, if not necessarily interesting, stories and automatically generated puzzles.

Plans

  • Event Queue/Timeline
  • Centralize cause/effect tables
  • Debug move map generation and implement unit tests/visualizations
  • Write descriptions, characteristics, and actions for 5 core character types
  • Enhance command parser with more options
  • Improve user interface and add command-line interface
  • Add ability to save game state
  • Tune randomization parameters
  • Implement combat/exploration mechanics
  • Investigate implementation of storytelling strategies

Progress

  • Basic Parser + part of text identifier complete
  • Basic tile-based room generation complete
  • Placeholder random events written

Upcoming

These are projects for which I have not yet started development, but that are extremely interesting to me. For the most part, these are also projects that I don't yet feel I have the skill to properly complete, so they're sitting on the backburner for the forseeable future.

Z80 Computer

A computer using multiple Zilog Z80 cores in a laptop form factor capable of running CP/M and emulating popular systems from the 80s time period

Plans

  • Manufacture wooden/aluminum shell
  • Port CP/M and implement basic support for SMT
  • Port Fuzix
  • Incorporate 8 zilog z80/ez80 microprocessors
  • Implement paging for 16MB of shared memory (sram/dram, not sure)
  • Add support for USB/Serial interfaces at low speeds
  • Add support for eDP display at low refresh rate using only time-period parts

Progress

  • Researching eDP protocol specifications in progress
  • Researching similar projects and limitations in progress

Inspiration

My original inspiration for this project came from my interest in Texas Instruments graphing calculators. While I loved the form factor, I felt that it was slightly limiting due to the OS and the lack of customizability with regards to hardware.

Around the same time, I got interested in 80s computing, specifically AT&T boxes, the IBM 5150, and the TRS-80. Looking into their design, while it was certainly much more complex than anything I have every attempted, it still seemed feasible with a lot of learning and experimentation.

More recently, I've started seeing fan projects like the Zedripper and Ben Eater's 65c02 computer that have explored super cool ideas with 80s microprocessors and made me want to build my own incarnation. While I don't think I currently have all the requisite knowledge to design the PCB, I've started playing around with KiCAD and sort of learning electrical engineering casually to build towards this project.

Grammar Analyzer

A program like Grammarly with a greater understanding of grammatical structure and the ability to heuristically resolve problematic sentences given limited contextual information, approximate string matching, and a database of the most common patterns. A primary goal is to avoid using neural networks and generally to optimize performance for a low-end computer on a single thread.

Plans

  • Ability to correctly tag the word classes in a correctly-formed sentence
  • Resolve mis-spelled words based on morphological similarity and context
  • Reorder malformed sentences based on word classes and structure
  • Easily user-modifiable list of grammatical "style" patterns
  • Ability to "learn" new words through Bayesian Inference
  • Ability to probabilistically identify patterns through Bayesian Inference
  • Ability to infer function of unknown words based on context and position
  • Emacs, Vim, Neovim, and Libreoffice plugins

Progress

  • Began study of rhetorical grammar
  • Identified "seed" databases (Wordnet et al., GCIDE) for analysis
  • Investigating resources for Computational Semantics and Linguistics

Inspiration

Since learning to program, I was curious about how the spell checker and writing style editor worked in Grammarly and Google Docs. It seemed that there was no better way than brute force, which would be probitively expensive, given the sheer size of the English Language.

More recently, I've become interested through programs like the semi-incredible (at least to me) SHRDLU in Computational Linguistics using deterministic rules and in the ability to learn structured information in systems like Prolog "Databases." Given the already impressive capabilities of pre-AI Google and Wolfram-Alpha, I thought it wouldn't be unreasonable to assume that it is possible to write a program that can reasonably learn patterns and correct speech.

Overall, I see this project as a small stepping stone to a classical AI that is capable of ascertaining relationships between ideas by reading unstructured data, like a Wikipedia article, for instance. Being able to analyze grammatical structure and to learn equivalences in language was something I saw as a "step 0."

Natural Language - Computational Graph Interface

A program meant to take natural language queries and reinterpret them as structured computational graphs that can be analyzed by traditional solvers and database analyses using a neural network.

Plans

  • Modular Neural Network interface
  • Ability to understand context and determine the nature of a query
  • Ability to reinterpret sentences as Prolog-like facts
  • Ability to classify queries to determine which solver to use
  • Ability to use an LLM to interpret computational/logical conclusions

Progress

  • Studying Statistical Learning

Inspiration

The idea came to me when I was reading online about Anki's "Vector" bot's abilities to understand human queries by converting them into computational queries. This, combined with Wolfram Alpha's ability to do so as well, made me wonder if this was the approach that might be successful with regards to unifying classical algorithms in logic and decision makings to LLMs.

While I don't have enough knowledge about the field yet to know if my assumptions are wildly wrong, my impression is that the LLM would merely serve as a buffer to interpret ambiguous language and recast it as logical symbols, while something like a SAT solver or automated theorem prover would work in the background to make connections and determine answers to questions, or just to update a local knowledge database.

While this approach is not as useful for most people who use LLMs for LLM-stuff, I feel like it's an interesting idea that plays to the strengths of Neural Networks (identifying patterns and handling ambiguity) in addition to traditional algorithms (efficiency, provable correctness, interpretability). If nothing else, I'm curious to see why this presumption could turn out to be incorrect.

Currently inactive

These are projects that I've worked on in the past and am interested in, but are not top prorities either because they don't have many applicable skills to other projects, there are knowledge barriers that I have to overcome before I can continue work, or I'm just less interested and have not prioritized them for one reason or another.

File Management Utilities

A shell script providing useful utilities for dealing with heavily nested directories, which I wrote when I was trying to back up files from an android phone with a certain filename extension.

Progress

  • Created man page documentation for functions
  • Allowed for regular-expression based opterations
  • Created destructive and non-destructive operation types
  • Allowed for handling of stdin
  • Specify target destinations like with standard unix commands

Reason for Inactivity

I would like to rewrite the shell script as a C program to improve the performance and deal with the warts in the program. Additionally, I want to make a more intuitive rule system rather than excusively using regular expressions since the original goal was to allow this to be used by others, as well.

Since all of the changes I want to make are fairly superficial and don't change the functionality all that much, I decided that editing this project is not a high priority, and until further notice, I've left it as inactive.

File Manager

A file management program written in Clojure that was intended to specialize in handling images and automatically sorting them and displaying statistics, for example by plotting geolocation tags on a OSM map and using OpenCV libraries to tag and sort images.

Progress

  • Implemented basic interface with Java Swing
  • Implemented backends for copying, deleting, moving functions
  • Integrated OpenStreetMap pane
  • Integrated EXIF data parser

Reason for Inactivity

At the moment, the code is poorly written and requires a significant deal of refactoring and cleaning before new features can be added. Also, file handling is currently performed exclusively with a single thread, leading to noticeable pauses as new directories are loaded into memory.

I have no experience writing asynchronous or concurrent code, so I decided that this project should be one that I return to when learning to write multithreaded code becomes a greater priority for me. Also, I feel that I need to learn more about image processing so that I can effectively choose and use OpenCV modules. Thus, until further notice and further discussion with the person who this project was meant for, I'm leaving it as inactive.

Blackjack in Curses

A terminal implementation of blackjack with ASCII representations of cards.

Plans

  • Card counting AI for dealer
  • Extended command interface and improved output window
  • Full support for rules of Blackjack, including splitting

Progress

  • Ncurses interface
  • Basic command interface
  • Extremely rudimentary Dealer AI
  • Basic rules of Blackjack

Reason for Inactivity

The blackjack curses program was just a small side project meant to help learn to use ncurses. Since it's not a big priority and most of my work will (like the others) be refactoring and cleaning up the codebase, I've decided to leave it as inactive, though there's a greater chance I'll pick it up again since there are quite a few small features I can implement.

Auburn

An autumn leaf simulator with a fluid simulator.

Plans

  • Create proper Autumn-themed background
  • Replace circles for leaves with leaf textures
  • Create new algorithm for shimmering leaves
  • Polish mouse interactivity

Progress

  • Raylib keyboard/mouse interface
  • Basic fluid simulator
  • Basic physics simulator for individual leaves

Reason for Inactivity

While I think this is an interesting project and I think I could reach a reasonable state of completion, it's not a major priority since, again, it was taken up mostly on a whim for fun rather than with a clear focus in mind.

Dumpster Memory Manager

A garbage collection framework meant for programs written in C with aims to support modern algorithms in conservative garbage collectors.

Progress

  • Implementation of Mark-Sweep Algorithm
  • Incremental garbage collection
  • Conservative heap pointer identification
  • Single header library implementation

Reason for Inactivity

I tried reading a few papers outlining new garbage collection theoretical frameworks and found that it was a major struggle understanding them since my mathematical skills aren't very well developed. In order to move forward with this project, I think it's important for me to gain a deeper understanding of computing theory and formal mathematics. Hence, I'm leaving it as inactive for now.

Grey Christmas

A machine learning model aiming to predict the probability of experiencing a snowy Christmas based on the weather in the past year.

Plans

  • Add dataloader support for different dataset formats
  • Create modules for downloading weather data from trusted online repositories
  • Add support for variable sized context windows
  • Add support to add additional December data as Christmas nears
  • Optimize model hyperparameters
  • Implement proper testbench

Progress

  • Implemented Resnet-based model for classification
  • Implemented Dataloader for Government of Canada daily climate observations
  • Added inference for fixed context window of all days from January to November

Reason for Inactivity

I think I need a stronger basis in general statistical learning before I can move on to Neural Networks. While working on this project, it was difficult to understand why changing some parameters like batch normalization had such a profound effect on the model's performance. So, until I feel more confident in deep learning, I'll leave this project inactive.

An Arbitrary Precision Math Library

An arbitrary precision fixed point math library that aims to support computations on different integer bases.

Plans

  • Implement fast multiplication through Strassen-Schonhage Algorithm
  • Implement fast division
  • Implement full base conversion
  • Implement algorithms for computing results of basic transcendental functions
  • Refine API for accessing math functions
  • Create more reliable testbench

Progress

  • Memory management routines implemented
  • Addition and Subtraction Implemented
  • Modular arithmetic of a constant implemented
  • Constant multiplication implemented

Reason for Inactivity

While this project is certainly interesting, even I have to recognize that it is not strictly useful since there already exist much more efficient libraries like GNU GMP (though admittedly they don't support non-base 10 calculations in general). Regardless, since it's not a big priority, I've left it as inactive for now.

Halloween Storybook

An unconventional programming language that tries to use vocabulary that might be found in a storybook in order to represent mundane operations. Transpiles to Common Lisp.

Plans

  • Add synonyms for phrases
  • Improve semantics for lists
  • Improve error messages on syntax/compile errors
  • Improve Lexer reliability

Features

  • Transpiles to Common Lisp files
  • Support for variables, lists and control flow

Reason for Inactivity

At the moment, I don't have much experience with compiler design. I think the lexer and parser both likely need to be rewritten to some extent, and I would like to support multiple targets, particularly C rather than just Common Lisp.

Since I don't have much theoretical knowledge at the moment and this project isn't a major priority for me, I've therefore left it inactive.

Griddle Me This

A convolutional neural network that tries to predict the best move given a position.

Features

  • Legal move generation
  • Move probability distribution generator

Reason for Inactivity

This was my first machine learning project, and again I don't have a very deep theoretical knowledge how to work with deep learning models, so I would like to spend more time learning before I continue trying to improve this model. I've therefore left it inactive.

Foreign Relay

A simple ncurses game where you play the role of a relay station that is tasked with transmitting the core ideas from corrupted messages.

Plans

  • Improved inter-civilization mechanics
  • Automatically generated backstory
  • Aspects of base-building games

Features

  • Ncurses interface
  • Parameterized message scrambling
  • Visual Similarity based corruption
  • Basic set of civilization properties

Reason for Inactivity

This was another small side project I took on for the fun so that I could work more on using ncurses. While I do eventually plan to build it into a more fully-fledged game (including adding gameplay mechanics that aren't just reading letters), for the moment it's not super important that I work on it, so I've left it as inactive.

Cpace Chess

A space chess engine written in ANSI/ISO90 C, specifically conforming to the rules of Raumschach.

Plans

  • Improve search pruning and alpha-beta performance
  • Write unit tests to confirm correct move functionality for pieces
  • Implement static exchange evaluation
  • Investigate NNUE and self-play to replace evaluation function
  • Improve UCI-esque interface

Features

  • UCI-inspired command line interface
  • Alpha-beta pruned search
  • Mailbox style board and move generation
  • Basic material-based evaluation function

Reason for Inactivity

I do plan to continue work on the chess engine, especially as I get deeper into my primary (orthochess) program. At the moment since I have very little intution on how to play Raumschach (and indeed, Raumschach theory seems almost non-existent), I'm finding it difficult to deal with simple things like static evaluation. As a result, I think that it would be important to learn how to use NNUE and self-play to improve evaluation rather than hand-coded rules. Until I become more familiar with those techniques, and with techniques meant for chess engine optimization in general, I'll stay mostly inactive on this project.