Archive for the 'Python' Category

Machine Learning and Dragons - a Game

Monday, October 8th, 2007


Here is a fun little game I wrote using Python and pygame.
The Story:

You’re a knight and your job is to kill as many dragons as you can. The twist is that the dragons use Genetic Programming to learn from every encounter. (You can optionally have them use Reinforcement learning instead too.)

You […]

FedBayes - Models Updated with Latest FOMC Statements

Sunday, September 23rd, 2007

I created a little Bayesian interest rate predictor in Python a while back.
Today I updated the models with the latest FOMC meeting statements. I also spruced up the code a bit.
Here are the latest code, models, and data:
FedBayes.zip (~140 KB)
Here are the latest predictions for what will happen at the next meeting:
Rate Change […]

Control Tux Droid over the Web - Future Project

Sunday, July 29th, 2007


Have you seen this fascinating robot tux thing you can control via your computer?

I’m thinking for an upcoming project to buy one of these guys and then create a webpage where anyone can come and control it. There will be a webcam on it 24/7 so you can see it do what you tell […]

Utility Mill Gets Imports

Thursday, July 5th, 2007


You now have access to the following libraries when you write a Utility Mill utility:
re, datetime, time, calendar, difflib, math, urllib, and random
Thus here’s the code for the Regex Evaluator utility:

regex=re.compile(REGEX)
matches=regex.finditer(TEXT)
for match in matches:
print ‘Found “%s” at position %s’ % (match.group(),match.start())


I also just made a text diff utility with the newly […]

Utility Mill - Make Your Own Utilities - Call to Action

Friday, June 15th, 2007

Have you ever needed to write a quick program or calculator? Have you ever had a problem that would be trivial to write a program for, but you still didn’t do it because you didn’t want the overhead of planning the interface, setting up version control, creating a GUI, distributing it to different systems, […]