I tried to see the 3rd program skipping, I couldn't see it skip 2 or so squares. I didn't see it teleport to the program? how to make it do that. Currently they just move till they are opposite my programs. Then I move into them and they disappear.
A lot of times, the pathfinder object for the last computer object 'jumps' to the program and skips several squares. Since the computer object will only move based on how the pathfinder object moved, the computer object will 'jump' past several squares when moving.
There are other times when pathfinding just fails to work and the computer object sits there and the game stalls because it assumes pathfinding either finds a path or fails to find a path. I don't see how pathfinding can fail to find a path and also not trigger the fail to find path.
Maybe this isn't even a good way to approach the AI. This is what I came up with because I don't know how to mathematically determine a route from point A to point B, and I figured that's what pathfinding is good for. However, in my setup pathfinding seems to be buggy and inconsistent, and I think I'm going to need a new method for determining movement.
I looked at an example from R0J0hound, but his version creates the board tiles when they are needed and then mathematically backtracks, whereas my game has the board tiles present at all times and therefore needs some sort of way to traverse (I'm using a pathfinding object) from point A to point B.
@Dave Hailwood, how did you construct the AI for your board game? Anyone else have ideas how to determine a path from point A to point B without using pathfinding?