Evan Roseman Connect 5 Competition THIS IS FOR THE COMPETITION DO NOT GRADE THIS. My program is really not that complicated at a high level. I was unable to allocate enough time to program an appropriate offense so it kinda sucks, but it should be able to make some good moves, or at least tie most of the time. My program searches for the following patterns for defense: 4 in a row <- Block 3 in a row <- Block OR Any one move that could result in 2 three in a row <- Block If there is no Defensive move to make, then the program looks to make an offensive move using the same logic as above (basically reverse defense). Other rules of Logic: An offensive move of an equal type of defensive move always outweighs a defensive move. If a defensive move is tied with another defensive move, the move that will put me in the best offensive position is made. If a defesnive move is tied with another defensive move, and there are no offensive moves available, the defensive move that would block the most number of possible losses (at any stage in the game) is taken. The same rules work with offense too. If it is determined that there are both no defensive and no offense moves to be had, then the computer takes a position of its piece that is already on the board (the one with the highest number of being involved in possible wins) and computes a random direction and random length (between 0 and 2) for a move around that piece. If there are no pieces on the board, a pseudo-random move is chosen: one a random move that is not on the edge of board for those are unlikely to be involved in a maximum number of wins. This is the whole of my programs intelligence. I wished I had more time for an offense. It is a kind-of hack that it merely uses reverse defense. It will be interesting to see how it fares in the compeition.