Random

Simple XKCD Graph Generation

A simple JS page that generates an XKCD style graph from Excel. This uses a library created by Dan Foreman-Macke.

Simple Tool for Making XKCD Style Graphs using Excel

Kalah C++ Implementation

I once had an interview where the company asked me to write a Kalah implementation with AI. I never heard back. Even though I didn’t really know C/C++ (except on a basic level), it was still a fun project. I’m now releasing it to the world.

Note: I don’t have a binary file (and you probably shouldn’t download an .exe file anyway). It’s simple enough to compile/link without it. The “computer” player makes decisions based on alpha-beta pruning. You can specify the search depth using the MAX_SEARCH_DEPTH constant.

(Source) Download Kalah Implementation (.cpp file)

Option Pricing – Fourier Transform (the slow way) in C++

Rumor has it that you can price options (especially ones with all sorts of jumps) using Fourier Transforms. All you need to do is find the proper characteristic function (and maybe solve an integral or two).

You can use Fast Fourier Transforms. Or you can use slow ones (see below). Either way, you shouldn’t really try this at home – because Black Scholes is the only way to go. Don’t let anyone convince you otherwise.

(Source) Option Pricing – Fourier Transform (.cpp / header file)