Reversi / Othello FOSS Project
4:28 pm - February 16, 2009
I after doing a minimax for TTT I thought I’d have a go at Reversi, as its meant to be simpler than chess, but has a big enough state space to make it worth adding alpha beta pruning. This time I did it in Java + Swing as its easier than C. I’m starting to realize that I don’t know anything about how to play the game, so even if I get the search done I’m still going to need a decent evaluation function. Which I’m not really sure how to come up with at the moment. Anyways, if you want to contribute then you are welcome. It basically needs an evaluation function, other useful features would be network play or something that tells you who won when its game over and resets it. Might also be nice to get it running in an applet. The source and Jar file can be downloaded here.
More Pathfinding And Some Minimax
12:43 pm - February 12, 2009
Wrote another pathfinding prog today. It basically just uses Dijkstra’s algorithm. The nice thing about it tho is that it uses an abstract map, as opposed to a grid in my old version. Started out in C, but when managing all the data structures started becoming a pain in the ass I shifted to Java. You can find the code Here. It comes with some preset test data which can easily be changed. to create a node you just do:
areaObject.newNode("MyNodeName");
Which then need to be linked to neighbouring nodes using:
areaObject.linkNodes("FirstNodeName", "SecondNodeName", 104);
With the integer at the end being the distance between them. I had thought about adding a Swing GUI for it to drag and drop nodes, but then I thought its probably not worth the time. One other AI related thing I came up with was a simple minimax algorithm for evaluating moves in Tic Tac Toe. There is no alpha beta pruning or anything as the state space is so small.
Some AJAX Stuff
4:03 pm - December 8, 2008

I recently had a play around with AJAX to make a rating system for the code snippets on this site AJAX is one of those web technologiesI had heard about but never looked into. Now I am glad I did as its pretty cool. The rating system is pretty crude, but does the job for the moment.
For anyone that is interested this is the tutorial I worked off; did the job for me.
Playing With VPython
2:32 pm - December 1, 2008

The other night I had a play around with VPython to do some basic 3D stuff. Its fun as you can write simple programs in very few lines of code. The downside its that its hideously slow.
My first attempt was a rotating colour cube made up of lots of spheres. as seen in the pic to the left. Next up I made a spinning galaxy like thing, which while not all that amazing was only 12 lines of code.
Lastly I made a physics simulation of a set of balls colliding on a 2D plane; this took way longer than the rest, but is pretty cool. I might use the code for a game one day if I ever get the time. I made a version in full 3d, but I dident bother posting it as you cant see whats going on all that easily and the balls collide less.
Resetting Wordpress Admin Password Linux
12:15 pm - October 23, 2008
For some reason my wordpress install b0rked. While everything was setup OK it never provided me with the generated password. Passwords stored in the database are hashed, so to fix this from the terminal you first have to generate an md5 hash of your new password:
echo -n yournewpassword | md5sum
Copy the output and start up MySQL:
mysql -u root -p
After entering the MySQL root password select the wordpress database and update the admin password and exit MySQL.
use wordpress
UPDATE users SET user_pass='PasteNewHashedPasswordInsideQuotes' WHERE id=1;
exit
Site Migration
12:00 am - October 21, 2008
Welcome to my new site. I’m currently in the process of uploading content from my old site and adding some new content that I had not uploaded yet. This site features a wordpress blog; still tewking the theme. Also, theres a new section for code snippets; mostly for my own reference, but you might find something useful in there. Anyway, have fun.