Hi, I'm Henry
I'm a Computer Science student at the University of Cambridge.
I write here about various things that cross my mind, and also keep a record of a few of the more interesting bits of software I've written in my spare time. If you would like to contact me, you can send me an email at email@example.com.
Threes! RaspAI (2014)
Threes! RaspAI is an expectimax AI distributed across a small Raspberry Pi cluster which plays Threes!. Having implemented the game logic and an expectimax algorithm in C++, I integrated multithreading into the application using the C++11 threading library. Having parallelized the application on a single computer, I decided to extend the application by implementing a sockets-based distribution system to parallelize the AI across a cluster of Raspberry Pis.
Past Game End State
Here is the highest-scoring final game state:
Last move (#1035): right
Final score: 248826 (Δ=+3)
- hmercer.com (2011–present)
- Logical Candidate Methods Sudoku Solver (2013)
- Flickr Flow (2012–13)
- View all
Evaluating Logic Circuits with Ternary Logic Graphs
This article describes how a basic RS NOR flip-flop circuit can be simulated using a directed graph constructed with source nodes (which output a value to nodes), terminal nodes (which take input from nodes), and gate nodes (which take input from nodes, do something with it, and provide the output to nodes). This graph propagates changed values to simulate the flow of electricity in the real-life logic circuit. It is based on a ternary logic system, which consists of a third unknown value in addition to the normal true and false values. In this article, balanced ternary is used to represent these values: +1 for true, 0 for unknown, and -1 for false. The language used in this article is Swift, as I wanted to try it out here by building (the bones of) a circuit simulator iOS app.