Jun 15th, 2000, 11:54 PM
I'm trying to make an AI program for a game. Basically, what it does is superimposes a 25*25 grid over the form, and then checks each square for certain things (ie, walls and the player) using a recursive function, and assigns a numerical value to each square, with the man's square being 0, each adjacent square 1, etc, and walls being 1000; it then moves the computer player into the adjacent square with the lowest number. Now, this works great and all--only it takes forever, with the recursive function checking 625 squares, and using two 2-dimensional arrays for the coordinates (one keeping track of the value assigned to the square, the other keeping track of whether a square's been checked) and everything. Basically, my question is this: is there any way to speed up the operations without using a completely different AI program?