In this post I present my Christmas gift to the world: A multilayer perceptron written in C++11.
I mainly wrote this to get some practice with some of the new C++11 features such as variadic templates and lambda functions. It uses template metaprogramming to construct (but not train) the neural network at compile time. You can download the code from its github repository. It’s lacking proper documentation, but I’ve included two examples that should get you started: the xor problem and Fisher’s Iris data set.
A while ago I was looking for a simple lightweight C++ library that could produce some basic charts. I found the PPlot library which easily integrates with different GUI toolkits and also comes with bindings for Ruby and Python. To make the library usable with different GUI frameworks the drawing part has been abstracted to a Painter class. For each GUI framework a different Painter class must be implemented. The library comes with ready made implementations for GUI toolkits like wxWidgets and Qt. However, I wanted to use the PPlot library in a pure Win32 application and had to implement my own Painter class. Check out the result here.
I’ve always been interested in emulators and just finished my Chip-8/SCHIP emulator. Chip-8 is an interpreted programming language that was first used on some early homecomputers and later on the HP48 calculator. The emulator allows you to play some retro games like pong and invaders.
The emulator is written in C++ and is available for download here. Besides the program and source code I’ve also included some games that seem to work OK. The original machines that ran a chip-8 interpreter had a 16 key hex-keypad that looked like this:
1 2 3 C
4 5 6 D
7 8 9 E
A 0 B F
This keypad is emulated on the PC keyboard like this:
1 2 3 4
Q W E R
A S D F
Z X C V