Home » Category » Programming

"I'm sorry Dave, I can't allow you to do that". That chilling statement made by the machine HAL in 2001 A Space Odyssey is just one of the many examples of how humans have been fascinated by the idea of artificial intelligence. I myself am very interested in the subject and hope to go back to graduate school for a degree in the field. In the meantime I'm writing small applications like these to demonstrate what AI can do.This is an ASP.NET application that will play a perfect game of Tic-Tac-Toe using the AI algorithm called minimax. First a little about the game Tic-tac-toe. It is a deterministic game, meaning that all actions have a direct and knowable consequence to the game state.…

continue readingContinue Reading

Oct-20
2007

Tic-Tac-Toe Applet

0 Comments | Category: Programming

Training in the remotest parts of the galaxy, TicTacToeTron (also known as T4 for those who are down) has relentlessly sought the highest point of perfection in the mind-bending process that some call the game “Tic-Tac-Toe”.

This is the Tic-Tac-Toe Applet. The AI player will play a human player using the AI  minimax algorithm. Using this algorithm the computer can look forward into the future and determine the consequence of every move it makes - and since tic-tac-toe is a pretty simplistic game, TicTacToeTron will be able to make his moves with perfect accuracy. He can never lose. See this link for a deeper explanation of the minimax algorithm.

Click here…

continue readingContinue Reading

Oct-20
2007

Puzzle Solver Applet

0 Comments | Category: Programming

This is a an applet that implements a well-known Artificial Intelligence algorithm called A* search. The 'robot' is set up in a maze-like structure and must find its way to the goal. The robot has complete knowledge of the environment - meaning that it knows where the goal is and where the walls are.

See this link to see a more complete description of A* search. This implementation of A* uses 4 simple heuristics (that is, guesses the robot can make about the best path to take based on knowledge of its environment):

1) the straightline distance between where the robot is and there the goal is.
2) the distance between where the robot is and there the goal is on the…

continue readingContinue Reading

Oct-20
2007

Peg Board Solver

0 Comments | Category: Programming

The Peg Board solver is a depth-first-search algorithm that will iterate through each potential configuration of the peg board that is possible - it will then store each solution that it finds. Since there are no loops in the search space, this method is complete and when the search is done all possible solutions to the game will have been found. See this link for a more in-depth explanation of the Peg Board game and its solutions.

Click here to see a quick analysis of my solution to the puzzle. Download the source code for the java program below.Downloads FilenameFilesizeDateLink  pegboard.zip 3.92K K 2006-06-24 Download

continue readingContinue Reading

Oct-20
2007

A Priority Queue in C

0 Comments | Category: Programming

So I was writing an implementation of the A* search algorithm for a friend. He has a robot that must navigate a maze - the robot can obtain "complete" knowledge of its environment through an instrument called "ladar". It uses lasers to map out the area around it. Thus, knowing the goal and the obstacles around it, the A* search algorithm proved to be a prime solution for automatically navigating the robot.

One of the best ways to implement A* is using a priority queue. That is because of the following. As the search generates steps that it can take, it will store each step in a data structure. The most easiest and abstract way to handle this is to have a priority…

continue readingContinue Reading