Programming Projects

Programming Projects

Programming Projects

I love to code.

Here is where I'll talk about my programming projects. Right now, I'm primarily working on Codename: Mistletoe, an AI for Pentago. I'll also talk about Project Euler programs once I start doing those again (I've done 20, mostly in Lisp).

Google AI Challenge 2/2010

The (February 2010) Google AI Challenge was a programming contest held from 2/4/2010 - 2/26/2010.

I finished 28th out of 708 entrants. I wrote it in C#, because my most likely next job will have me working at Microsoft. Plus I wanted to try to win, so I didn't want to experiment with a language I've never studied (Python) or a language I've never been particularly good with (Lisp). I toyed with doing it in C++, but I'm more comfortable with C# right now.

Download the code
The main AI portion of the code is in the AI14negamaxABID2 class.
Excuses: This code isn't as good as I'd like it to be. The contest had a deadline, and I was fiddling with the algorithms up to the day it ended (and didn't get everything in). So I have some ugly code that was kept because it worked (including the initial code supplied by GAIC).


The Game

The challenge was to create an AI that would play the Tron Lightcycles game, also known as Snakes or Worms or Snafu.

Project Euler 67 - Maximum Sum in Triangle

I did this Project Euler problem a few years ago while learning Lisp.

Problem #67 Description

The challenge is to calculate the maximum sum available in a 100-row triangle by, starting at the top, adding the numbers as you move down the triangle to numbers adjacent to the current position. Because of the large number of possible routes to the bottom of the triangle, a brute force solution was not possible.

(defun best-of-rows (top bottom)
  (setf bestrow nil)
  (do ((i 0 (+ i 1)))

TODO: Mistletoe

TODO:
Describe Mistletoe.

Talk about the AI involved
Talk about lookaheads and alpha-beta pruning
Talk about game trees
Talk about parameterization
Talk about Chinook
Talk about Arthur Samuel

Talk about Pentago
Perhaps mention Pentagod

Then erase this entry.

Project Euler 187: Semiprimes

For my next problem, I selected the 151st least solved problem (at the time) on Project Euler, 187 (Semiprimes). In 187, we are searching for how many integers under 100 million with precisely two, not necessarily distinct, prime factors.

I know there are a bunch of problems in Project Euler that require generating primes, so the first thing I did was to come up with a C# implementation of the Sieve of Eratosthenes. I've coded the sieve before, but in lisp.

Syndicate content