5 in a row

by Nicholas on August 1, 2009

in software

In my discrete mathematics course, our last project was to write a program that would play the game Gomoku, or more commonly known as 5 in a row; tic-tac-toe style.
The requirements are as follows:

1. Written in Java.
2. A move must be made by the program within 60 seconds.
3. The program has to draw a board after each turn.
4. The program stops running after it loses or wins and displays the result.

After a long discussion, my group decided to use an algorithm that would calculate the “beneficial” and “danger” level of each square after every human turn.  It would then choose the appropriate square to place its move.

For more information about our algorithm, read our report here.

For our program, download it here.  Run the java file in command prompt.

This program cannot be sold or modified without the consent of the programmers; intended for educational purposes only.

{ 0 comments }

How to embed a flash Video in Feature Box with Thesis Theme

July 2, 2009

For all you Thesis fans out there (myself included), I have written a (really) short tutorial on how to include a flash video in your feature box.  First I tried the most logical and easiest method of putting an object in the feature but that didn’t seem to work.  So, I decided to try the [...]

Read the full article →

Wacom Tablet not working in Photoshop

June 27, 2009

After I formatted my computer in May, I couldn’t get my tablet to work in Adobe Photoshop for a while, I tried both Adobe Photoshop CS3 and CS4. I have a Wacom Intuos3 4×6. My Logitech mouse would move around just fine but when I moved my pen across the tablet, the cursor [...]

Read the full article →

EECE310 Project at UBC: WarGame

June 27, 2009

In my first term of 3rd Year, (Jan – Apr 2009) I was involved in a group project for EECE310, a course teaching software programming techniques and conventions such as procedural abstractions, exceptions, data abstractions, iteration abstractions, type hierarchies, polymorphic abstractions in Java.  Our professor often stressed that these skills were transferable to other object [...]

Read the full article →

Compact Tube Hybrid (CTH) Headphone Amplifier

June 27, 2009

I recently finished my Compact Tube Hybrid (CTH) amp for my K702 and it turned out great. This project improved my skills troubleshoot a complex circuit on a small board, there were some mistakes while building this amp but for the most part it turned out great. So, when I placed everything on [...]

Read the full article →